I'm using CentOS 6 and I have two serial ports (two USB interfaces on two different ports), USB1 and USB2. When I connect the USB1, the OS sets her patch to "/dev/ttyACM0", and when I connect the USB2, "/dev/ttyACM1". But when I connect first the USB2, the OS sets her patch to "/dev/ttyACM0" and no to "/dev/ttyACM1". I need that the USB1 patch be "/dev/ttyACM0" and USB2 "/dev/ttyACM1", regardless of the order that I connect the interfaces. How I do to do it?
Thank you
Create a udev rule that defines the symlink based on the attributes of the USB device (such as the serial number).
Find out information about your device-
Then go into
/etc/udev/rules.d/
and create a udev rule. Something similar to the blurb below. Here is a good reference. For lots of examples and more discussion, do searches for udev persistent usb serial.