I am developing a Linux app that uses serial ports to communicate with some devices. I'm using usb-to-serial converters for all my devices, so all serial ports are connected through usb.
Currently I am using each port's name to identify it (ttyAM0 or ttyUSB1 etc), however this is very problematic, since ports enumaration keeps changing.
I cannot create a udev rule, in fact nothing should be changed to the OS itself, since it is considered that the end user will not be able/skillful to do so. (It is a commercial app).
So the question is: How can I uniquely identify each serial port and store this information to be used after next reboot?