IOU04 Quick-Start-Guide / Serial Demo

Serial Port Demo

In this demo, we’ll demonstrate how to connect an application on ModuCop with a IOU04 COM port. We’ll use a cable to loop the RS232 transmit pin to the receive pin, so that we’ll get all characters back that are sent to the COM port.

Preparation Steps:

  • Connect a PC and ModuCopto the same network, e.g. by using an Ethernet Switch or a Wifi Access Point
  • From the PC, login into the ModuCop via ssh

Check whether IOU04 COM ports are recognized on ModuCop

ModuCop’s linux image is configured to detected COM Ports of io4edge devices automatically.

For each detected COM port, a linux device /dev/tty<device-ID>-com<port> is created. For example, if your IOU04 device ID is S101-IOU04-USB-EXT-1, you’ll find the following tty devices:

root@moducop-cpu01: ~# ls -l /dev/ttyS101-IOU04-USB-EXT-1*
crw-rw---- 1 root dialout 199, 3 Jul 28 13:33 /dev/ttyS101-IOU04-USB-EXT-1-com1
crw-rw---- 1 root dialout 199, 4 Jul 28 13:33 /dev/ttyS101-IOU04-USB-EXT-1-com2

Function Test

Now, let’s make a hardware loop between the RS232 transmit and receive pin of the COM1 RS232 interface. Connect pin 2 and 3 of the COM ports D-Sub connector:

COM Loop

Start the minicom terminal program on ModuCop:

root@moducop-cpu01: ~# minicom -D /dev/ttyS101-IOU04-USB-EXT-1-com1 -b 115200

Because we haven’t connected hardware flow control lines, we have to tell minicom not to use hardware flow control:

  • Press CTRL-A followed by O (O like Omega)
              │ Filenames and paths      │
              │ File transfer protocols  │
              │ Serial port setup        │
              │ Modem and dialing        │
              │ Screen and keyboard      │
              │ Save setup as dfl        │
              │ Save setup as..          │
              │ Exit                     │
  • Select Serial Port Setup
  • Press F

Then hardware flow control should be off:

F - Hardware Flow Control : No

Press two times ESC and you are back in the main screeen of minicom.

Now type some character, and you should see that the characters are echoed back, due to the hardware loop we have created!

Welcome to minicom 2.7.1

Compiled on Apr 18 2017, 09:55:23.
Port /dev/ttyS101-IOU04-USB-EXT-1-com1, 13:45:27

Press CTRL-A Z for help on special keys


To leave minicom, type CTRL-A, followed by x.