From: Graeme G. <gr...@ar...> - 2010-11-18 01:37:43
|
I've come across a timeout issue with the winusb driver. I'm not sure if this has been fixed in the current git code, but I suspect not. There are three problems I've come across: 1) The default timeout for a control pipe in winusb is 5 seconds. I am driving a device that needs a much longer timeout than this (240 seconds), and the libusb timeout value is being overridden by the winusb default. It needs to be set to 0 using WinUsb_SetPipePolicy( ..,PIPE_TRANSFER_TIMEOUT,..) in order that the libusb API work as expected. 2) The code in windows_usb.c that calls WinUsb_SetPipePolicy(), does so before the end points are set in usb_interface[iface]. This means that they never do anything. So that block of code needs to be moved somewhere else, such as into windows_assign_endpoints(). 3) The end point list doesn't include the control end point, so the control end point timeout can't be set by iterating through the end point list. The timeout change needs to address end point 0 explicitly. Graeme Gill. |