Quite often I found myself needing static device names in Linux, especially when using ROS. As an example imagine having two sensors of a same type that yo connect to your PC. Now, if you don’t map your ports in any way you might end up with devices being mapped to /dev/ttyACM0 and /dev/ttyACM1, depending which one was connected first.
Let’s say your sensors are at different positions on the robot. If you want to make sure that you are using the proper device in your code you can either:
- Unplug and plug back the sensors again until you get the names you want
- Assign a static name to a port and be done with it
If you want to learn about the option 2 then read on.
Otherwise keep playing with your cables!