@somlioy do you have any solution to symbolic link after reboot system ?
I have finished my application with dev/ttyUSB0 i dev/ttyUSB1, but I still creating symbolic link - manually after reboot system.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using linux panel PC CPi-A102WR with Codesys. I using two embeded serial ports by Edit the CODESYS configuration file
sudo nano /etc/CODESYSControl.cfg
[SysCom]
Linux.Devicefile=/dev/serial
And I have
COM1 - COM0(physical)
COM2 - COM1(physical)
Now I need more COM port, so I use USB to RS232 nad in the linux I have device : dev/ttyUSB0.
What I should modify in /etc/CODESYSControl.cfg file to using my device ttyUSBO like COM3 in codesys ?
/etc/CODESYSControl_Users.cfg
[SysCom]
Linux.Devicefile.1=/dev/serial1
Linux.Devicefile.2=/dev/serial2
Linux.Devicefile.3=/dev/ttyUSB0
Linux.Devicefile.4=/dev/ttyUSB1
You could also do symbolic link from /dev/ttyUSB0/1 to /dev/serial
sudo ln -s /dev/ttyUSB0 /dev/serial2
sudo ln -s /dev/ttyUSB1 /dev/serial3
Presuming you keep original .cfg file with Linux.Devicefile=/dev/serial, ttyUSB0/1 will then be available as COM3 and COM4.
@eschwellinger I should remove this lines :
from /etc/CODESYSControl.cfg file ?
I do this and add
in empty /etc/CODESYSControl_Users.cfg file , but it doesn't work.
@somlioy do you have any solution to symbolic link after reboot system ?
I have finished my application with dev/ttyUSB0 i dev/ttyUSB1, but I still creating symbolic link - manually after reboot system.
Solution with symbolic link works,until I restart my system.
What do we think about this solution.
I should create file :
/etc/udev/rules.d/70-persistent-serial.rules
and put in it:
?
yes udev is the way to go. wether config rule works you must test on the device.
The above solution works great. I test it now