Tuesday, February 07, 2012

Barcode Scanner Hacking :)

Hardware audits are one of the most boring things ever! And it's so frustrating when just about everything you have to audit has a barcode on it. It's even more frustrating when you find an old barcode scanner lying around, doing nothing that could be put to good use, helping scanning those barcodes from your hardware. There's only one problem. The barcode scanner has a non-standard serial connector. But of course, this is no real problem for an electronics hacker!

So, I started trying to find out what the scanner was and some kind of pinout for the odd serial connector. The scanner is a Datalogic Touch65 Light Wedge RS232. The fact it had RS232 in it's name gave me hope that somewhere in the mix was a standard RS232 interface. I started searching for some kind of description of the cable I had, but kept finding that the unit can have several different types of cable. This led me on to search for pinouts of the different cables.

A few minutes later, Google turns up this result:

http://www.dhtechnology.com.au/pdfs/barcode%20scanners/Standard%20cable%20diagrams.pdf

This lists pinouts for all the cables. After some looking at the serial end, I found that I have "power on pin 9" style cable. So from here I could wire up a serial connection. The only problem now is that I don't have any serial ports on my computer!

A quick look at ebay and I find a genuine prolific PL2303 USB to serial adapter for less than a fiver. Bargain.

Once it arrived, I just had to wire it all up and get a 5v source (USB is great for this), and it worked first time!



I'm using AACKeys to convert the scanned codes into keystrokes, but it's working fine. Now, back to my audit... :)