After updating to 1.8.5 (while upgrading Fedora 25->27) section ports of arduino IDE does not find any symlinked serial ports any more.
It shows only physical devices list of /dev/ttyUSBX
On earlier version(s) I was able to use symlinked (/dev/ttyUSB50) for arduino and ESP devices. I have tried also smaller number 9 for symlink without any help.
All hits I get by googling are nearly 10 years old. Perhaps I'm using wrong search words, but have tried quite many.
Now I have to go through all serial devices after reboot of PC to get conneciton. They seems to change every time.
I use symlinked serial devices also for other programs (not java based) and they work as expected.
I have found some search hits that say that this may be a java security issue, but I have not found any "fresh" hit, or proper explanation how to resolve this annoying issue.
Linux hamtpad 4.16.11-200.fc27.x86_64 #1 SMP Tue May 22 18:36:25 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Fedora release 27 (Twenty Seven)
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
I have a workaround that allows symlinked ports to be found and inititalized.
create symlink to udev/rules.d to make a usefull name for arduino serial port. I have used "/dev/ardu"
test that symlinking works as should
edit arduino ide startup script. It is located in /usr/bin/arduino. You need to use sudo to access that file.
sudo nano /usr/bin/arduino
AT the start of file, after line "#!/usr/bin/env bash" add following lines:
myport=$(ls -l /dev/ardu | awk -F" -> " '{print$2}')
sed -i s/"serial.port="./"serial.port=/dev/"$myport/g ~/.arduino15/preferences.txt
sed -i s/"serial.port.file="./"serial.port.file="$myport/g ~/.arduino15/preferences.txt
Save file
Test.
Works fine with my Fedora 27 and arduino 1.8.5
HOW IT WORKS:
First device file is listed with "ls -l" that shows where the symlink points. That part is extracted with awk and placed as content of variable called $myport.
Sed is used to find line "serial.port=" from ~/.arduino15/preferences.txt and it is replaced with line that uses $myport as device name.
Sed is used second time to find line "serial.port.file=" and it is replaced, too.
NOTE:
you must change "/dev/ardu" to your corresponding symlinked device name
you need to have awk and sed installed
save those lines to somewhere. They will disappear if you reinstall or upgrade ide.