thiendangit / react-native-thermal-receipt-printer-image-qr

React native thermal receipt printer
https://www.npmjs.com/package/react-native-thermal-receipt-printer-image-qr
111 stars 73 forks source link

Connecting to NET Printer always fails #82

Open pajkho opened 1 year ago

pajkho commented 1 year ago

Trying to connect to a NET printer it always fails with error code "PingUtil_Message_HostErrorUnknown". Have tried on both emulator and real device. Also tried the react-native-ping library directly and it seems to always fail no matter which IP (even 8.8.8.8 fails). The only IP that works seems to be 127.0.0.1. After some googling this seems quite common with several different ping methods in Android and from my understanding using ping this way does not seem reliable. See for example: https://stackoverflow.com/questions/3905358/how-to-ping-external-ip-from-java-android

Any suggested solution for this?