I'm betting on a device that NAKs forever. Your software can
detect this condition by setting the last two parameters to
IOUSBInterfaceClass::WritePipe, ( "noDataTimeout" and
"completionTimeout" ) appropriately. Recovery in this case might
consist of issuing some type of protocol reset to the device, or if
that fails, actually using a ResetDevice (a very heavy hammer).
"noDataTimeout" - Specifies a time value in milliseconds. Once the
request is queued on the bus, if no data is transferred in this
amount of time, the request will be aborted and returned.
"completionTimeout" - Specifies a time value in milliseconds. Once
the request is queued on the bus, if the entire request is not
completed in this amount of time, the request will be aborted and
returned.
Regards,
David Ferguson
USB Software Team
Apple
On Mar 2, 2007, at 2:19 AM, Steve Baxter wrote:
Hi,
We very intermittently get a hang in our software when writing to a
particular device. It will work fine for days talking to the
device many times per second, but then suddenly it will fail with
this callstack:
Unfortunately the customer and the troublesome device are many
thousands of miles away. Does anyone have any clues as to what
might cause a hang like this in WritePipe()? This is probably a
problem at the firmware end, but we would like to give the
manufacturers some clues if we can!
Cheers,
Steve
Steve Baxter
Software Development Manager
Improvision
+44-2476-692229
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden