Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ESC/POS Printing Over WiFi

I want to write an Android app which will do following in steps and I want you to help me find right APIs for them to speed up the process. The printer I am going to use supports ESC/POS protocols.

  1. Find all printers nearby using WiFi.
  2. It will select one printer may be first one.
  3. It will send a text document to printer for printing and will see if it was printed successfully.

I found some APIs like this. I believe my problem is similar to this post

like image 811
Umair A. Avatar asked Jul 15 '11 14:07

Umair A.


People also ask

How do I connect my POS printer to my phone?

Plug one end of the USB cable into the USB port of the printer, and the other end into the female USB connector of an OTG adapter or cable. Then, plug the micro-USB end of the OTG adapter or cable into the micro-USB port of your mobile device, and wait for the system to recognize the printer.

What is ESC POS command?

✧ ESC command is a standard instruction set made by EPSON for needle printer, which has become an effective industrial standard of the control language of needle printers. ✧ ESC/POS printing command is a simplified version of ESC printing control commands.


1 Answers

I have been looking into this for a long time. There are almost no APIs out there, much less good APIs. The only one I have gotten to work so far is the Epson Android SDK.

This supports a number of wifi and bluetooth epson printers. With just a few lines of code, you can find the IP address of the printer you want to print with, and then add lines to the document to print. They also have a good sample app that has every kind of operation you might want to do.

You can manually write ESC commands, but it is very complecated. That is why things like JavaPos were developed, to attempt to abstract these details away. However, here is an Epson manual for ESC commands

UPDATE: the epson android sdk link is out of date. Here is an up-to-date link

like image 88
Jameo Avatar answered Sep 29 '22 10:09

Jameo