I design a test case which aims to stress test the connected modem device.(Phone)
I recycle to send ping packet which carries high payload .
At the beginning of the test , it goes on smoothly . Later , the data sending on PC always fails with error code 0xC00000B5(NT status code IRP times Out ) and 0x00000000(USB error code) returned in IOWriteCompletionRoutine.
USB Analyzer indicates no packet data moves since this issue happens .
As WdfRequestSend returns OK , I suppose Endpoint in device works well.
Now I guess that receiveing buffer in device is full so that it have to put off the response to PC sending and accordingly PC have to delay all sending .
Do you have suggestion ?
> Now I guess that receiveing buffer in device is full so that it have to put off the response to PC sending
and accordingly PC have to delay all sending .
This response is called NAK and is handled on the hardware level without any software help.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Yes . I agree .
But actually , at this time , USB log indicates no packet was moving on bus , not to mentioned NAK …
I am confused about this fact …
Is it possible that client driver sends USB and Host controller doesn’t send them out because of some reason ? At this time , the connection isn’t broken .
Daniel Xie wrote:
Is it possible that client driver sends USB and Host controller doesn’t
send them out because of some reason ? At this time , the connection
isn’t broken .
If you’re not seeing any NAKs at all, then I would assume the pipe(s) need to be reset due to some error condition that occured (my guess, caused by broken device firmware).
You should always be seeing NAKs from your device as the client driver polls its IN pipe, and in this scenario I would expect it to be NAKing the OUT traffic too if it was not able…
- What time is proper to reset the EP ?
Currently , I can fetch error code in WriteCompleteRoutine: Status is IO_STATUS_TIMEOUT and USB status is 0 . What time is proper to reset EP ? Just reset it whenever I see these ERROR code ?
2 . What do you mean by “broken device firmware”. In addition to doing the reset , Can I locate the root cause according to the data traffic on bus ?
Thanks a lot .
xiedong_sl@126.com wrote:
- What time is proper to reset the EP ?
Currently , I can fetch error code in WriteCompleteRoutine: Status is IO_STATUS_TIMEOUT and USB status is 0 . What time is proper to reset EP ? Just reset it whenever I see these ERROR code ?
No, that’s not appropriate. Look, STATUS_IO_TIMEOUT is a *software*
error. It does not indicate a USB problem. It just means that the
request did not complete within the timeout value that you specified, so
WDF canceled the request for you. That could have been because the pipe
was stalled from an earlier request (although there are separate codes
for that), or it could be simply that the device did not have anything
to send to you in that time. If that were the case, then there is no
hardware error at all, and resetting the endpoint is not the right thing
to do.
The URB has its own status field. When you get the request back, is
there an error code in the URB?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Daniel Xie wrote:
What do you mean by “broken device firmware”.
I mean that the typical offshore handset USB firmware is of extremely low quality, if experience serves. Typically the CATC log from such a device will be blood red with bus errors…
In addition to doing the reset , Can I locate the root cause according
to the data traffic on bus ?
I doubt you can “root cause” this kind of error just by studying the traces from an analyzer, although it can surely give you hints to send you in the right direction…
To Roberts
USB status is 0 , which is fetched from returned URB
To All ,
Thanks a lot for the reply