2010-08-12

Digi Edgeport/8 persistent serial port assignments

Here's how to add arbitrary symlinks referencing specific ports:

In /etc/udev/rules.d/60-persistent-serial.rules , insert lines like the following just above the final LABEL (included for reference). (Obviously, you'll need to change it for the serial number of your own adapter). This example sets links for ports 5 through 8 (as labelled on the adapter box):


ENV{ID_SERIAL}!="Digi_International_Edgeport_8_I01845608-2", GOTO="persistent_serial_3"
ENV{ID_PORT}=="0",SYMLINK+="ttyBellows"
ENV{ID_PORT}=="1",SYMLINK+="ttyDetector"
LABEL="persistent_serial_3"
ENV{ID_SERIAL}!="Digi_International_Edgeport_8_I01845608-3", GOTO="persistent_serial_end"
ENV{ID_PORT}=="0",SYMLINK+="ttyMosaicGrating"
ENV{ID_PORT}=="1",SYMLINK+="ttySlit"

LABEL="persistent_serial_end"

2010-08-05

Digi Edgeport/8 persistent serial port assignments

Even better than patching usb-serial.ko is to use the /dev/serial/by-id links that are provided with recent versions of Udev.

In the case of Debian Lenny (5.0.4), where the version of Udev (125) is too old, patching /lib/udev/path_id as follows:

--- a/extras/path_id/path_id
+++ b/extras/path_id/path_id
@@ -515,6 +515,9 @@ handle_device () {
*/host[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*)
handle_scsi "$D"
;;
+ */ttyUSB*)
+ D=${D%/ttyUSB*}
+ ;;
*/usb[0-9]*/[0-9]*/*)
handle_usb "$D"
;;
and copying /lib/udev/60-persistent-serial.rules (the latter goes to /etc/udev/rules.d) provides the capability.