我有一个作为 USB HID 连接的伽马能谱仪。当它被插入时,它会dmesg
告诉我为它制作了两个设备文件,hiddev0
并且hidraw2
(显然,编号并不重要。)
根据文档和对字节的目视检查,我想从hidraw2
. 但我很好奇正在通过什么样的数据,因为在我注意到存在hiddev0
之前,我一直试图弄清楚它。hidraw2
以下是来自 的一些示例数据hiddev0
。
00000000 01 00 00 ff 0d 00 00 00 01 00 00 ff 81 00 00 00 |................|
00000010 01 00 00 ff 0b 00 00 00 01 00 00 ff 00 00 00 00 |................|
00000020 01 00 00 ff 0e 00 00 00 01 00 00 ff c1 00 00 00 |................|
00000030 01 00 00 ff 08 00 00 00 01 00 00 ff 01 00 00 00 |................|
00000040 01 00 00 ff 08 00 00 00 01 00 00 ff 41 00 00 00 |............A...|
00000050 01 00 00 ff 0b 00 00 00 01 00 00 ff 31 00 00 00 |............1...|
00000060 01 00 00 ff 07 00 00 00 01 00 00 ff b1 00 00 00 |................|
00000070 01 00 00 ff 09 00 00 00 01 00 00 ff 01 00 00 00 |................|
00000080 01 00 00 ff 08 00 00 00 01 00 00 ff b1 00 00 00 |................|
00000090 01 00 00 ff 08 00 00 00 01 00 00 ff 51 00 00 00 |............Q...|
000000a0 01 00 00 ff 1d 00 00 00 01 00 00 ff 51 00 00 00 |............Q...|
000000b0 01 00 00 ff 0a 00 00 00 01 00 00 ff f1 00 00 00 |................|
000000c0 01 00 00 ff 08 00 00 00 01 00 00 ff 51 00 00 00 |............Q...|
000000d0 01 00 00 ff 34 00 00 00 01 00 00 ff 91 00 00 00 |....4...........|
根据要求,这是来自 的行dmesg
。
[411407.529580] hid-generic 0003:04D8:0023.0003: hiddev0,hidraw2: USB HID v1.01 Device [Kromek SIGMA50] on usb-0000:00:1a.1-2/input0