Hello,

I have written a user-space driver for a USB1 spectrometer using libusb.  Now
there is a new version of the device, which uses USB2.  I have adapted my
driver for the new protocol that this device uses, but it doesn't work.  I
have sniffed the Windows driver, and saw one particular difference: the
sniffer sees events in this order:
- Read request for device.
- Write to device.
- Write succeeded confirmation.
- Read response from device, including data.

Because libusb is synchonous only, what I'm doing is:
- Write to device.
- Read request to device.
- Wait for response (which doesn't usually arrive, although occasionally there
  is an error response, so there's nothing wrong with the cable etc).

I do not really know about the details of the Windows sniffer, but looking at
the events, I think the problem might be that the device wants to reply
immediately, but didn't see a request, so discards its response.  Then when
there finally is a request, it doesn't reply anymore.  However, I don't know
if that is at all possible given the USB protocol.

My question is how I can solve this.  Would it help to make a kernel driver
for it?  Could I hack libusb to allow asynchronous reads?  Is there any chance
that that solves the problem?

Any help is welcome.

Thanks,
Bas Wijnen

Ps: Please CC me on replies, I am not subscribed to the list.

-- 
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
   in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://pcbcn10.phys.rug.nl/e-mail.html

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to