android: ipPrint4 print label/receipts to ip printer
ipPrint4
An android label/receipt printing app for TCP/IP connected printers
This app is based on my btPrint4 app. In contrast to btPrint4 this time we print on TCP/IP connected printers to port 9100.
As with btPrint4 we have a main activity and one to list available printers and one to list available demo files.
The challenge with ipPrint4 was a replacement for the bluetooth device discovery. This time we have to scan TCP/IP address range for port 9100. This port is also called HP direct printing port and supported by many printers. It behaves similar to telnet and you can just send print commands to the interface.
The second main change to btPrint4 was the printing code. This time we do not have to use a bluetooth socket but a network TCP/IP socket.
A TCP/IP portscanner
If you scan a range of IP addresses in sequence and try to open a port with a timeout of, let’s say 200ms, the scan will take (200msx254, scan from 1 to 254) 50 seconds.
Port scan code Continue reading ‘android: ipPrint4 print label/receipts to ip printer’ »