Problem with Edgeport USB Converter / Linux

Edgeport/4 RS-232
OS: Linux Debian 2.6.25

i wanna use a edgeport/4 rs-232 with debian linux. the problem i have, is that he allways have 2 groups
if he make the ttyUSB* Devices.

dmesg-log:


[   10.812369] usbcore: registered new interface driver usbserial
[   10.812394] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[   10.812453] usbcore: registered new interface driver usbserial_generic
[   10.812458] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[   10.819593] drivers/usb/serial/usb-serial.c: USB Serial support registered for Edgeport TI 1 port adapter
[   10.819617] drivers/usb/serial/usb-serial.c: USB Serial support registered for Edgeport TI 2 port adapter
[   10.819655] io_ti 3-1.1:1.0: Edgeport TI 2 port adapter converter detected
[   10.854530] cdc_acm 4-2:1.0: ttyACM0: USB ACM device
[   11.015272] usb 3-1.1: Edgeport TI 2 port adapter converter now attached to ttyUSB0
[   11.015335] usb 3-1.1: Edgeport TI 2 port adapter converter now attached to ttyUSB1
[   11.015360] io_ti 3-1.2:1.0: Edgeport TI 2 port adapter converter detected
[   11.227942] usb 3-1.2: Edgeport TI 2 port adapter converter now attached to ttyUSB2
[   11.227942] usb 3-1.2: Edgeport TI 2 port adapter converter now attached to ttyUSB3


cause of this the devices switch sometimes an i have the wrong hardware on the devices…

it should initialize all devices in 1 group… like this one…
dmesg-log:


[    9.738713] usbcore: registered new interface driver usbserial
[    9.738740] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[    9.738794] usbcore: registered new interface driver usbserial_generic
[    9.738799] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[    9.747991] drivers/usb/serial/usb-serial.c: USB Serial support registered for Edgeport 2 port adapter
[    9.748013] drivers/usb/serial/usb-serial.c: USB Serial support registered for Edgeport 4 port adapter
[    9.748032] drivers/usb/serial/usb-serial.c: USB Serial support registered for Edgeport 8 port adapter
[    9.748052] drivers/usb/serial/usb-serial.c: USB Serial support registered for EPiC device
[    9.748086] io_edgeport 3-2:1.0: Edgeport 4 port adapter converter detected
[    9.756371] usb 3-2: Inside Out Networks�Edgeport/4 detected
[   10.705106] usb 3-2: Edgeport 4 port adapter converter now attached to ttyUSB0
[   10.705106] usb 3-2: Edgeport 4 port adapter converter now attached to ttyUSB1
[   10.705106] usb 3-2: Edgeport 4 port adapter converter now attached to ttyUSB2
[   10.705106] usb 3-2: Edgeport 4 port adapter converter now attached to ttyUSB3
[   10.705106] cdc_acm 4-2:1.0: ttyACM0: USB ACM device

why happen this? i’ve try’d allready to modprobe io_edgeport manually etc. pp… also uses different
machines with different kernels … all >=2.6

thanks in advance…

The newer Edgeport/4 units are technically two 2-port units bound together with a hub chip, so that’s why they are in groups of two.

As you’ve observed, they can sometimes get enumerated in different orders, which would cause the device nodes to inconsistently point to the right serial port / serial device.

