Configuring Edgeport/8s from Linux

I have just recently aquired an Edgeport/8s for use with Linux (currently running Fedora 14, kernel, but flexible). But I need to set the ports to RS422 and RS485. However, the ionmode utility does not work:

[root@tommy utils]# ./ionmode -F /dev/ttyUSB0
./ionmode GETMODE failed for port /dev/ttyUSB0
[root@tommy utils]# ./ionmode -F /dev/ttyUSB0 mode 0x01
./ionmode SETMODE failed for port /dev/ttyUSB0

(The devices are all there.)

On closer inspection, the edge_ioctl() function in the io_ti.c module does not contain the hooks for neither ION_GETMODE nor ION_SETMODE. I was led to believe that it should already be included in the standard kernel, but anyway…

I browsed , but got a bit overwhelmed by the numer of files available.

What must I do to get this to work?


The ionmode utility is older and intended for 2.4 kernels. It hasn’t been tested much on 2.6 kernels, so there very well may be issues such as what you’re running into.

Also, it appears that RS-485 may not be supported with ionmode and 2.6 kernels.

I’m getting this information from the Edgeport Driver Package for Linux release notes:

As a workaround, since the flag exists in the driver, you may want to try hard-compiling the driver to configure the ports as needed, for RS-422 at least.

I found the following entry in the io_ti.c driver:

edge_port->bUartMode = 0; /* Default is RS232 */

Looking at ionmode, I was able to find the values used for RS422:

echo "        1          RS422: No Terminating Resistor" 1>&2
echo "        9          RS422: Terminating Resistor" 1>&2

So, it seems that you can simply change the “0” default in the driver to either 1 or 9, recompile it and it will hard code the ports to RS-422.

You wouldn’t be able to dynamically change them though. Once the driver is compiled with a particular mode, it applies to all the ports and cannot be changed on the fly as with ionmode. For this ability, you should contact the linux-usb-devel mailing list to request the hooks be added/re-added into the driver.

About what you found on closer inspection, you may want to get in touch with the Linux maintainers referencing the patch link below, containing the ioctls (at the bottom).

It looks like this patch was submitted for 2.6.9 in 2004 to linux-usb-devel. However, I cannot tell if the patch ever made it into the 2.6.x kernels or if it did and at some point the ioctls were removed. Also, the Edgeport/4s is reference there, not the Edgeport/8s, so other minor changes may need to be made for it to be applicable to the Edgeport/8s model in particular.


Thank you for your response. I was under the impression that the 2.4 driver had been brought forward to the 2.6 kernel in full. Apparently, this is not the case. The documentation is, to say the least, a bit confusing.

Hard-coding the mode is not an option as I need to set four ports to RS-422 and two to RS-485.

Most of the patch you refer to has been included in the current kernel, except the additional IOCTLs. I have posted a message in the linux-usb list inquiring about the state of the driver.

However, I find it strange that Digi does not provide the complete functionality for 2.6 users - 2.6.0 was released 7 years ago. That was what my reseller told me - I need to have a word with him. :slight_smile:

You can use Edgeport/2i instead of Edgeport/8s which supports both RS-422 and RS-485. It also requires two sets of eight position DIPswitches, one set for each serial port.