On Mon, 16 May 2005, coin wrote:

> ioctl(fd, USBDEVFS_DISCONNECT);
> perror("ioctl");
> 
> this is the result
> ioctl: Inappropriate ioctl for device

You don't have to use the DISCONNECT ioctl.  Instead you can just do: 
rmmod usbhid.

If you do want to use the ioctl, you need to do it correctly:

        struct usbdevfs_ioctl ctrl;

        ctrl.ifno = 0; /* Interface number */
        ctrl.ioctl_code = USBDEVFS_DISCONNECT;
        ioctl(fd, USBDEBVFS_IOCTL, &ctrl);

> I am watching tha the firmware is set for interrupt tranfer and this C
> Code is for bulk transfer.  This care? If this is the case, what I've
> to do for change the C code fot interrupt tranfer?

It doesn't matter.  It's okay to use USBDEVFS_BULK for an interrupt 
transfer.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
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