I have a machine (Debian/Ubuntu/CentOS mostly) that works like a kiosk, and there a few devices connected to it, using serial and USB ports. The software of these devices should know the port numbers, meaning device A is connected to /dev/ttyUSB0, device B to /dev/ttyUSB1, device C to /dev/ttyS0 and so on. Can I be certain that after a restart or kernel update, etc., these port numbers won't change, or should I have some other method to determine what's where?
You need to write a udev rule to assign consistent names based on which usb port the usb serial port adapter is plugged in to or the adapter's aerial number.
I'm on my phone at the moment but I'll update the answer when I get back to my laptop and can add an example.