Communication with Zebra RFID Printer | C# .NET

泄露秘密 提交于 2019-12-11 21:07:11

问题


We are developing an application which prints RFID labels using Zebra RZ400 RFID printer. Until now, we were sending ZPL commands by RawPrinterHelper class which makes call to winspool.drv.

However, we soon realized that not all tags are printed successfully so we looked for a way to get feedback about the success of the last print operation. There is a command "^RV" that is said to return a string upon a print operation that reflects operation success result.

Now, the problem is we don't know a way to get this feedback data from printer! RawPrinterHelper class does not have any method to get data.

I connected the printer to USB and used LibUsbDotNet library to communicate with the printer. I can send commands to printer successfully including "^RV" command and read from USB again to get the feedback from printer. I can get the feedback value but not every time, only once after randomly printing lots of tags.

Is there an offical SDK from Zebra to communicate with printers? What can be wrong about USB communication? Please share your experiences regarding Zebra .NET development.


回答1:


There is an official Java SDK which does bi-di communications to the printer using the Windows driver (for USB. It does direct for Tcp). There is also a Windows Mobile SDK from Zebra which might work for you.

You can try dropping in the dlls, and then take a look at the UsbPrinterConnection class. Lemme know if it works for you




回答2:


TCP/IP Bidirectional Programming Example Using Sockets - C# https://km.zebra.com/kb/index?page=content&id=SA140&actp=LIST



来源:https://stackoverflow.com/questions/16610260/communication-with-zebra-rfid-printer-c-sharp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!