Hello Isaac,
First I'd like you to know that I have solved my problem in stepping in a lot in the KSDK USB library (4 long weeks...).
So The probleme was simple to solve once I have understood how things "could" work and not "should" work.
The CDC Host driver is requesting two differents interfaces: one for the CDC ACM and one for the CDC Data.
So, in the DriverInfoTable there are two entries, with two differents callback. That's good enough for most USB devices but not for modems that generaly expose a lot of interfaces with class, subclass and protocol equal to 0xFF, that is, vendor specific.
I have 4 USB modems in here, and each one got specific interfaces.
First one got 2 CDC ACM and 2 CDC Data :
To solve carrying this modem I have updated the usb_host_cdc_acm_event callback to deal with it this way :
int the switch case USB_CONFIG_EVENT:
Simply, recast the dev_hanle to a dev_instance_t* and the intf_handle to a usb_device_interface_struct_t*
then test that this is my product : if (dev_ptr->dev_descriptor.idVendor[1] == 0x1e && dev_ptr->dev_descriptor.idVendor[0] == 0x2d)
and test that this is the first interface : if (intf->lpinterfaceDesc->bInterfaceNumber == 0) {
if so, I set the acm_intf_handle and that's enought for the acm part.
Next I have updated the usb_host_cdc_data_event callback to also react on the good interface. Same cast, same test except on the requested interface.
And everything is ok.
The 3 other modems got some vendor specific class, and specifically, they all have only one interface that handle the 3 requested endpoints (ctrl, in and out).
To deal with those modems I have added an entry in the DriverInfoTable like this :
// QUECTEL UC15
{
{0xC6,0x05},
{0x90,0x90},
0xFF, 0xFF, 0xFF, 0, mycallback
}
same for SIERRA MC8092 and HUAWEI MU709S, but this is not enought. I had to update the class_interface_map driver, allocate a fake ACM controller, pepper, salt, mix everything et voilà ! It works.
Thanks,
Alain.
PS : I don't think I'll go to SDK 2.0 since everything has changed ...