Fabian Weiss wrote:
> I try to communicate with an USB device: http://nopaste.info/bc655859b3.html
> I want to read the 42 bytes of  bEndpointAddress 0x83  EP 3 IN.
> Therefore I installed libusb(x) under my Linux and wrote this little
> programm: http://nopaste.info/98c35ab092.html
>
> I dont understand why it doesnt work, so I am asking you. My output is:
> ..
> Device Opened
> Claimed Interface
> libusb:error [submit_bulk_transfer] submiturb failed error -1 errno=2
> read Error: -1
> Data read:
> Released Interface
>
> :(
> Can somebody tell my what I am doing wrong?

Yes:
    r = libusb_interrupt_transfer(dev_handle, 3, buf, 10, &transferred,
100000); 

If you want endpoint 0x83, then you need to ask for 0x83, not 3.  Those
are two completely different endpoints.  There is no relationship
between endpoint 0x03 and 0x83.  It's NOT "two directions of the same
endpoint", as many people seem to think.

Also, if you want 42 bytes, you should ask for 42 bytes, not 10.  In
general, you should ALWAYS ask for a multiple of the endpoint's packet size.

That's a HID endpoint.  Are you certain there will be HID traffic
waiting for you, and that you don't need to send a report request first?

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to