문제

I'd like to write a simple C# app to collect the output of a Zebra printer's magnetic card reader. (Model RW420) My only interface to the device is USB. The CPCL language specifies an MCR command for this purpose, but I cannot figure out how to issue this command to the printer via .NET. Neither the online documentation nor support staff can tell me. Does anyone have an idea?

도움이 되었습니까?

해결책

You need to write native code in order to read back from USB (using pInvoke). You need to find the usb device path with Zebra's vendor ID in it. You would pass this device path to CreateFile
see: MSDN Create File

다른 팁

Please note that the RW420 manual (page 29) states:

Note that the RW series USB port is intended for setup and maintenance of the printer only and not for permanent communications use to a terminal.

We have networked Zebra printers here, so my best guess is that if you can communicate over USB, in the way you intend, there will be a serial (or parallel) port exposed to talk to given by Zebra's USB driver. Start by looking in the Device Manager in Windows. If this is the case, you should be able to do standard serial communications to the printer, and follow the CPCL manual for querying the magstripe reader (see page 10-23 of the CPCL manual)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top