-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device enumeration fails for composite device of NCM and two HID #32
Comments
Can you send me
Note that the HID class currently doesn't have a configuration option for indicating 101 keyboard (or mouse) support, for that you would need to patch the code yourself in Experiment with different USB Vendor and Product IDs, maybe the OS has cached some drivers for your IDs from your previous attempts, and rejects the new descriptor. |
Thank you so much for looking into this. You mention USB traces. Do you happen to know a good way to create them on Windows or Linux? |
The usbview result has this line which should be alarming:
So please check if you still get this error when the enumeration succeeds, and try to get closer to the root cause. You can use WireShark with usbpcap to capture USB communication. |
Important new insight: When we mount the interfaces on the HS port rather than the FS port of our STM32F429 eval board, all three interfaces are working fine. |
We found the problem. The port we were using constrains us to three bidirectional endpoints, not including the control ep. We feel very sorry in case you did additional research while the answer was under our nose. We were unaware of the fact that a peripheral can impose a restriction on endpoints. |
We are observing that Windows and iOS both fail to enumerate our device. Windows reports a “Device not migrated due to partial or ambiguous match” message.
Initialization is given as:
/* All fields of Config have to be properly set up /
hid_if.Config.InEpNum = 0x83;
hid_if.Config.OutEpNum = 0x03;
hid_if.App = &hid_app;
keyboard_if.Config.InEpNum = 0x84;
keyboard_if.Config.OutEpNum = 0x04;
keyboard_if.App = &keyboard_app;
ncm_usb_if->Config.InEpNum = 0x81;
ncm_usb_if->Config.OutEpNum = 0x01;
ncm_usb_if->Config.NotEpNum = 0x82;
/ Mount the interfaces to the device */
USBD_NCM_MountInterface(ncm_usb_if, UsbDevice1);
USBD_HID_MountInterface(&hid_if, UsbDevice1);
USBD_HID_MountInterface(&keyboard_if, UsbDevice1);
And here is my configuration:
#define USBD_MAX_IF_COUNT 8
#define USBD_EP0_BUFFER_SIZE 512
#define USBD_HS_SUPPORT 0
#define USBD_SERIAL_BCD_SIZE 0
#define USBD_MS_OS_DESC_VERSION 2
#define USBD_CDC_NOTEP_USED 0
#define USBD_CDC_CONTROL_LINE_USED 0
#define USBD_CDC_BREAK_SUPPORT 0
#define USBD_DFU_ALTSETTINGS 0
#define USBD_DFU_ST_EXTENSION 0
#define USBD_HID_ALTSETTINGS 0
#define USBD_HID_OUT_SUPPORT 1
#define USBD_HID_REPORT_STRINGS 0
It is important to note that as soon as we drop any of the three components, the device is successfully enumerated. Only with all three present do we encounter this problem.
Could you please advise?
The text was updated successfully, but these errors were encountered: