自定义 USB HID 设备不断断开和重新连接

自定义 USB HID 设备不断断开和重新连接

我有一个自制的小型测量设备,它通过 USB HID 将数据输出到连接的计算机。它在 Windows 下工作正常,但在 Linux 下(我在两台不同的计算机上测试了它,都是最近的 Debian)它只是连接几秒钟,然后断开连接并立即重新连接,等等。

从系统日志中提取:

Oct  1 17:17:26 r2 kernel: [20446.158839] usb 1-6: USB disconnect, device number 76
Oct  1 17:17:27 r2 kernel: [20446.804678] usb 1-6: new low-speed USB device number 77 using xhci_hcd
Oct  1 17:17:27 r2 kernel: [20446.963314] usb 1-6: New USB device found, idVendor=16c0, idProduct=05df, bcdDevice= 1.00
Oct  1 17:17:27 r2 kernel: [20446.963317] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct  1 17:17:27 r2 kernel: [20446.963318] usb 1-6: Product: Miniskop 1.3
Oct  1 17:17:27 r2 kernel: [20446.963319] usb 1-6: Manufacturer: obdev.at
Oct  1 17:17:27 r2 mtp-probe: checking bus 1, device 77: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Oct  1 17:17:27 r2 mtp-probe: bus: 1, device: 77 was not an MTP device
Oct  1 17:17:27 r2 kernel: [20446.970031] input: obdev.at Miniskop 1.3 as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:16C0:05DF.02B3/input/input704
Oct  1 17:17:27 r2 kernel: [20446.970203] hid-generic 0003:16C0:05DF.02B3: input,hidraw4: USB HID v1.01 Device [obdev.at Miniskop 1.3] on usb-0000:00:14.0-6/input0
Oct  1 17:17:27 r2 mtp-probe: checking bus 1, device 77: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Oct  1 17:17:27 r2 mtp-probe: bus: 1, device: 77 was not an MTP device
Oct  1 17:17:31 r2 kernel: [20451.406128] usb 1-6: USB disconnect, device number 77
Oct  1 17:17:32 r2 kernel: [20452.048706] usb 1-6: new low-speed USB device number 78 using xhci_hcd
Oct  1 17:17:32 r2 kernel: [20452.207314] usb 1-6: New USB device found, idVendor=16c0, idProduct=05df, bcdDevice= 1.00
Oct  1 17:17:32 r2 kernel: [20452.207317] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct  1 17:17:32 r2 kernel: [20452.207319] usb 1-6: Product: Miniskop 1.3
Oct  1 17:17:32 r2 kernel: [20452.207320] usb 1-6: Manufacturer: obdev.at
Oct  1 17:17:32 r2 mtp-probe: checking bus 1, device 78: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Oct  1 17:17:32 r2 mtp-probe: bus: 1, device: 78 was not an MTP device
Oct  1 17:17:32 r2 kernel: [20452.214050] input: obdev.at Miniskop 1.3 as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:16C0:05DF.02B4/input/input705
Oct  1 17:17:32 r2 kernel: [20452.214127] hid-generic 0003:16C0:05DF.02B4: input,hidraw4: USB HID v1.01 Device [obdev.at Miniskop 1.3] on usb-0000:00:14.0-6/input0
Oct  1 17:17:32 r2 mtp-probe: checking bus 1, device 78: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Oct  1 17:17:32 r2 mtp-probe: bus: 1, device: 78 was not an MTP device
Oct  1 17:17:36 r2 kernel: [20456.638943] usb 1-6: USB disconnect, device number 78
Oct  1 17:17:37 r2 kernel: [20457.288758] usb 1-6: new low-speed USB device number 79 using xhci_hcd
Oct  1 17:17:37 r2 kernel: [20457.451322] usb 1-6: New USB device found, idVendor=16c0, idProduct=05df, bcdDevice= 1.00
Oct  1 17:17:37 r2 kernel: [20457.451325] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct  1 17:17:37 r2 kernel: [20457.451326] usb 1-6: Product: Miniskop 1.3
Oct  1 17:17:37 r2 kernel: [20457.451327] usb 1-6: Manufacturer: obdev.at
Oct  1 17:17:37 r2 mtp-probe: checking bus 1, device 79: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Oct  1 17:17:37 r2 mtp-probe: bus: 1, device: 79 was not an MTP device
Oct  1 17:17:37 r2 kernel: [20457.458007] input: obdev.at Miniskop 1.3 as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:16C0:05DF.02B5/input/input706
Oct  1 17:17:37 r2 kernel: [20457.458060] hid-generic 0003:16C0:05DF.02B5: input,hidraw4: USB HID v1.01 Device [obdev.at Miniskop 1.3] on usb-0000:00:14.0-6/input0
Oct  1 17:17:37 r2 mtp-probe: checking bus 1, device 79: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6"
Oct  1 17:17:37 r2 mtp-probe: bus: 1, device: 79 was not an MTP device

我发现关于 UPS 相同行为的看起来非常相似的问题,但我不知道如何(如果可能的话)使其适应我的问题。

相关内容