Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top