Sorry guys, thanks for your perseverance so far : )

Greg: where you wrote: 
>       In order for a device to bind successfully with a driver, that
>       driver must already support that device. This is why you can not
>       just arbitrarily bind any device to any driver.
It sounds like a chicken or the egg type scenario to me where libusb cannot
access the device to support it until it is bound to usbfs but you can't
bind it to usbfs unless it is supported ?

I am keen to solve my problem but I am also very keen to gain knowledge on
how the whole system hangs together. Can someone describe the chain of
events where libusb is concerned, my thought pattern was along the line of:
You could manually bind anything whatsoever to /sys/bus/usb/drivers/usbfs,
it is simply a portal which exposes resources to the next level up. You
could then use libusb to access any of the device's resources without
having to use ioctl() calls etc. Your actual program then talks to libusb
to get things done. 

Greg, I just noticed that you were the author of pretty much all of the
info I have read so far. Thanks for putting this kind of info on the web,
it is an incredibly useful service to the global community.

Alan: Here is what happens the first time and second time ( as they seem to
differ ) that I run the binary that controls the device ( Velleman k8055
usb io board )

[EMAIL PROTECTED] ~]# k8055 -p:3
Velleman Device Found @ Address 002 Vendor 0x010cf Product ID 0x05503
Got driver name: usbhid
Disconnected OS driver: No error
Found interface 0
Took over the device
Read retry
Read retry
Read retry
Write retry
Read retry
Read retry
Read retry
Write retry
Read retry
Read retry
Read retry
Write retry
Could not open the k8055 (port:3)
Please ensure that the device is correctly connected.

[EMAIL PROTECTED] ~]# k8055 -p:3
Velleman Device Found @ Address 002 Vendor 0x010cf Product ID 0x05503
get driver name: could not get bound driver: No data available
Found interface 0
Took over the device
Read retry
Read retry
Read retry
Write retry
Read retry
Read retry
Read retry
Write retry
Read retry
Read retry
Read retry
Write retry
Could not open the k8055 (port:3)
Please ensure that the device is correctly connected.

Port 3 is a jumper based identifier on the io board, and I am connecting to
the corect port

Cheers
Nick


On Mon, 4 Feb 2008 12:09:41 -0800, Greg KH <[EMAIL PROTECTED]> wrote:
> On Tue, Feb 05, 2008 at 08:49:01AM +1300, [EMAIL PROTECTED] wrote:
>> 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/ ?
> 
> Not at all, see what I wrote there at the end of the article:
>       In order for a device to bind successfully with a driver, that
>       driver must already support that device. This is why you can not
>       just arbitrarily bind any device to any driver.
> 
> 
> You _NEVER_ want to unbind the main "usb" driver from a device.  You
> could want to bind usbfs to an "interface" and do that through sysfs.
> But if you do that, you still need to use C code to interact with the
> usbfs interface, so it doesn't buy you anything extra.
> 
> The whole sysfs bind/unbind interface is for drivers that merely need a
> new device id added to them, or multiple drivers that can handle the
> same type of device.  Then, userspace can move the interaction around if
> needed.
> 
> Again, this isn't the proper interface for usbfs.  Use the examples you
> previously referred to, they show the correct way to do this, using
> libusb.
> 
> good luck,
> 
> greg k-h

-
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