|
From: Alan S. <st...@ro...> - 2009-10-12 01:49:47
|
On Sun, 11 Oct 2009, Kustaa Nyholm wrote: > Hi Alan, > > thanks for responding. > > Below is some output/code. ... > USB_device device = findDevice(0x0FDE, 0xCA01, -1); //Ohio scientific > assertOk(device != null ? 0 : NON_STD_ERR, "findDevice"); > > USB_dev_handle dev = usb_open(device); > assertOk(dev != null ? 0 : NON_STD_ERR, "usb_open"); > > //ret = usb_detach_kernel_driver_np(dev, 0); > //assertOk(ret, "usb_detach_kernel_driver_np"); > > ret = usb_set_configuration(dev, 0); > assertOk(ret, "usb_set_configuration"); > > //ret = usb_claim_interface(dev, 0); > assertOk(ret, "usb_claim_interface"); ... The problem is easy to fix. You should not call usb_set_configuration() -- especially with a configuration value of 0. If you do insist on calling it, then the configuration value (the second argument) must be 1 and you should call it _before_ calling usb_detach_kernel_driver_np(), not after. Alan Stern |