![버스 ID를 통해 USB 장치가 키보드인지 프로그래밍 방식으로 확인하는 방법은 무엇입니까?](https://linux55.com/image/157355/%EB%B2%84%EC%8A%A4%20ID%EB%A5%BC%20%ED%86%B5%ED%95%B4%20USB%20%EC%9E%A5%EC%B9%98%EA%B0%80%20%ED%82%A4%EB%B3%B4%EB%93%9C%EC%9D%B8%EC%A7%80%20%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D%20%EB%B0%A9%EC%8B%9D%EC%9C%BC%EB%A1%9C%20%ED%99%95%EC%9D%B8%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
lsusb -vv
내가 볼 수 있는 바에 따르면 , 예를 들면 다음과 같습니다.
Bus 003 Device 002: ID 04b5:0680 ROHM LSI Systems USA, LLC
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x04b5 ROHM LSI Systems USA, LLC
idProduct 0x0680
bcdDevice 1.54
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0049
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.12
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 1929
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0014 1x 20 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0014 1x 20 bytes
bInterval 16
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.12
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 53
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 10
HID인 것은 알 수 있지만 키보드인지 확인하기 위해 무엇을 사용할 수 있는지 잘 모르겠습니다. 그럴 수도 bInterfaceSubClass
있고 나타낼 수도 있다고 생각했지만 bInterfaceProtocol
0이므로 지정되지 않음을 의미하는지 잘 모르겠습니다. 허브 외에 유일한 USB 출력 장치는 Wacom이므로 터치패드일 수도 있습니다. 이 장치가 정말 키보드인 것 같은 느낌이 듭니다. 또한 xinput
"AT Translated Set 2 Keyboard"가 출력되므로 키보드가 Wacom USB 장치에서 나오는 것처럼 보이지 않습니다.
나는 내 스크립트에 넣을 수 있는 표준을 찾고 있습니다.