开发者

Reading Zebra printer status via USB on Ubuntu

After a lot of posts in SO and Google, I could not find an answer to my problem. Most of similar questions are Windows/VB/.Net/C#/Java centric.

I need to send an ESC command to a Zebra USB printer (TTP2130) and get the status back using C/C++ . I am able to print fine (with Zebra generic driver set as default printer) using:

$ lpr file.prn 

Used Zebra Toolbox to communicate in Windows and generate *.prn files with ESC commands.

But if I sent a file with a command that needs response from printer, nothing happens.

What would be the best approach to accomplish this? Maybe using开发者_StackOverflow社区 libusb1.0 directly?

Thanks for any help!


Found a solution after searching for 'Swecoin'. This is the old manufacturer of Zebra's TTP line of printers. Swecoin on Wikipedia.

This guy made a simple and direct app to communicate with TTP printers (ttputil): http://www.rainbow-software.org/linux/

After downloading and compiling, I was able to send commands directly:

sudo ./ttputil enquiry sensor /dev/usblp0

I will modify its code to fit my needs.

Unfortunately, I haven't found a way to contact (and thank) the original developer from his website.


Well I had a similar issue and in the end this post helped me a lot: https://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/ it is Windows centric but the principle is the same also on Linux and Mac.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