我可以弄清楚此条形码扫描仪的编码
我正在Java进行申请,该应用程序旨在在我的Raspberry Pi上运行。它使用USB4Java分离内核驱动程序并直接给我数据。扫描仪本身就像键盘一样。当它检测到某些内容时,它将其发送新线字符。上面扫描的条形码对应于“ K1215500”。我不确定为什么有几个只有0个输入(可能是驱动程序的定界符),但是现在我不知道这是什么样的编码。绝对不是ASCII。如果第一行是“ k”,那么似乎“ 1”是30,“ 2”是31,“ 5”是34,“ 0”是39,而“ \ n”是40,所以有一些连贯性为此,我只是不知道这是什么。它们是否对应于键盘驱动程序知道的某种键盘模式?提前致谢
I'm making an application in Java that is meant to run on my Raspberry Pi. It uses usb4java to detach the kernel's driver and give me its data directly. The scanner itself works like a keyboard. When it detects something, it sends it with a new-line character. The barcode that was scanned above corresponded to "K1215500". I'm not sure why there were several inputs that were just 0s (might be delimiters for a driver), but now I have no idea what kind of encoding this is. It is definitely not ASCII. If the first row is "K", then it seems like "1" is 30, "2" is 31, "5" is 34, "0" is 39, and "\n" is 40, so there is some coherence to this, I just don't know what it is. Do they correspond to some sort of keycode schema a keyboard driver would know? Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在进行了更多研究之后,我发现了这一点。对于有兴趣的任何人,此编码是键盘命令的USB键盘规范。请查看此PDF的第83页:
https:/网站/默认/文件/hut1_22.pdf
欢呼!
I figured it out after some more research. For anyone interested, this encoding is specifically the USB keyboard specification for keyboard commands. Check out page 83 of this PDF:
https://www.usb.org/sites/default/files/hut1_22.pdf
Cheers!