5

On Linux, if you have more than one USB TTY device, the USB port name (/dev/ttyUSBx) changes every time one is plugged in, and there's no easy way to know the new name without going and looking through dmesg. It's trivial to set up a udev rule that creates a custom symlink so that my Arduino's FTDI can always be accessed through e.g., /dev/ttyArduino, and this is the standard procedure for persistent access to USB devices.

However, I can't make the IDE accept anything other than the /dev/ttyUSBx names. Even directly editing preferences.txt is ignored.

Is there any way to instruct the IDE to use custom port names in order to access the Arduino through a symlink or other persistent name?

Greenonline
  • 3,152
  • 7
  • 36
  • 48
Autumn
  • 193
  • 1
  • 6

2 Answers2

2

Consider using a device name of form ttyUSBnn, where nn is fairly large. For example, in /dev you could say

sudo ln -s ttyUSB1 ttyUSB77

Then, ttyUSB77 shows up in the IDE's ports list and can be selected.

(I don't know how to set up that link using the udev system, but imagine it can be done.)

James Waldby - jwpat7
  • 8,920
  • 3
  • 21
  • 33
2

Think the other way.

If your device has a port name, that is not supported by the IDE, you can create an additional (static) symlink /dev/USBx that you can identify and select in the arduino IDE.

And yes, it is quite easy to make all of your arduinos unique to udev.

moestly
  • 347
  • 2
  • 9