How to use serial ports on Ubuntu

General info

1. Embedded (motherboard) port names look like:

/dev/ttyS0
/dev/ttyS1

2. Moxa CP-114 (it's been verified, but other board like CP-132 haven't been yet) port names look like:

/dev/ttyMI0
/dev/ttyMI1
/dev/ttyMI2
/dev/ttyMI3

3. To communicate with devices via the followed programs are used:

sudo apt-get install cutecom
sudo apt-get install setserial

VirtualBox

4. Using serail port with VirtualBox:

  1. VirtualBox Manager / VM properties / COM ports
  2. Check one or both COM-ports
  3. point each port to appropriate host device, for instance - /dev/ttyMI0

Wine

5. Using serial ports with Wine: Adding standard port:

ln -s /dev/ttyS0 ~/.wine/dosdevices/com1

Adding Moxa serial board port:

ln -s /dev/ttyMI0 ~/.wine/dosdevices/com2

Getting info about serial

6. You can use it to know what file in /dev is responsible for your serial port.

dmesg | grep serial
dmesg | grep tty
dev/ubuntu/serial.txt · Последние изменения: 2011/04/09 17:06 — jamis7005
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0