How unique Linux -/dev/serial/by-id is
question is, is
the content of /dev/serial/by-id unique?
Essentially, the problem is that I want to connect several (two or more) Arduinos (possibly of different types, but they may all end up being Leonardos) to the Raspberry Pi to implement an automated system.
I’ll use a serial interface to communicate between the Raspberry Pi and the Arduinos in Python. I’ve run this on one of the leonardos (currently I only have one):
udevadm info -a -n /dev/ttyACM0| grep serial 0000:00:1d.0
Is this the only serial number for my serial connection to the Pi? Can I rely on it to create a UDEV rule to assign a specific mount point, or have a unique and reliable mount point already been created in /
dev/serial/by-id/ that I can use instead of hacked-udev rules?
It’s not always unique. In my experience, if you buy a cheap arduino clone from China, they mostly won’t bother generating unique IDs for each device. The same applies to every device. If the manufacturer does not bother, then the devices will be the same. I ended up just using bypass and symbolic linking it.