1

Let's say:

$ ls -l /dev/input/by-id
lrwxrwxrwx 1 root root 10 Feb 10 03:47 usb-Logitech_USB_Keyboard-event-if01 -> ../event22
lrwxrwxrwx 1 root root 10 Feb 10 03:47 usb-Logitech_USB_Keyboard-event-kbd -> ../event21
$ ls -l /dev/input/by-path/
lrwxrwxrwx 1 root root 10 Feb 10 03:47 pci-0000:00:14.0-usb-0:1.1:1.0-event-kbd -> ../event21
lrwxrwxrwx 1 root root 10 Feb 10 03:47 pci-0000:00:14.0-usb-0:1.1:1.1-event -> ../event22

I know Interface number 1 (event22) above is non-functional because of bInterfaceProtocol is None for bInterfaceNumber 1:

$ sudo lsusb -v -d 046d:c31c

Bus 002 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc31c Keyboard K120
  bcdDevice           64.00
  iManufacturer           1 Logitech
  iProduct                2 USB Keyboard
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          3 U64.00_B0001
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               90mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              2 USB Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         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     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              2 USB Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     159
         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     0x0004  1x 4 bytes
        bInterval             255
Device Status:     0x0000
  (Bus Powered)
$ 

I don't get it and raise up two possibility questions:

  1. If value of bInterfaceProtocol always None independent of Host, then what's the point of this unused Interface exists ?
  2. If value of bInterfaceProtocol decided by Kernel, then what's the condition did Kernel take to set it to None ?
1

Kernel does not decide the bInterfaceProtocol. The value is received from the connected USB device.

A variety of protocols are supported HID devices. The bInterfaceProtocol member of an Interface descriptor only has meaning if the bInterfaceSubClass member declares that the device supports a boot interface, otherwise it is 0.

Check USB Device Class Definition for HID 1.11 for more information.

0

Besides of @desowin answer, I want to add that the devices which has multiple interfaces means it's a composite device, as stated at An Introduction to Universal Serial Bus 2.0:

At the same time, a device can have multiple interfaces, thus multiple interface descriptors. A USB device with multiple interfaces that perform different functions is called a composite device. An example is a USB audio head set. In the head set, you have a single USB device with two interfaces. One interface is for the audio side of the headset and another interface may be the controls to adjust the volume. Multiple interfaces can be active at the same time.

To figure out what's the functionality of this None device interface, I tested with sudo cat /dev/input/by-id/usb-CHESEN_USB_Keyboard-event-kbd and sudo cat /dev/input/by-id/usb-CHESEN_USB_Keyboard-event-if01 while pressing different keys, and eventually I noticed only if01 will get output when I pressing Multimedia keys to open Bluetooth settings and adjust volume.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.