This question is twofold:
1- How do you manually disconnect the driver from the USB device and connect another? For example, I have a device that automatically uses the USB storage driver when connected.
// usbview output
Vendor Id: xxxx Product Id: xxxx ... Number of Interfaces: 2 Interface Number: 0 Name: usb-storage Number of Endpoints: 2 ... Interface Number: 1 Name: (none) Number of Endpoints: 2 ...
I don't want to use the usb-storage driver, so I have an application running on the host in which I use the libusb library to disconnect the USB storage driver, and then I require an interface. Then I can send data to applications and applications running on my USB device and on my Linux operating system.
How do you manually disconnect a driver from outside the application?
2- How to automatically assign a driver to connect to the device plug-in. Currently, I have set up the udev rule to automatically set device permissions.
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666"
Can udev rules be used to assign drivers to specific interfaces on a USB device? For example, if I wanted usbnet to be used automatically on interface 0 instead of usb-storage, is this possible in udev?
Thanks,
(I'm a little confused about how StackExchange works with it on different sites, or if they are all the same. This is a Linux issue, so it has also been published on Unix and Linux. Forgive me if it should not be published here too, but StackOverflow also handles Linux, so ...)
linsek
source share