Serial Connection

Serial Connection – Windows

Overview

This page will walk you through installing drivers and software necessary for serial connection in Windows.

Prerequisites

  1. FTDI drivers:

FTDI drivers come preinstalled on Linux systems and newer versions of the Windows. If your Windows does not support FTDI drivers, you will need to download them from here. If you get stuck, you can check out our step by step Installing FTDI drivers guide.

  1. PuTTY:

For Windows PC you will need PuTTY, although you can use PuTTY with Linux as well. Get it here. Instructions for connecting with PuTTY are listed below.

Connecting with PuTTY (Windows)

To connect with PuTTY, first we must connect the laptop to the board via micro USB cable. After that, we have to make sure the board was recognized. For that we go to Device Manager → Ports (COM & LPT) and, after we powered on the board, we will see a new COM port which we will need to note (COMnumber). In this example, the new COM port is COM9:

The next step is to run PuTTY and select Serial under Connection type. There we will input the COM port from the previous step (in our example COM9) and also set Speed to 115200):

and you should get access to the console:

Serial Connection – Linux

Overview

This page will walk you through installing necessary serial connection software for Linux. FTDI drivers needed for Windows come preinstalled with your Linux system.

Prerequisites

C-Kermit
Obtaining C-Kermit can be done via package manager and how to install it varies across Linux distribution so make sure to check out your distribution documentation. For example, on some distributions (e.g. Ubuntu), the program is called Kermit while on others (e.g. Arch Linux) it is called C-Kermit.

or

Minicom Obtaining Minicom also differs across Linux distributions so check your distribution documentation. You will likely be able to obtain it using your distribution’s package manager.

Connecting with C-Kermit

C-Kermit allows us to use serial communication with different boards. Once your board is connected to your laptop via micro USB cable, you can run C-Kermit along with a number of parameters which need to be set correctly. In such cases it is convenient to make a script which contains the set of afore-mentioned commands. The following configuration works for the MACCHIATObin and other devices:

1 2 3 4 5 6 7 8 9 set line /dev/ttyUSB0 set speed 115200 set carrier-watch off set flow-control none set handshake none set prefixing all set streaming off set parity none connect

so we can go ahead and save this configuration in a file we will here name kermit-usb0.

Since USB might be enumerated differently on each plug-in, you can use dmesg command after you have plugged in the USB cable to find out to which USB the serial converter has connected to. Example output:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ~$dmesg ... [518568.122266] usb 1-6: new full-speed USB device number 4 using xhci_hcd [518568.257927] usb 1-6: New USB device found, idVendor=0403, idProduct=6015 [518568.257935] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [518568.257940] usb 1-6: Product: FT230X Basic UART [518568.257944] usb 1-6: Manufacturer: FTDI [518568.257947] usb 1-6: SerialNumber: DJ00HH67 [518569.328196] usbcore: registered new interface driver usbserial [518569.328238] usbcore: registered new interface driver usbserial_generic [518569.328268] usbserial: USB Serial support registered for generic [518569.331071] usbcore: registered new interface driver ftdi_sio [518569.331080] usbserial: USB Serial support registered for FTDI USB Serial Device [518569.331096] ftdi_sio 1-6:1.0: FTDI USB Serial Device converter detected [518569.331115] usb 1-6: Detected FT-X [518569.331514] usb 1-6: FTDI USB Serial Device converter now attached to ttyUSB0

Here we can see that the serial converter connected to USB0 (ttyUSB0). Make sure that the USB you have in your C-Kermit script we have mentioned above:

1 set line /dev/ttyUSB0

matches the USB number you receive from dmesg output on a given plug-in. Alternatively, you can create multiple C-Kermit configuration scripts with different set line values and then you can, depending on the USB number, run the configuration with the corresponding number using C-Kermit.
Now we can run C-Kermit using our configuration script:

1 2 3 4 5 6 7 ~$ sudo kermit kermit-usb0 [Enter your sudo password] Connecting to /dev/ttyUSB0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

