Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ binding] Print result: Error. Printer connection timeout #180

Open
yogithesymbian opened this issue Jun 20, 2023 · 0 comments
Open

[ binding] Print result: Error. Printer connection timeout #180

yogithesymbian opened this issue Jun 20, 2023 · 0 comments

Comments

@yogithesymbian
Copy link

Print result: Error. Printer connection timeout
on example guide / code its get by Wifi dependency to get local ipaddress. but we know its deprecated , so i set manuallt cause i know my ip address is 192.168.43.9 . i make sure its correct by adb connect 192.168.43.9 and adb devices


List of devices attached
192.168.43.9:5555       device

and sometimes looks like these
➜  example git:(master) ✗ adb devices
List of devices attached
V222219J21230   device

i try to connect but getting error like as the mention . i just want to connect my print device ( 192.168.43.9 ) with my normal phone thats connect same wireless ( hotspot wifi ) .

my hotspot wifi is ( 192.168.43.1 ) also i can connect by adb connect

i have tested by

  1. from my print device to my print device ( not work )
  2. from my normal device to my print device ( not work )

the code is copy from main.dart from example

const PaperSize paper = PaperSize.mm80;
    final profile = await CapabilityProfile.load();
    final printer = NetworkPrinter(paper, profile);

    final PosPrintResult res =
        await printer.connect('192.168.43.9', port: 9100);

    if (res == PosPrintResult.success) {
      testReceipt(printer);
      printer.disconnect();
    }

    print('Print result: ${res.msg}');

here is dependency

  # others
  esc_pos_printer: ^4.1.0
  charset_converter: ^2.1.1
  image: ^3.0.2
  intl: ^0.18.1
  path_provider: ^2.0.15
  ping_discover_network_forked: ^0.0.1
  qr_flutter: ^4.0.0
  # network_info_plus: 3.0.2 # i change for wifi cause deprecated
@yogithesymbian yogithesymbian changed the title Print result: Error. Printer connection timeout [ binding] Print result: Error. Printer connection timeout Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant