I have a project where I need to connect multiple arduino boards on my RPi. I succeeded to do that with USB connection. My problem is that I have to determine the serial ports to which the boards are connected, dynamically.
I googled that and I found stuff like lsusb. This command returns id's of devices but i need something like /dev/ttyACM0
...
I identified the arduino boards with ls /dev/serial/by-id/
, but also with this, I do not get the result that I needed(the name of the port). Is there some command that I can use to give me a result set (arduino id, /dev/tty...
). Thanks
1 Answer 1
What you need to do is to lookup udev rules I am away from my machine at the moment, but what you do is to use lsusb to determine the serial number of the arduino Then in udev rules file you setup a symbolic link that gets created everytime that arduino gest plugged in So instead of trying to figure out what /dev/ttyACM? is attached to what arduino. You end up with a symlink like /dev/ttyArduino001 that always points to the same arduino board. Even after a reboot If you need more info say so and I will lookup my udev rules