Serial Port Persistent

by

in

Making a serial port persistent in Linux.

When plugging multiple usb serial converters there is no security that the device will maintain the name after reboot or after re plugging. For this purpose there is a way of linking the device information to a file so that this file can be use instead of the traditional /dev/tty… file to connect over serial.

To find the needed information of the device to be able to make this linked file one needs the following:

This list the usb with their manufacturing identifiers.


This list the serial number of the device. With all these information now we can make the usb serial persistent by introducing a new rule in the udev. To do this a file needs to be created in /etc/udev/rules.d/ this file we are going to name it 99-usb-serial.rules
to do this the following command can be used:

sudo nano /etc/udev/rules.d/99-udev-serial.rules

In this file we put the following information:

UBSYSTEM==”tty”, ATTRS{idVendor}==”0403″, ATTRS{idProduct}==”6001″, ATTRS{serial}==”FT0IFMES”, SYMLINK+=”serial1″

This will make the specified device link to “/dev/serial1” file so now we can use this to open the serial port. The device has to be re plugged before it takes effect.