-
Notifications
You must be signed in to change notification settings - Fork 110
Description
Hello,
While trying to use USBX with Netxduo with the RNDIS class for Ethernet over USB I noticed that _ux_network_driver_link_up is never called from the RNDIS class functions. For example for the CDC ECM class it is called in _ux_device_class_cdc_ecm_activate when the layer is up (cdc_ecm -> ux_slave_class_cdc_ecm_link_state == UX_DEVICE_CLASS_CDC_ECM_LINK_STATE_UP). This was preventing the Netx interface associated to the RNDIS interface to go up.
As a workaround, I added these lines near the end of _ux_device_class_rndis_activate :
if (rndis -> ux_slave_class_rndis_link_state == UX_DEVICE_CLASS_RNDIS_LINK_STATE_UP)
{
/* Communicate the state with the network driver. */
_ux_network_driver_link_up(rndis -> ux_slave_class_rndis_network_handle);
}
It works well and I am able to use the Netx interface normally for IP, TCP...
But I guess I'm not the first to use the RNDIS class so this is not a bug in the library. Is the application supposed to do something specific in a callback, like the one given in the parameter ux_slave_class_rndis_instance_activate ?