Restricting USB devices on a per port basis.

Hello.

I am working on a linux based device that will have two USB ports physically placed in two different places. One of them is to allow for dumping of recorded data to an external USB storage device. The other is to facilitate service by connecting a keyboard (the device will have a touch screen for normal user interaction).

The question is: is there a way to restrict the devices I connect to each port (USB storage in one, keyboard only in the other?)

Thank you very much in advance for your inputs.

Elder.

Reply to
ih8sp4m
Loading thread data ...

Only way I know is to get your hands dirty by changing the host USB device driver on your linux kernel. You can even read Vendor ID, Product ID, EP type .....etc and have code that takes conditional action on them. But this approach may take a lot of time for development and testing!

Reply to
Janaka

If you use hotplug to detect and load drivers you can modify the udev/hotplug script(s). Hotplug gives you the info on which port the device connected, based on that you can load or not load the usb-driver for the device. I use this trick to allow a USB memory stick only in one special usb socket.

Best regards, Edwin

Reply to
edwin ng

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.