Home > OS >  Under Linux using C language to usb hid devices at the time of enumeration name how to obtain?
Under Linux using C language to usb hid devices at the time of enumeration name how to obtain?

Time:11-14

As title, I use a hidapi libraries, can be obtained from the hid_device_info structure pid and vid, but hid device name how do I get? Which master knows, bother to inform, thank you!

CodePudding user response:

Which of the following is the name of you mean, please?

[2257203.194064] usb 3-2: new low - speed usb device number 111 using xhci_hcd
[2257203.347731] usb 3-2: the New usb device found, idVendor=046 d, idProduct=c31c
[2257203.347736] usb 3-2: the New usb device strings: Mfr=1, the Product=2, SerialNumber=0
[2257203.347739] usb 3-2: Product: usb the rid_device_info_keyboard
[2257203.347741] usb 3-2: Manufacturer: Logitech
[2257203.353675] input: Logitech USB the rid_device_info_keyboard as/devices/pci0000:00/0000:00:14. 0/usb3/3 - two-thirds - 2:1. 0/0003:046 d: C31C. 0013/input/input17
[2257203.411068] hid - generic d 0003-046: C31C. 0013: input, hidraw0: USB hid v1.10 the rid_device_info_keyboard [Logitech USB the rid_device_info_keyboard] on the USB - 0000:00:14. 0-2/input0
[2257203.417375] input: Logitech USB the rid_device_info_keyboard as/devices/pci0000:00/0000:00:14. 0/usb3/3 - two-thirds - 2:1. 1/0003:046 d: C31C. 0014/input/input18
[2257203.474526] hid - generic d 0003-046: C31C. 0014: input, hidraw1: USB hid v1.10 Device [Logitech USB the rid_device_info_keyboard] on the USB - 0000:00:14. 0-2/input1

Peter
  • Related