|
From: Xiaofan C. <xia...@gm...> - 2007-06-07 00:57:46
|
On 6/7/07, Bertrik Sikken <be...@si...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Stephan Meyer wrote: > > Try to replace: > > > > uci = usb_claim_interface (udev, 0); > > > > with > > > > usb_set_configuation(udev, 1); > > uci = usb_claim_interface (udev, 0); > > > > It should work then. > > I think I recently saw a recommendation on the libusb list to NOT > do an explicit usb_set_configuration. If I remember correctly > Linux already picks a configuration for you (usually devices > only have one configuration anyway). I believe that recommendation is wrong and for old version of Linux. Under Linux, often it is necessary to detach the kernel driver (eg: usbhid) before libusb can functional. This may have something to do with problems happened when calling usb_set_configuration under Linux. > What is the proper thing to do when writing something for > both Linux and Windows? > I believe what Stephan recommended is correct. |