Hi, On 02/11/2011 04:43 PM, Alan Stern wrote:
Hans: Since you're thinking about the problems involved in exporting USB devices over the network, here are some ideas you should be aware of. The USB core is set up to use two levels of drivers for every USB device: one driver for the device itself and then a separate level of drivers for all the device's interfaces. When we talk about "USB drivers", we really are referring to the interface drivers -- things like usbhid, usb-storage, btusb, and so on. There is only one higher-level "USB device" driver, named simply "usb" although it is sometimes referred to as "usb-generic" (the code is in drivers/usb/core/generic.c). You can see it in /sys/bus/usb/drivers. It's mostly a placeholder; about the only significant thing it does is choose a default configuration to install when a device is first probed. All along I have thought we could have an alternative driver, one that would do something with a USB device other than make it show up on the system in the usual way. The most obvious other possibility is to export the device over the network. I'm not sure if this approach is really practical, but perhaps you can make it work.
Interesting, but I must say that for the accessing of the real device end of the network redirection pipe, I'm sofar happy with usbfs. The setting of a configuration by the usb-generic device driver can be problem (hasn't been in my testing sofar, but I've no multi config devices). But that can be stopped by claiming the hub port. Actually currently I'm using libusb and not usbfs directly, which as an added bonus makes me real device (usb-host in my terms) accessing code more or less platform independent. I realize libusb will need some work on other platforms then Linux to make this all work, but improving libusb in general seems time better spend, then writing platform specific usb access code for all platforms in my own code. Thanks & Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html