On Tue, 28 Dec 2004, Michele Bavaro wrote: > Hello everybody, > I'm currently working on a special signal collector. > The first problem is that it doesn't seem to comply with USB standards, > since standard device requests like usb_get_status() don't work well > (for example usb_get_status() requires a bitmap data buffer larger than > 2 bytes to complete).
That's a nasty problem. If the device doesn't even obey the standard, you'll have a very hard time trying to figure out what it's really doing. > Moreover, as far as I have not the peripheral detailed specification, > I'm trying to merely reproduce the behaviour it has under Windows. Then, > I used many sniffers (USB Monitor, WDM Sniff, Snoopy Pro) and I found > that the activation protocol foresees for "abort pipe" and "reset pipe" > requests. These latter are implemented by Windows DDK with > URB_FUNCTION_ABORT_PIPE and URB_FUNCTION_RESET_PIPE (see > http://www.osronline.com/ddkx/buses/usbstrct_1e0i.htm ). > How can they be reproduced with a Linux system call, like > usb_control_msg() or some other? Please consider that, following > someone's tip, I already tried usb_clear_halt() but it didn't work > (returns -75, EOVERFLOW).. > Could someone give suggestions? URB_FUNCTION_ABORT_PIPE has no direct equivalent in Linux. To abort all the URBs for a particular endpoint, you simply have to call usb_unlink_urb() for each URB. The equivalent of URB_FUNCTION_RESET_PIPE is indeed usb_clear_halt(). If you got -EOVERFLOW in response it means the device is _extremely_ non-compliant; it's not supposed to send back any data at all. You didn't say which version of Linux you are using. If you are working with 2.4, I suggest you upgrade to 2.6 instead. The USB support in 2.6 is much improved over the earlier kernels. Beyond that, the only suggestion I have is to find a better device (not very helpful advice, I know). Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
