Why does my Report Descriptor is **UNAVAILABLE** in lsusb?












0















I am programming a USB-HID device based on STM32 CubeMX Mouse example.
I made some modifications (interface, endpoints, report descriptor, etc using the CustomHID Class template) and I am currently testing enumeration.



Everything seems to be OK except that the lsusb command fails to dump the report descriptor:



$lsusb
Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407

$sudo lsusb -v -s 001:013

Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 2 Communications
bDeviceSubClass 2 Abstract (modem)
bDeviceProtocol 0 None
bMaxPacketSize0 64
idVendor 0x0483 STMicroelectronics
idProduct 0x5740 STM32F407
bcdDevice 2.00
iManufacturer 1 TEST-ST
iProduct 2 TEST MY HID
iSerial 3 00000000001A
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 36
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 12
bNumDeviceCaps 1
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
Device Status: 0x0001
Self Powered


The only link I've found related to my problem on the web is this, however it lacks some explanations about what is done here...



[EDIT]



I have also tried to debug with HIDAPI:



For some reason, the Report descriptor is not sent when the target is plugged.
However, when I connect then disconnect the target (does not matter if I send a command or not) via HIDAPI, then the Report descriptor is populated in lsusb output:



iInterface              0 
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 34
Report Descriptor: (length is 34)
Item(Global): Usage Page, data= [ 0xd0 0xf1 ] 61904
(null)
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Local ): Usage, data= [ 0x20 ] 32
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x21 ] 33
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Main ): Output, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none
Endpoint Descriptor:


Moreover, when I spy with udevadm monitor here is the output:



KERNEL[25465.054769] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
KERNEL[25465.055295] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
KERNEL[25465.056409] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
KERNEL[25465.056864] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
KERNEL[25465.056944] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
UDEV [25465.097179] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
UDEV [25465.100961] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
UDEV [25465.104350] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
UDEV [25465.106807] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
UDEV [25465.108620] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)


And when I connect to the target with HIDAPI:



KERNEL[25560.356084] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
KERNEL[25560.356187] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
KERNEL[25560.356278] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
UDEV [25560.359579] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
UDEV [25560.360677] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
UDEV [25560.362515] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)


There is no more activity when I disconnect. However the Report descriptor only appears in lsusb after HIDAPI is disconnected for the target.



My guess is that something is blocking/missing right after the plug.
The connection with HIDAPI triggers the sending of missing information, but I am not sure why the information is only available once HIDAPI disconnects...










