I have a Raspberry Pi 3 with a GPS module and an ELM327 adaptor both connected to USB ports. Typically, the GPS module comes up on /dev/ttyUSB0 and the ELM adaptor on /dev/ttyUSB1, which is fine, however every once in a while they will swap ports. This tends to upset my python scripts running on the device.
Is there a way I can control/configure which device will connect to which port? Is it a first come first serve when assigning port numbers?
Running Raspbian Jessie.