Is there a way to find the IP address of zebra printer using xojo? I am using the TCPsocket1 control and want to know before TCPSocket1.Connect statement and not have to change the code. The printer is connected by Ethernet.
You’ll have to look into whether your printer supports any automatic discovery protocolos - ie, Zero Conf/Bonjour, etc.
Alternatively, you can enable the user to enter it manually. That’s probably a good approach in most situations.
Ideally the Zebra printer will have a static IP Address set in the DHCP server for the network and therefor be guaranteed to get the same IP Address every time it is powered on.
In a small network the DHCP service will likely be provided by the internet router, on a larger network there’ll be a server that provides this service.
If you are using macOS or Linux, you can get the printers names and URL’s (that includes IP or hostnames) via shell (and parse it) with:
lptstat -s
also you can get the networked print destinations with:
lptstat -e
In Windows no idea.