I’m using the DDK to develop a USB class driver for a CDC ECM device. The attach callback is invoked and collects all the various endpoints & performs a set interface (The device has a altsetting.) and this all works fine. No errors or bad statuses.
Other threads within the driver then setup URB for TX and RX.
I’ve noticed the following odd behaviour:
a) Plug in device.
b) Start driver.
- everything is detected correctly.
c) Start bulk RX and TX IO in other threads (After setup.)
d) TX IO - after two or three sends, the call to udbd_io never returns.
(I receive no RX data on the receive URB.)
HOWEVER, if I do the following:
a) Start driver.
b) Plug device in…
c) Same as above - callbacks, setup, and threads start IO.
The TX io works, and I get responses from the device (A CDC_ECM device.) consisting of packets coming back and packets going out.
It’s QNX 6.4.1.
There’re no other USB device drivers running.
Why should the order cause an issue? I don’t get any errors when I open the pipes and select the interfaces. If I put timeouts on the USBD_IO, I get timeouts as expected… Could there be some strange timing issue here? Could it be the device? (The same device works fine on Linux - and comparing drivers, I can’t really see much difference apart from the fact that you have to use the usb callbacks to be able to set interface.)