|
From: Dan E. <Dan...@ne...> - 2006-05-04 08:40:49
|
The call to bulk transfer will return an error, i.e. a return code less than 0. It's up to you how you recover. The device behaviour depends upon what chip you are using, but when it's plugged in again the OS will execute a USB reset, so the device will see that. =20 Whether you implement timeouts is completely up to you and your hardware configuration. It's probably a good idea because if the device gets stuck and stops consuming data, the host will keep retrying to send it, and as long as the device has died completely, the host won't stop. =20 Dan. ________________________________ From: lib...@li... [mailto:lib...@li...] On Behalf Of Andrew Xiang Sent: 03 May 2006 21:42 To: lib...@li... Subject: [Libusb-win32-devel] USB unplugged What happens when I am doing data bulk transfer and the USB cable is unplugged? How will the Host software know and recover? And how will the firmware recover. I assume when the host software recover, it can send over RESET tell the device to recover also?=20 =20 I guess it need to put some sort of timeout in the device also for the RX/TX. =20 =20 =20 -Andrew =20 |