쉘에 lsusb -v 를 쳤을 때 궁금한 점이 있습니다.

lyh1816의 이미지

쉘에 lsusb -v를 치면 usb device 정보가 상세하게 나오는데요

이 때 HID Device Descriptor 이라고 뜨는 정보가 어디에 선언 되어 있는지 궁금합니다.

interface 관련 구조체를 찾아봐도 안보이네요

답변 부탁드립니다.

neweapon의 이미지

USB spec에서 HID descriptor는 interface descriptor의 subset이었던 걸로 기억합니다.
만약 시스템에 HID device가 연결되어있다면 다음처럼 나타날 것 같네요.

...
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 70
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0006 1x 6 bytes
bInterval 10

lyh1816의 이미지

제가 HID Device Descriptor에 직접 접근을 하고 싶어서 구조체를 찾고있는데요.

위치는 혹시 모르시는지 궁금합니다.