0

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

Bex
2,9293 gold badges27 silver badges34 bronze badges
asked Jul 10, 2017 at 17:47

1 Answer 1

0

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

answered Jul 13, 2017 at 1:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.