Skip to main content

Serial Command Line

Context

The Serial Command Line terminal interface is for debugging during early development. The serial command line is always accessible if the device is on. There is no need to rely on a network connection, like there is with SSH connections. For stable projects, SSH should be used to access the command line.

The Omega2’s Serial Command Line interface is accessed with a USB cable connected to your computer. This will be the case if you are using an Omega2/2+ on an Expansion Dock, Mini Dock, or an Omega2S/2S+ with a Development Kit.

The Omega2 uses its UART pins to run a terminal and the Expansion Dock USB-to-Serial chip translates the serial terminal signals into USB signals that your computer can understand and vice versa.

Note that the Expansion and Mini docks are the only docks that have USB-to-Serial chips, so the serial terminal only works with these docks.

Omega2's command line is accessible on UART0.

Install USB-to-Serial driver on your computer

You'll need to download and install the Serial-to-USB driver on your computer for your specific operating system.

Download and install the Silicon Labs CP2102 driver for OS X.

Connect to Omega2

Before connecting to your Omega2 you'll need to check that the serial device exists.

In this example, we will use the screen utility. There are other tools available but screen is simple and comes already installed on most Macs.

Open a terminal on your Mac, and then follow these steps.

1: Check for the serial device

Plug in your Omega2 and Expansion dock, then run ls /dev/tty.* to see if the USB-to-Serial device is detected. If the driver is installed, you should see a device with a name like /dev/tty.usbserial-0001.

omega2-os-driver

2: Connect to Omega2

Run screen /dev/tty.usbserial-0001to connect to the Omega2's serial terminal using the screen utility. You should see the following screen if the connection is successful.

omega2-os-connect

3: Close screen

tip

You don't need to do this right now, but we thought it would be useful to know how to close the screen session

After you've finished with the command line you can close the session by pressing the action key (Ctrl-a) then k.

For information on how to use the screen utility, please see this tutorial.

info

Another useful serial port communication program is Minicom.