On 26-Mar-01 Tony Hoyle wrote:
> Benoit PAPILLAULT wrote:
> 
> 
>> Anyway, I can't send or receive data on this DAMNED F@#$%ING endpoint 7.
>> I'm very new to USB programming in fact, I'm sure there is an obvious
>> point I'm missing.
>>
> I'd guess you'd use the USBDEVFS_SUBMITURB and USBDEVFS_REAPURB ioctl's. 
>   You pass it a usbdevfs_urb, which contains an endpoint.

Up to now, I was using libusb and functions like usb_bulk_read(),
usb_bulk_write() and usb_control_msg(). All is fine, except all those functions
have a timeout, which made them unusable for receiving.

I tried directly the ioctl USBDEVFS_SUBMITURB (don't know what is the use of
USBDEVFS_REAPURB). I found little documentation, so I read and reread the
kernel sources. But I only get crashes at random time and many stranges
messages in my /var/log/messages.

Maybe you can help me on this part or point me to a source sample using
USBDEVFS_SUBMITURB and USBDEVFS_REAPURB.

Maybe you can answer few questions :

1. If the USB device sends data to the PC and no one reads it, does the data
get lost?

2. What is the way to read data WITHOUT knowledge of the size? Up to now, I use
usb_bulk_read() which require the exact amount of data.

3. Sometimes usb_bulk_write() timeout, what does it means? Is it possible for a
USB device to refuse data? Is there the notion of "closed" endpoint? 

4. How do I know the status of endpoint? I've seen usb_resetep(),
usb_clear_halt(), what is the meaning?

5. What is the use of alternate setting? If I change this setting, does it
"reset" the associated endpoint?

You can direct me to precise chapter of USB specs 1.1, I have a printed copy
and already read chapter 4,5,9.

TIA
Benoit


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to