Search code examples
reactjsreact-nativeprintingzebra-printersthermal-printer

React Native scan printers when connected to wifi network and get ip address of the printer


Hi i'm looking to scan printer devices which are connected to my network in React Native (Android & iOS) and get the selected printer ip address. upto now what i tried is:

1. https://github.com/leesiongchan/react-native-esc-pos -- Gives me device mac_address

2. https://github.com/bencomtech/react-native-pos-printer -- it gives me Device's id

but i need ip address, is there any modules to detect these type of scenario's for both cross-platforms. can anyone suggest me to achieve this task


Solution

  • I think you won't be able to find a RN library doing this specific task. You would have to write native implementation and package it as a RN module.

    Android: https://developer.android.com/guide/topics/connectivity/wifi-scan

    iOS: https://developer.apple.com/library/archive/qa/qa1942/_index.html