You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/02 05:43:07 UTC
[GitHub] [incubator-nuttx] btashton opened a new issue #3644: usbhost: Cannot handle multiple interface descriptors
btashton opened a new issue #3644:
URL: https://github.com/apache/incubator-nuttx/issues/3644
USB host driver cannot handle multiple interface descriptors. I ran into this when trying to use Logitech Unifying Receiver, which has three interface descriptors: `Keyboard`, `Mouse`, `None`. NuttX only supports the first one.
```
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 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 59
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 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 148
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 0x0008 1x 8 bytes
bInterval 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 98
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 2
```
Here is where we see the code handling this, with the limitation.
```
if (id.base == USB_CLASS_PER_INTERFACE)
{
/* Get the class identification information for this device from the
* interface descriptor(s). Hmmm.. More logic is need to handle the
* case of multiple interface descriptors.
*/
ret = usbhost_configdesc(buffer, cfglen, &id);
if (ret < 0)
{
uerr("ERROR: usbhost_configdesc failed: %d\n", ret);
goto errout;
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton edited a comment on issue #3644: usbhost: Cannot handle multiple interface descriptors
Posted by GitBox <gi...@apache.org>.
btashton edited a comment on issue #3644:
URL: https://github.com/apache/incubator-nuttx/issues/3644#issuecomment-831037560
I have part of this in a branch here to add libusb support. I may pull this part of the fix out as its own PR.
https://github.com/apache/incubator-nuttx/compare/master...btashton:libusb
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton commented on issue #3644: usbhost: Cannot handle multiple interface descriptors
Posted by GitBox <gi...@apache.org>.
btashton commented on issue #3644:
URL: https://github.com/apache/incubator-nuttx/issues/3644#issuecomment-831037560
I have part of this in a PR here to add libusb support. I may pull this part of the fix out as its own PR.
https://github.com/apache/incubator-nuttx/compare/master...btashton:libusb
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #3644: usbhost: Cannot handle multiple interface descriptors
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on issue #3644:
URL: https://github.com/apache/incubator-nuttx/issues/3644#issuecomment-903075537
@btashton it's very an exciting feature to simulate usb device on simulator. Do you have any progress?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org