Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a CF-1KB barcode reader connected to an RS232 to PS/2 adaptor and a PS/2 to USB adaptor. I'm not sure how the device works so I'm trying to figure it out by looking at what information I'm getting from the device.

When connected to my computer, it gives me

[ 3673.610054] usb 4-1: new low speed USB device using uhci_hcd and address 3
[ 3673.900448] input: Generic USB K/B as /devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/input/input16
[ 3673.900746] generic-usb 0003:13BA:0017.0003: input,hidraw0: USB HID v1.10 Keyboard [Generic USB K/B] on usb-0000:00:1a.1-1/input0
[ 3673.916733] input: Generic USB K/B as /devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.1/input/input17
[ 3673.916890] generic-usb 0003:13BA:0017.0004: input,hidraw1: USB HID v1.10 Mouse [Generic USB K/B] on usb-0000:00:1a.1-1/input1

Output from sudo cat /dev/hidraw0 and sudo cat /dev/hidraw1 gives me either unreproducible gibberish each time I scan something or nothing at all.

Where can I look to find useful data from the device?

share|improve this question
    
If you scan the same barcode over and over, do you get similar data, or is it completely different every time? –  longneck Nov 15 '11 at 1:22
    
It comes up completely different. The data I'm getting is short enough that I can compare them each time and there's no similarity. After at most two scans after plugging in the scanner, it doesn't give me anything at all. –  howardh Nov 22 '11 at 7:29

2 Answers 2

up vote 1 down vote accepted

A serial to PS2 adapter is likely not appropriate here and maybe be the source of you're problems. That adapter doesn't do any conversion. The type of mouse that it works with knows how to communicate via a serial port and a PS2 port and the adapter just physically adapts the connector.

Your barcode scanner probably does not know how to speak PS2. What your should do next is hook it up to a serial port and try a bunch of different strings, starting with 2400 or 9600 baud and 8N1 or 7E1 coding. When you are getting a consistent pattern every time you scan the same barcode, you're know you're on to something.

share|improve this answer

A very common way for barcode scanners to work is to pretend to be a keyboard and just type the barcode. Was the PS2 adapter provided with the barcode reader? If so, then I would suspect that the reader is just pretending to be a keyboard.

share|improve this answer
    
I'm pretty sure that is what this one is supposed to do, but I'm not getting anything in a text editor when I scan a bar code. I just found a PS/2 adapter lying around, so I used it since I don't have a PS/2 port on this computer. Possibly a broken scanner? I don't know how to check if that is the case though. –  howardh Nov 22 '11 at 7:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.