I have a Huawei mPCIe modem with 5 USB ports, ttyUSB0 - ttyUSB4.
Then I installed a FTDI USB to serial adapter, ttyUSB5.
But after I restarted the router the FTDI adapter "steals" ttyUSB0 and my modem scrips fails.
Can I map my Huawei modem so it always use ttyUSB0 - ttyUSB4, or do I need to solves this in my script?
I think this topic has been discussed in an other thread, but I can´t find the thread.
No, the ttyUSBx order is dependent on the Linux kernel and the order of enumeration. You cannot change this behavior to have fixed ids.
Instead, the best way to handle the situation is to us lsusb or other similar tools to prove the PID/VID of each usb device and then talk to the one you want based on that info.