cancel
Showing results for 
Search instead for 
Did you mean: 

About CubeMX using USB Host and Free RTOS and devices that cannot be identified by their Classcode (modems without real CDC implementation).

ABrid.1
Associate

 When using devices that cannot be identified by ClassCode (0xFF) you have to hack usbh_core.c on the HOST_CHECK_CLASS handling and rather filter on the idVendor/idProduct. I found a better way to handle it (much cleaner) registering some class with fake Classcode, and changing the device classcode when device configuration has been selected. The problem is when the device gets only one configuration (most of the time it is). at the HOST_ENUMERATION step there is a test that when the device expose only one configuration the host state machine jumps to the HOST_SET_CONFIGURATION directly. When the device gets more than 1 configuration it jumps to the HOST_INPUT state then to the HOST_SET_CONFIGURATION state BUT, it call the user callback with HOST_USER_SELECT_CONFIGURATION. Could it be possible to also call the user callback when there is only 1 configuration ? In the user callback I manage the HOST_USER_SELECT_CONFIGURATION state to switch the device classcode using my own algorithm so the class is found and everything is going well with my supported devices.

0 REPLIES 0