Mapping 2 USB devices to defined path

Issue

I’ve listed my USB devices to their serial ports by searching for them.

ls -l /dev/ttyACM*

However as I plug and unplug the USB devices (Conbee II & Z-Stick Gen 5+) they swap ports causing my containers to crash as I restart.

Any way to map these to a specific path?

I tried to set the variables inside the container to be mapped to the specific devices as I list them with the ls command. After I do so, they tend to swap around however.

Solution

Instead of using /dev/ttyACM*, use the symbolic links that the kernel creates for you in /dev/serial/by-id.

Answered By – David Grayson

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published