Get Status Of a Zebra Printer

Hello!

I would need to know how to get the status of the zebra printer in PHP if possible. Is there any way? or in another programming language? I connect to the printer through the Ip and port and I can print OK, but I need to know the status of it either by sending some command but I do not know how to get the answer.

Thank you!

regards

Nicolas

Anonymous (not verified)
Hi Nicolas, You can

Hi Nicolas, You can definitely get status of the printer the same way you send print jobs. You will have to do a little parsing with PHP because we don't have an SDK for it, but it will work. You will need a TCP client and listener.

Send the following:

~HQES

Then use the manual here to parse the response and show readable statuses to your users. 

This will work on any ZPL label printer.

If you are open to other languages, we have SDK's for Java and .NET that have standard GetStatus() commands to show current status of the printer, but under the covers, it's just using this command or a similar one. 

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Nicolas Lesfori
Thanks Robin, I'm trying with

Thanks Robin, I'm trying with PHP to get the response.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
If you are having issues,

If you are having issues, keep in mind the main ip port is 9100 for most of our printers.  Also you will want to work with byte data as opposed to strings as the response from the command has ASCII non printable characters <STX> = 0x02 and <ETX> = 0x03 to show start and end of this response.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Nicolas Lesfori
Thanks Robin, and if I want

Thanks Robin, and if I want to clear the printer buffer before send a command that prints a QR? Which Command can I use? ~JA ?

Regards!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments