Gotcha, thanks for replying Alan

So is that the final word, you can't bind devices to drivers via the shell
? You have to compile a program in order to bind a device to a driver ?

Does this conflict with http://lwn.net/Articles/143397/ ?

It's just that I am OK with bash but haven't done much C/C++

For the device I am using I already have the binary that talks to libusb.
And I already have a running implementation of libusb. I thought that all I
was missing was having the device tied to usbfs so that libusb could use it
( am I right in the asumption that libusb needs to work through usbfs
rather than the other drivers ? )

"Device tied to USBFS" (missing) ----> "Libusb in place" (got it) ----> 
"Binary which talks to libusb" (got it)

Thanks once again
Nick

On Mon, 4 Feb 2008 10:36:51 -0500 (EST), Alan Stern
<[EMAIL PROTECTED]> wrote:
> On Mon, 4 Feb 2008, Nick Frantzen wrote:
> 
>> Hi Guys ( and girls ),
>> From the "teach a man to fish" train of thought I've done lots of
> homework
>> but I still can't get manual USB driver binding to work!! You guys are
> my
>> last resort, please help me to understand what's happening here.
>>
>> I need to be able to bind a device to the /sys/bus/usb/drivers/usbfs
> driver
>> instead of the /sys/bus/usb/drivers/usb driver.
>> This is because the device that I am connecting uses libusb and libusb
> needs
>> to talk through the usbfs driver.
>>
>> I can use the following command to succesfully unbind the device from
> the
>> /sys/bus/usb/drivers/usb driver:
>> [EMAIL PROTECTED] /]# echo -n "3-1" > /sys/bus/usb/drivers/usb/unbind
>> The "driver" symlink disappears showing that the unbind works, all good.
> 
> No, not good.  You must not unbind this driver if you want to use the
> device.
> 
>> But... the following command to bind to the new driver throws an error:
>> [EMAIL PROTECTED] /]# echo -n "3-1" > /sys/bus/usb/drivers/usbfs/bind
>> -bash: echo: write error: No such device
> 
> That's because you don't bind usbfs to a device through sysfs.  You
> bind it by running a program that calls the USBDEVFS_CLAIMINTERFACE
> ioctl.
> 
> Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to