From DaqWiki
Jump to navigation Jump to search

When multiple USB-to-serial adapters are present on a Linux system, it is not obvious which port corresponds to which /dev/ttyUSBnnn device. The mapping of ttyUSBnnn devices depends on the order that devices have been connected and disconnected, may change across system reboots, or when USB devices are re-enumerated after USB hardware errors.

This modification of the ser2net package from attempts to solve this problem by specifying serial devices using USB paths instead of /dev/ttyUSBnnn names.

To build the package, get the package sources and run "make" to produce the ser2net executable:

cd $HOME/packages
git clone
cd ser2net
ls -l ser2net

Browse the git repository at

Old ladd00 svn instructions: svn checkout firefox

An example ser2net.conf file for 2 USB serial ports looks like this:

3001:raw:600:usb-2-2:9600  -XONXOFF -RTSCTS LOCAL 
3002:raw:600:usb-2-4:38400 -XONXOFF -RTSCTS LOCAL 

When the program starts it prints the names of all available USB-serial devices,

you can copy these names to ser2net.conf.

add ser2net entries to hosts.allow:


and start ser2net from /etc/rc.local:

/root/ser2net -c /root/ser2net.conf -p 3000 &