You can work around this by using UDEV. See the instructions just below.

  1. UDEV

    The Edgeport drivers in the Linux 2.6 kernel do not support reserve
    ports; however, the udev system provides a way to explicitly assign
    device names to USB serial devices.

    Without udev, the ports are assigned based on the order the USB serial
    devices are enumerated, but this changes depending on when the devices
    are plugged in, or how the system is booted. Devices like the Edgeport
    4/s and 8/s are particularly troublesome, since they are really multiple
    two port devices and these devices can be enumerated in different orders,
    randomly changing the port names of the ports on the device.

    For complete details on udev, see the udev man page or
    http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html

    It is easy to write udev rules to name single port devices; this is
    described in the above documents. Here we will describe how to give
    deterministic names to each port on Edgeport multiport devices.

    Note that devices supported by the io_edgeport driver can have 2, 4,
    or 8 ports per device and a single Edgeport might appear as multiple
    devices. Devices supported by the io_ti driver can have 1 or 2 ports
    per device and a single Edgeport might appear as multiple devices.

    You will probably want to create symlinks to names that are meaningful to
    your application, as well. You can also modify these udev rules to
    select specific devices or USB ports. A few examples are given below.

    The udev rules for Edgeports need to be put in a file in the
    /etc/udev/rules.d directory. For example, the file might be named
    /etc/udev/rules.d/11-edgeport.rules.

    Here are the basic rules for an Edgeport/4.

    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“-0" NAME=“%k” SYMLINK=“ttyEDGE4_0_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}="
    -1” NAME=“%k” SYMLINK=“ttyEDGE4_1_%e”

    The four ports on the first Edgeport/4 will be

     /dev/ttyEDGE4_0_
     /dev/ttyEDGE4_0_1
     /dev/ttyEDGE4_1_
     /dev/ttyEDGE4_1_1
    

    The four ports on the second Edgeport/4 will be

     /dev/ttyEDGE4_0_2
     /dev/ttyEDGE4_0_3
     /dev/ttyEDGE4_1_2
     /dev/ttyEDGE4_1_3
    

    And so on.

    You can create more meaningful names with symbolic links. These
    commands will create symbolic links for the first two Edgeport/4
    devices so the ports are named ttyA1 through ttyA4 for the first
    device and ttyB1 through ttyB4 for the second device. These
    commands only need to be run once.

     ln -s /dev/ttyEDGE4_0_  /dev/ttyA1
     ln -s /dev/ttyEDGE4_0_1 /dev/ttyA2
     ln -s /dev/ttyEDGE4_1_  /dev/ttyA3
     ln -s /dev/ttyEDGE4_1_1 /dev/ttyA4
     ln -s /dev/ttyEDGE4_0_2 /dev/ttyB1
     ln -s /dev/ttyEDGE4_0_3 /dev/ttyB2
     ln -s /dev/ttyEDGE4_1_2 /dev/ttyB3
     ln -s /dev/ttyEDGE4_1_3 /dev/ttyB4
    

    Similar rules and links can be created for other Edgeport devices.

    Udev can be used to identify devices more specifically. For example,
    if you wanted an Edgeport/4 plugged into the first USB port to appear
    as /dev/ttyA1 through /dev/ttyA4 and Edgeport/4 plugged into the second
    USB port to appear as /dev/ttyB1 through /dev/ttyB4. The devices would
    be associated with these ports based only on the USB port they were
    plugged into. To do this, you could use the following rules and links.

    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“-0" PLACE=“1” NAME=“%k” SYMLINK=“ttyEDGE4_A_0_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}="
    -1” PLACE=“1” NAME=“%k” SYMLINK=“ttyEDGE4_A_1_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“-0" PLACE=“2” NAME=“%k” SYMLINK=“ttyEDGE4_B_0_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}="
    -1” PLACE=“2” NAME=“%k” SYMLINK=“ttyEDGE4_B_1_%e”

     ln -s /dev/ttyEDGE4_A_0_  /dev/ttyA1
     ln -s /dev/ttyEDGE4_A_0_1 /dev/ttyA2
     ln -s /dev/ttyEDGE4_A_1_  /dev/ttyA3
     ln -s /dev/ttyEDGE4_A_1_1 /dev/ttyA4
     ln -s /dev/ttyEDGE4_B_0_  /dev/ttyB1
     ln -s /dev/ttyEDGE4_B_0_1 /dev/ttyB2
     ln -s /dev/ttyEDGE4_B_1_  /dev/ttyB3
     ln -s /dev/ttyEDGE4_B_1_1 /dev/ttyB4
    

    The PLACE rule can be used to select devices plugged into specific
    ports on specific hubs. See the udev man page for more information
    on using the PLACE rule.

    As another example, suppose you had an Edgeport/4 with serial number
    V11111111 that you wanted to appear as ttyA1 through ttyA4 and another
    Edgeport/4 with serial number V22222222 to appear as ttyB1 through ttyB4.
    The devices would be associated with these ports regardless of which
    USB port they were plugged into. To do this, you could use the following
    rules and the same links given above.

    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“V11111111-0” NAME=“%k” SYMLINK=“ttyEDGE4_A_0_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“V11111111-1” NAME=“%k” SYMLINK=“ttyEDGE4_A_1_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“V22222222-0” NAME=“%k” SYMLINK=“ttyEDGE4_B_0_%e”
    BUS=“usb” SYSFS{idVendor}=“1608” SYSFS{idProduct}=“0201” SYSFS{serial}=“V22222222-1” NAME=“%k” SYMLINK=“ttyEDGE4_B_1_%e”

    Note that here we specify the exact serial numbers, which uniquely
    identify the devices.