world leader in high performance signal processing
Trace: » serial

Serial ports and coLinux

If you wish to have coLinux access a serial port directly, this is done via the coLinux configuration file. You can bind as many ports as you like for coLinux to access.

Windows refers to all of its serial devices with COM# while coLinux refers to all of its serial devices with /dev/ttyS#. The # values need not be in sync. So you could easily bind the coLinux ttyS0 to the Windows COM3.

You also have to remember that coLinux will grab all ports you told it to for exclusive access. So close any applications (like HyperTerminal) that would open the relevant COM devices and do not try to open them until you've quit coLinux.

Finding Resources

Unsure of which COM ports Windows is using for a specific device? You can find out (and even change things) by going into the Device Manager. This can be reached via the Control Panel (Administrative Tools → Computer Management) or by right clicking on My Computer.

There will be a subsection called Ports (COM & LPT) which enumerates all possible COM ports on your system. Viewing the properties on a specific device will allow you to change the COM port. Do not worry about the other settings (baud rate, parity, etc…) as those can be controlled via coLinux.


The coLinux configuration file declares the relevant settings like so:

ttys0=COM1,"baud=57600 parity=N data=8 stop=1 xon=off odsr=off octs=off idsr=off to=on rts=on dtr=on"

This will bind Windows' COM1 port to coLinux's ttyS0 device. It will run the COM1 port at 57600 baud with parity disabled, 8 data bits, and 1 stop bit. These settings should largely be copy & pasted when adding other bindings.

The important thing to note here is that the serial settings are controlled by coLinux. If you attempt to change these settings while running inside of coLinux (using the normal stty or minicom or kermit programs), the settings will simply be ignored. It may be confusing at first when working with a board with a baud rate other than 57600 and even after changing your terminal settings in coLinux, things still do not work.