On 19 September 2013 19:10, Wayne Stallwood ALUGlist@digimatic.co.uk wrote:
I'd say if you can solve it do...using serial TTY scanner complicates life somewhat because you have to power it. Though from memory both Wasp and I think Datalogic make devices that can appear as a USB Serial device rather than a USB HID.
Well I'm making progress of sorts but can't find relevant documentation anywhere, so far at least.
With a Dell USB keyboard plugged in, looking at the HID data from event13 (the keyboard), when I press the "0" key I get: E913445200000000 35 CC 0C 00 00 00 00 00 04 00 04 00 27 00 07 00 E913445200000000 35 CC 0C 00 00 00 00 00 01 00 0B 00 01 00 00 00 E913445200000000 35 CC 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 E913445200000000 A0 04 0E 00 00 00 00 00 04 00 04 00 27 00 07 00 E913445200000000 A0 04 0E 00 00 00 00 00 01 00 0B 00 00 00 00 00 E913445200000000 A0 04 0E 00 00 00 00 00 00 00 00 00 00 00 00 00
When the barcode scanner sends a zero I get[*]: BB14445200000000 EB FB 0A 00 00 00 00 00 04 00 04 00 27 00 07 00 BB14445200000000 EB FB 0A 00 00 00 00 00 01 00 0B 00 01 00 00 00 BB14445200000000 EB FB 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 BB14445200000000 55 13 0B 00 00 00 00 00 04 00 04 00 27 00 07 00 BB14445200000000 55 13 0B 00 00 00 00 00 01 00 0B 00 00 00 00 00
I assume in there I have key press and key release and no doubt other stuff too, but the key bit appears to be the "27", on the basis that when I type/scan "7" this changes to 24 (on a keyboard 0 is 3 keys up from 7 so this makes sense). Assuming this to be correct, other keys that I have tested "make sense" too ("1" = 1E, "4" = 21, "9" = 26). I also have "-" giving me 2D, for what that's worth.
However I can't find any keyboard key code maps that make and of that make sense. I'd expect "0" to give me something like 30 not 27, for example.
Short of working out a map of all relevant characters, any suggestions as to a reference that'll make sense of this?
NB: The barcode scanner always gives the same first 8 bytes in each block of 24 bytes, which is why they're grouped the way they are. The keyboard seems to use this as some kind of timestamp based on the way it appears to increment every second, but I guess that's not important given the scanner doesn't bother.
[*] I think this is the bit of the input stream which relates to the "0" but can't be sure as that's not all I get from scanning a barcode. The test barcode I have to scan returns "0714-0097" hence the choices of characters above.