C# read USB HID from BarCode Scanner

barcodechidusb

I am using a USB HID Component to read BarCode Scanner

http://www.codeproject.com/Articles/18099/A-USB-HID-Component-for-C

It works fine,but I am confused end of the char in the received data.

EAN-13 = end of the char is ASCII 22

EAN-8 = end of the char is ASCII 12

end of the char is rule or not ?

a busy cat

Best Answer

It seems that your scanner is set to the wrong mode, which adds those suffixes to the bar codes.

For instance, you can program the Honeywell Genesis 7580g scanner in such a way, that it will add different suffixes to the barcodes, depending on the symbology. It's up to you, to add or not to add. But. You can set up the scanner interface so that it will add that suffixes no matter whether you want it or not.

That's what the "USB IBM SurePos" interface of the Genesis 7580g scanner will do. (AKA "USB Handheld Scanner - PAPSPH" command and "USB Tabletop Scanner - PAPSPT" command)

For this interface, the User Guide for my scanner states, that

Each [command] bar code also programs the following suffixes for each symbology:

Symbology        Suffix
EAN 8            0C (decimal 12)
EAN 13           16 (decimal 22)
UPC A            0D
UPC E            0A

and so on for Code 39, Code 128 and Interleaved 2 of 5 symbologies. And it looks just like your case.

All you need if you had my scanner is to program just "USB HID" interface (command PAP131) instead of "USB IBM SurePos" interface (commands PAPSPH or PAPSPT).

Related Topic