Problem with serial port assignment

I have an Epic with a 4-port serial module configured as RS232 (managed by routines in Pac Control) and a 2-port USB serial adapter (Node-Red). Initially, these latter serial (USB) ports were assigned as /dev/ttyUSB5 and /dev/ttyUSB6. Until then, everything worked correctly. I updated my programs in Pac Control and Node-Red, and the driver changed the USB ports to /dev/ttyUSB0 and /dev/ttyUSB1. Consequently, everything started behaving erratically. How can I fix this so that it doesn’t happen again?

We don’t support dual port serial to USB adapters.
If you have had it working to-date, I cant explain that. I would not continue to use it.
That said. the other issue is when you plug things in or add USB to serial adapters that one time change is most likely what you are seeing.

The core of the issue is that USB ports are ‘mapped’. Most folks don’t see this or know it, because the OS hides it from the user pretty good.
In the case of Linux on EPIC/RIO we need to map the serial port addresses (ttyUSBx) so the right software can link to the correct port.
The first 4 slots on every EPIC rack actually have USB bus on them. So when you plug a grv serial module in, it will map that serial address to that USB bus address.

Bottom line. Plug everything in as you want it. Mark it. Don’t move it. If you unplug it, make sure it goes back in the exact same port as you unplugged it from.
The core OS mapping wont change.
Its set the first time and Linux keeps track of the adapters and the USB ports that they are plugged into.
(Swap out the dual serial USB adapter for two singles or another groov serial module).

1 Like

Thanks, Beno, for the reply. Oops I have a four-port serial USB adapter (Gearmo) working on a RIO in another project without any problems.

Can you drop the model number or a link to it here please.
I’d love to pick one up and let our software engineers take a look.

This is the adapter I use link

1 Like