share|improve this question





























    0















    I am programming a USB-HID device based on STM32 CubeMX Mouse example.
    I made some modifications (interface, endpoints, report descriptor, etc using the CustomHID Class template) and I am currently testing enumeration.



    Everything seems to be OK except that the lsusb command fails to dump the report descriptor:



    $lsusb
    Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407

    $sudo lsusb -v -s 001:013

    Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.01
    bDeviceClass 2 Communications
    bDeviceSubClass 2 Abstract (modem)
    bDeviceProtocol 0 None
    bMaxPacketSize0 64
    idVendor 0x0483 STMicroelectronics
    idProduct 0x5740 STM32F407
    bcdDevice 2.00
    iManufacturer 1 TEST-ST
    iProduct 2 TEST MY HID
    iSerial 3 00000000001A
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 41
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xe0
    Self Powered
    Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 3 Human Interface Device
    bInterfaceSubClass 0 No Subclass
    bInterfaceProtocol 0 None
    iInterface 0
    HID Device Descriptor:
    bLength 9
    bDescriptorType 33
    bcdHID 1.11
    bCountryCode 0 Not supported
    bNumDescriptors 1
    bDescriptorType 34 Report
    wDescriptorLength 36
    Report Descriptors:
    ** UNAVAILABLE **
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 5
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 5
    Binary Object Store Descriptor:
    bLength 5
    bDescriptorType 15
    wTotalLength 12
    bNumDeviceCaps 1
    USB 2.0 Extension Device Capability:
    bLength 7
    bDescriptorType 16
    bDevCapabilityType 2
    bmAttributes 0x00000002
    Link Power Management (LPM) Supported
    Device Status: 0x0001
    Self Powered


    The only link I've found related to my problem on the web is this, however it lacks some explanations about what is done here...



    [EDIT]



    I have also tried to debug with HIDAPI:



    For some reason, the Report descriptor is not sent when the target is plugged.
    However, when I connect then disconnect the target (does not matter if I send a command or not) via HIDAPI, then the Report descriptor is populated in lsusb output:



    iInterface              0 
    HID Device Descriptor:
    bLength 9
    bDescriptorType 33
    bcdHID 1.11
    bCountryCode 0 Not supported
    bNumDescriptors 1
    bDescriptorType 34 Report
    wDescriptorLength 34
    Report Descriptor: (length is 34)
    Item(Global): Usage Page, data= [ 0xd0 0xf1 ] 61904
    (null)
    Item(Local ): Usage, data= [ 0x01 ] 1
    (null)
    Item(Main ): Collection, data= [ 0x01 ] 1
    Application
    Item(Local ): Usage, data= [ 0x20 ] 32
    (null)
    Item(Global): Logical Minimum, data= [ 0x00 ] 0
    Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
    Item(Global): Report Size, data= [ 0x08 ] 8
    Item(Global): Report Count, data= [ 0x40 ] 64
    Item(Main ): Input, data= [ 0x02 ] 2
    Data Variable Absolute No_Wrap Linear
    Preferred_State No_Null_Position Non_Volatile Bitfield
    Item(Local ): Usage, data= [ 0x21 ] 33
    (null)
    Item(Global): Logical Minimum, data= [ 0x00 ] 0
    Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
    Item(Global): Report Size, data= [ 0x08 ] 8
    Item(Global): Report Count, data= [ 0x40 ] 64
    Item(Main ): Output, data= [ 0x02 ] 2
    Data Variable Absolute No_Wrap Linear
    Preferred_State No_Null_Position Non_Volatile Bitfield
    Item(Main ): End Collection, data=none
    Endpoint Descriptor:


    Moreover, when I spy with udevadm monitor here is the output:



    KERNEL[25465.054769] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
    KERNEL[25465.055295] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
    KERNEL[25465.056409] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
    KERNEL[25465.056864] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
    KERNEL[25465.056944] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
    UDEV [25465.097179] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
    UDEV [25465.100961] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
    UDEV [25465.104350] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
    UDEV [25465.106807] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
    UDEV [25465.108620] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)


    And when I connect to the target with HIDAPI:



    KERNEL[25560.356084] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
    KERNEL[25560.356187] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
    KERNEL[25560.356278] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
    UDEV [25560.359579] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
    UDEV [25560.360677] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
    UDEV [25560.362515] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)


    There is no more activity when I disconnect. However the Report descriptor only appears in lsusb after HIDAPI is disconnected for the target.



    My guess is that something is blocking/missing right after the plug.
    The connection with HIDAPI triggers the sending of missing information, but I am not sure why the information is only available once HIDAPI disconnects...










    share|improve this question



























      0












      0








      0








      I am programming a USB-HID device based on STM32 CubeMX Mouse example.
      I made some modifications (interface, endpoints, report descriptor, etc using the CustomHID Class template) and I am currently testing enumeration.



      Everything seems to be OK except that the lsusb command fails to dump the report descriptor:



      $lsusb
      Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407

      $sudo lsusb -v -s 001:013

      Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407
      Device Descriptor:
      bLength 18
      bDescriptorType 1
      bcdUSB 2.01
      bDeviceClass 2 Communications
      bDeviceSubClass 2 Abstract (modem)
      bDeviceProtocol 0 None
      bMaxPacketSize0 64
      idVendor 0x0483 STMicroelectronics
      idProduct 0x5740 STM32F407
      bcdDevice 2.00
      iManufacturer 1 TEST-ST
      iProduct 2 TEST MY HID
      iSerial 3 00000000001A
      bNumConfigurations 1
      Configuration Descriptor:
      bLength 9
      bDescriptorType 2
      wTotalLength 41
      bNumInterfaces 1
      bConfigurationValue 1
      iConfiguration 0
      bmAttributes 0xe0
      Self Powered
      Remote Wakeup
      MaxPower 100mA
      Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 3 Human Interface Device
      bInterfaceSubClass 0 No Subclass
      bInterfaceProtocol 0 None
      iInterface 0
      HID Device Descriptor:
      bLength 9
      bDescriptorType 33
      bcdHID 1.11
      bCountryCode 0 Not supported
      bNumDescriptors 1
      bDescriptorType 34 Report
      wDescriptorLength 36
      Report Descriptors:
      ** UNAVAILABLE **
      Endpoint Descriptor:
      bLength 7
      bDescriptorType 5
      bEndpointAddress 0x01 EP 1 OUT
      bmAttributes 3
      Transfer Type Interrupt
      Synch Type None
      Usage Type Data
      wMaxPacketSize 0x0040 1x 64 bytes
      bInterval 5
      Endpoint Descriptor:
      bLength 7
      bDescriptorType 5
      bEndpointAddress 0x81 EP 1 IN
      bmAttributes 3
      Transfer Type Interrupt
      Synch Type None
      Usage Type Data
      wMaxPacketSize 0x0040 1x 64 bytes
      bInterval 5
      Binary Object Store Descriptor:
      bLength 5
      bDescriptorType 15
      wTotalLength 12
      bNumDeviceCaps 1
      USB 2.0 Extension Device Capability:
      bLength 7
      bDescriptorType 16
      bDevCapabilityType 2
      bmAttributes 0x00000002
      Link Power Management (LPM) Supported
      Device Status: 0x0001
      Self Powered


      The only link I've found related to my problem on the web is this, however it lacks some explanations about what is done here...



      [EDIT]



      I have also tried to debug with HIDAPI:



      For some reason, the Report descriptor is not sent when the target is plugged.
      However, when I connect then disconnect the target (does not matter if I send a command or not) via HIDAPI, then the Report descriptor is populated in lsusb output:



      iInterface              0 
      HID Device Descriptor:
      bLength 9
      bDescriptorType 33
      bcdHID 1.11
      bCountryCode 0 Not supported
      bNumDescriptors 1
      bDescriptorType 34 Report
      wDescriptorLength 34
      Report Descriptor: (length is 34)
      Item(Global): Usage Page, data= [ 0xd0 0xf1 ] 61904
      (null)
      Item(Local ): Usage, data= [ 0x01 ] 1
      (null)
      Item(Main ): Collection, data= [ 0x01 ] 1
      Application
      Item(Local ): Usage, data= [ 0x20 ] 32
      (null)
      Item(Global): Logical Minimum, data= [ 0x00 ] 0
      Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
      Item(Global): Report Size, data= [ 0x08 ] 8
      Item(Global): Report Count, data= [ 0x40 ] 64
      Item(Main ): Input, data= [ 0x02 ] 2
      Data Variable Absolute No_Wrap Linear
      Preferred_State No_Null_Position Non_Volatile Bitfield
      Item(Local ): Usage, data= [ 0x21 ] 33
      (null)
      Item(Global): Logical Minimum, data= [ 0x00 ] 0
      Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
      Item(Global): Report Size, data= [ 0x08 ] 8
      Item(Global): Report Count, data= [ 0x40 ] 64
      Item(Main ): Output, data= [ 0x02 ] 2
      Data Variable Absolute No_Wrap Linear
      Preferred_State No_Null_Position Non_Volatile Bitfield
      Item(Main ): End Collection, data=none
      Endpoint Descriptor:


      Moreover, when I spy with udevadm monitor here is the output:



      KERNEL[25465.054769] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
      KERNEL[25465.055295] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
      KERNEL[25465.056409] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
      KERNEL[25465.056864] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      KERNEL[25465.056944] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
      UDEV [25465.097179] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
      UDEV [25465.100961] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
      UDEV [25465.104350] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
      UDEV [25465.106807] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      UDEV [25465.108620] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)


      And when I connect to the target with HIDAPI:



      KERNEL[25560.356084] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      KERNEL[25560.356187] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
      KERNEL[25560.356278] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
      UDEV [25560.359579] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      UDEV [25560.360677] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
      UDEV [25560.362515] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)


      There is no more activity when I disconnect. However the Report descriptor only appears in lsusb after HIDAPI is disconnected for the target.



      My guess is that something is blocking/missing right after the plug.
      The connection with HIDAPI triggers the sending of missing information, but I am not sure why the information is only available once HIDAPI disconnects...










      share|improve this question
















      I am programming a USB-HID device based on STM32 CubeMX Mouse example.
      I made some modifications (interface, endpoints, report descriptor, etc using the CustomHID Class template) and I am currently testing enumeration.



      Everything seems to be OK except that the lsusb command fails to dump the report descriptor:



      $lsusb
      Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407

      $sudo lsusb -v -s 001:013

      Bus 001 Device 013: ID 0483:5740 STMicroelectronics STM32F407
      Device Descriptor:
      bLength 18
      bDescriptorType 1
      bcdUSB 2.01
      bDeviceClass 2 Communications
      bDeviceSubClass 2 Abstract (modem)
      bDeviceProtocol 0 None
      bMaxPacketSize0 64
      idVendor 0x0483 STMicroelectronics
      idProduct 0x5740 STM32F407
      bcdDevice 2.00
      iManufacturer 1 TEST-ST
      iProduct 2 TEST MY HID
      iSerial 3 00000000001A
      bNumConfigurations 1
      Configuration Descriptor:
      bLength 9
      bDescriptorType 2
      wTotalLength 41
      bNumInterfaces 1
      bConfigurationValue 1
      iConfiguration 0
      bmAttributes 0xe0
      Self Powered
      Remote Wakeup
      MaxPower 100mA
      Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 3 Human Interface Device
      bInterfaceSubClass 0 No Subclass
      bInterfaceProtocol 0 None
      iInterface 0
      HID Device Descriptor:
      bLength 9
      bDescriptorType 33
      bcdHID 1.11
      bCountryCode 0 Not supported
      bNumDescriptors 1
      bDescriptorType 34 Report
      wDescriptorLength 36
      Report Descriptors:
      ** UNAVAILABLE **
      Endpoint Descriptor:
      bLength 7
      bDescriptorType 5
      bEndpointAddress 0x01 EP 1 OUT
      bmAttributes 3
      Transfer Type Interrupt
      Synch Type None
      Usage Type Data
      wMaxPacketSize 0x0040 1x 64 bytes
      bInterval 5
      Endpoint Descriptor:
      bLength 7
      bDescriptorType 5
      bEndpointAddress 0x81 EP 1 IN
      bmAttributes 3
      Transfer Type Interrupt
      Synch Type None
      Usage Type Data
      wMaxPacketSize 0x0040 1x 64 bytes
      bInterval 5
      Binary Object Store Descriptor:
      bLength 5
      bDescriptorType 15
      wTotalLength 12
      bNumDeviceCaps 1
      USB 2.0 Extension Device Capability:
      bLength 7
      bDescriptorType 16
      bDevCapabilityType 2
      bmAttributes 0x00000002
      Link Power Management (LPM) Supported
      Device Status: 0x0001
      Self Powered


      The only link I've found related to my problem on the web is this, however it lacks some explanations about what is done here...



      [EDIT]



      I have also tried to debug with HIDAPI:



      For some reason, the Report descriptor is not sent when the target is plugged.
      However, when I connect then disconnect the target (does not matter if I send a command or not) via HIDAPI, then the Report descriptor is populated in lsusb output:



      iInterface              0 
      HID Device Descriptor:
      bLength 9
      bDescriptorType 33
      bcdHID 1.11
      bCountryCode 0 Not supported
      bNumDescriptors 1
      bDescriptorType 34 Report
      wDescriptorLength 34
      Report Descriptor: (length is 34)
      Item(Global): Usage Page, data= [ 0xd0 0xf1 ] 61904
      (null)
      Item(Local ): Usage, data= [ 0x01 ] 1
      (null)
      Item(Main ): Collection, data= [ 0x01 ] 1
      Application
      Item(Local ): Usage, data= [ 0x20 ] 32
      (null)
      Item(Global): Logical Minimum, data= [ 0x00 ] 0
      Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
      Item(Global): Report Size, data= [ 0x08 ] 8
      Item(Global): Report Count, data= [ 0x40 ] 64
      Item(Main ): Input, data= [ 0x02 ] 2
      Data Variable Absolute No_Wrap Linear
      Preferred_State No_Null_Position Non_Volatile Bitfield
      Item(Local ): Usage, data= [ 0x21 ] 33
      (null)
      Item(Global): Logical Minimum, data= [ 0x00 ] 0
      Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
      Item(Global): Report Size, data= [ 0x08 ] 8
      Item(Global): Report Count, data= [ 0x40 ] 64
      Item(Main ): Output, data= [ 0x02 ] 2
      Data Variable Absolute No_Wrap Linear
      Preferred_State No_Null_Position Non_Volatile Bitfield
      Item(Main ): End Collection, data=none
      Endpoint Descriptor:


      Moreover, when I spy with udevadm monitor here is the output:



      KERNEL[25465.054769] add      /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
      KERNEL[25465.055295] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
      KERNEL[25465.056409] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
      KERNEL[25465.056864] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      KERNEL[25465.056944] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
      UDEV [25465.097179] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2 (usb)
      UDEV [25465.100961] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
      UDEV [25465.104350] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
      UDEV [25465.106807] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      UDEV [25465.108620] add /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)


      And when I connect to the target with HIDAPI:



      KERNEL[25560.356084] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      KERNEL[25560.356187] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
      KERNEL[25560.356278] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)
      UDEV [25560.359579] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/usbmisc/hiddev2 (usbmisc)
      UDEV [25560.360677] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D/hidraw/hidraw3 (hidraw)
      UDEV [25560.362515] remove /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0483:5740.002D (hid)


      There is no more activity when I disconnect. However the Report descriptor only appears in lsusb after HIDAPI is disconnected for the target.



      My guess is that something is blocking/missing right after the plug.
      The connection with HIDAPI triggers the sending of missing information, but I am not sure why the information is only available once HIDAPI disconnects...







      usb stm32 hid hidapi lsusb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '18 at 14:52







      Coconop

















      asked Nov 22 '18 at 10:49









      CoconopCoconop

      2,97322041




      2,97322041
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429252%2fwhy-does-my-report-descriptor-is-unavailable-in-lsusb%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429252%2fwhy-does-my-report-descriptor-is-unavailable-in-lsusb%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          'app-layout' is not a known element: how to share Component with different Modules

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          WPF add header to Image with URL pettitions [duplicate]