[TriEmbed] USB RNDIS enumeration help needed
Trampas Stern
trampas at gmail.com
Thu Feb 27 08:50:04 CST 2025
I am trying to do USB RNDIS enumeration and having issues. I have googled
and read everything I can find and keep running into issues. I get the
enumeration working and it will work for days on my PC, then at some point
it will not work. I switch hubs, ports and it might work again for days,
then stop.
I have been using Saleae logic analyzer as well as USB protocol analyzer
(Total Phase Beagle device) and have been unable to figure out the issues.
My initial thoughts were that Microsoft was doing some
predictive analysis on device timing. That is, I noticed that if the USB
request from the host came in too quickly it would cause issues. I
figured that based on the packet NAKs that Microsoft might dynamically
change request timing to compensate for slower devices. I figure this
would maximize the bus bandwidth utilization by not sending packets that
most likely would be NAK'd. I am not sure if this is true or not, but
sounded reasonable? I since changed my device to be all interrupt driven
for fastest response. This addressed some issues, but not all of my
problems.
Now I seem to have hit another issue. The host sends an RNDIS Initialize
message, after which I setup device's USB peripheral to send the
RESPONSE_AVAILABLE message, however the host never seems to poll for the
RESPONSE_AVAILABLE and then timeout on the RNDIS Initialize message.
I have previously seen this behavior and found that if I delayed setting up
the RESPONSE_AVAILABLE message it would sometimes work. Specifically, I
would send the REPONSE_AVAILABLE using main loop verses right away in the
interrupt handler and it would work most of the time. This did not make
any sense as that as I understand it the host has to poll for the
RESPONSE_AVAILABLE so the timing of configuring peripheral to send message
should not matter, since it is all host driven system. As I understand it
the host does an interrupt polling messages to the RNDIS command end point
to request the RESPONSE_AVAILABLE. I am not seeing and polling message
from host (Windows) on the RNDIS interrupt end point. I do see EP0
polling, but not ones on the RNDIS command endpoint.
I was wondering if anyone had experience with USB and possibly could offer
some advice, education, or help. I do have all kinds of data captures and
logs etc..
Thanks!
Trampas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20250227/e33c4879/attachment.htm>
More information about the TriEmbed
mailing list