Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two way communication with Barcode reader via HID POS

I wish to develop an application which implements two-way communication with a barcode reader where the application sends back an accept/reject signal to the barcode reader to indicate success or failure and the barcode reader interprets with a different beep, red bulb or whatever (depending on the brand). For this reason using the Keyboard Wedge or one-way communication does not suit this scenario (this use case will have people away from the computer with wireless handheld barcode scanners, so they won't be seeing anything on screen).

I think that for this scenario I have to use HID POS, but I am bit stuck from where I should start, (i.e. what API calls or signals should I send?).

Also do I have to look for some specific support for this in the barcode scanners or is HID POS with 2-way accept/reject model supported by all USB devices?

like image 393
jbx Avatar asked Jun 15 '10 06:06

jbx


2 Answers

Our scanners use USB HID, if you select USB HID keyboard it installs as dual-interface unit where you have the HID POS as secondary interface. That means the scanner sends (bar code) data to the keyboard buffer, and you can send commands via the USB HID POS interface to the scanners. The same scanner can alternatively be connected as USB serial device, then your receive both data and send commands via a 'virtual' com port, for which you need a CDC/ACM device driver. (www.honeywellaidc.com for driver and scanners)

like image 63
Henri Barten Avatar answered Oct 26 '22 03:10

Henri Barten


I don't think you need to worry about the specifics of USB/Bluetooth, more so it should be a process of connecting the scanner to your computer, and then opening a serial stream which is exposed through USB/Bluetooth. For instance, the Symbol LS4278 supports RS232 communication over USB. To send a beep to the scanner, you would send the Ascii Bel character to the scanner.

Using this very simplistic model, you could send one beep to indicate success and three beeps to indicate failure. While better scanners will probably give you more functionality in terms of gracefully handling communication errors, and being more configurable in terms of the pitch/duration of the beep... I suspect that all of the scanners are programmed via RS232 over some standard, where that standard could be bluetooth, or USB.

For clarification, the Symbol LS4278 scanner is a wireless scanner with a physical cradle which plugs into a computer. I think that is a better solution than bluetooth, however YMMV.

like image 35
Clarus Avatar answered Oct 26 '22 03:10

Clarus