On Mon, 27 Jun 2005, coin wrote:

> HI, did you remember me? I can't with this.
> Now I get the next result after disconnect usbdevice, then connect,
> and send data bulk.
> 
> kernel: usb 2-1: usbfs: USBDEVFS_BULK failed ep 0x1 len 4 ret -22
> 
> 
> This is the code 
> 
>         fd = open("/proc/bus/usb/002/002", O_RDWR);
>       if(fd != -1) {
>               bulk.ep = 1;
>               bulk.len = 4;
>               bulk.data = data;
>               bulk.timeout = 1000;
>               ioctl(fd, USBDEVFS_BULK, &bulk);
>               perror("ioctl");
>               close(fd);
>       } 
> 
> Thank you

Do you issue the DISCONNECT and CLAIMINTERFACE ioctl calls again after the 
device is reconnected?  Remember, each time it connects the kernel will 
bind it to the hiddev driver -- which will prevent your program from using 
it.

Alan Stern



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to