and your board should begin booting.

Connecting with Minicom

Minicom allows us, similarly to C-Kermit, to achieve serial communication with the board. Once your board is connected to your laptop via micro USB cable, we can run the minicom setup (e.g. on Ubuntu):

1 $ sudo minicom -s

we will now be presented with the following menu:

1 2 3 4 5 6 7 8 9 10 11 +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+

through which you can navigate using up/down keys. For our case, we will only need to setup Serial port setup so select that submenu. You will get the following menu:

1 2 3 4 5 6 7 8 9 10 11 +-----------------------------------------------------------------------+ | A - Serial Device : /dev/tty8 | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : Yes | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+

For option A – Serial Device we must first find out the correct USB to which our serial has connected to after we have plugged in the micro USB cable. As for C-Kermit, we can do this using dmesg:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ~$dmesg ... [518568.122266] usb 1-6: new full-speed USB device number 4 using xhci_hcd [518568.257927] usb 1-6: New USB device found, idVendor=0403, idProduct=6015 [518568.257935] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [518568.257940] usb 1-6: Product: FT230X Basic UART [518568.257944] usb 1-6: Manufacturer: FTDI [518568.257947] usb 1-6: SerialNumber: DJ00HH67 [518569.328196] usbcore: registered new interface driver usbserial [518569.328238] usbcore: registered new interface driver usbserial_generic [518569.328268] usbserial: USB Serial support registered for generic [518569.331071] usbcore: registered new interface driver ftdi_sio [518569.331080] usbserial: USB Serial support registered for FTDI USB Serial Device [518569.331096] ftdi_sio 1-6:1.0: FTDI USB Serial Device converter detected [518569.331115] usb 1-6: Detected FT-X [518569.331514] usb 1-6: FTDI USB Serial Device converter now attached to ttyUSB0

Here we can see that the serial converter connected to USB0 (ttyUSB0) USB number, so we change the A – Serial Device setting to /dev/ttyUSB0. There is no need to change any other settings (assuming your Bps/Par/Bits are set as 115200 8N1). As with C-Kermit, be wary of the fact that the USB number might change on each plug-in, so make sure to set it up accordingly.
Now we can go back to the main menu by selecting Exit and pressing Enter. Optionally, you can save these settings as default for future use by selecting Save setup as dfl. Similarly to multiple C-Kermit configuration files, you can create several dfl configurations with different USB numbers to speed up the process.
When we exited the menu, the minicom terminal will open with our settings. Now when we power on the board we should see it booting:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Welcome to minicom 2.7 OPTIONS: I18n Compiled on Feb 7 2016, 13:37:27. Port /dev/ttyUSB0, 15:03:45 Press CTRL-A Z for help on special keys BootROM - 2.03 Starting CP-1 IOROM 1.07 Booting from SPI NOR flash 1 (0x32) Found valid image at boot postion 0x000 lNOTICE: Starting binary extension NOTICE: Gathering DRAM information mv_ddr: mv_ddr-armada-17.02.0-g42da6da (Mar 15 2017 - 13:30:32) mv_ddr: completed successfully Booting Trusted Firmware BL1: v1.2(release):armada-17.02.0: BL1: Built : 13:30:36, Mar 15 2017 NOTICE: BL1: Booting BL2 ...

Serial Connection – MacOSX

Overview

This page will walk you through installing drivers and software necessary for serial connection in MacOSX.

Prerequisites

First, download and install the FTDI VCP drivers
Once you connect the cable, the kernel should load the usbserial module. Look for the device.

1 ls -l /dev/*usbserial*

Connection

Screen

OS X ships with screen by default. Open a terminal and type

1 screen /dev/tty.usbserial-DB008OZL 115200

ZTerm

You can also download ZTerm.

1 2 Open Settings, Connection and set the values to 115200 8 N 1 (uncheck Local Echo). Open File, Transfer Convert and set Binary Data.

Video