Hi everyone,
I have a user space application that uses USBDEVFS_BULK ioctl() to
communicate with a device. The USB implementation on this device appears
to be "fragile". From what I can see, the device stops responding when
it receives a data packet with (size % 512) == 0. The behaviour appears
to be consistent with the device not noticing that the last 512 byte
packet was delivered. This results in the device no longer responding to
further USB traffic or the protocol state being out of sync and
eventually the device firmware will completely crash, requiring a
lengthy power cycle and fsck on reboot.
From what I can see, the URB_ZERO_PACKET flag appears to address this
issue, however one needs to set this flag on the URB itself. This is not
possible when using USBDEVFS_BULK, since the URBs are managed by the
underlying driver. Is there a way of somehow passing the URB_ZERO_PACKET
flag through usbfs?
If not, what's the recommended process for dealing with this type of
device? I'd rather address this from user space before resorting to
writing a device driver. Will an USBDEVFS_BULK with
usbdevfs_bulktransfer.len = 0 have the same effect?
Thanks,
Peter Urbanec
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel