Restricting USB devices on a per port basis. - Embedded

This is a discussion on Restricting USB devices on a per port basis. - Embedded ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Restricting USB devices on a per port basis.

  1. 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.

  2. Re: Restricting USB devices on a per port basis.

    On Mar 26, 10:39 pm, ih8s...@yahoo.com wrote:
    > 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.

    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!

  3. Re: Restricting USB devices on a per port basis.

    ih8sp4m@yahoo.com schreef:
    > 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.

    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 Thread