A Serial Debug Console is a useful tool for embedded development, remote access, and those times when the development kit has issues that you need to observe. Looky here:
Note: April, 2020 – Article and video update to include Jetson Nano B01.
Note: July, 2021 – Article and video update to include Jetson Nano B01, Jetson Nano 2GB and Jetson Xavier NX.
The story of serial data transfer over wires goes back almost a hundred years. I’ve heard stories that Ferdinand Magellan first discovered a serial cable on his journeys, but lost it to the great tangle in the battle of Mactan in 1521. Apparently it was later rediscovered in America where teletypewriters used serial communication technology over telegraph wires, the first patents around stop/start method of synchronization over wires being granted around 1916.
Note: July, 2021 – With the introduction of the Jetson Nano B01, subsequent Jetson Nano form factor devices (currently the Jetson Nano, Jetson Nano 2GB, and Jetson Xavier NX) use a common header layout and location for the serial debug console. The header is located underneath the compute module. In this article, we may refer to this header as the “Jetson Nano header” or J50.
Serial communication in the computer industry is ubiquitous, in this case we are going to connect a PC up to the Jetson Nano Style Developer Kit via a UART. This UART is the serial console on the Jetson Nano which allows direct access to the serial and debug console. Quite a handy thing to have when the going gets hardcore.
In addition to providing the typical console, the serial console is useful in many other situations. This includes the ability to choose menu entries for different boot Images (Linux kernel images), as well accessing a Nano that does not have a keyboard, mouse, networking or display.
Because the Nano communicates over a basic serial cable, almost any computer with serial terminal software can communicate with the Jetson. There are a wide range and variety of software terminal emulators out there. In this video, a laptop running Ubuntu and the program Minicom is shown. Other platforms and software programs can be used including Windows and Macintosh boxen.
The Jetson Nano headers use TTL logic. While there are various ways to interface with it, we chose to convert the signal to USB. In the video, we use an Adafruit USB to TTL Serial Cable – Debug / Console Cable  available from Amazon.
There are a wide variety of offerings for these types of cable. The products fall in two camps. The first camp uses FTDI chips for TTL to USB conversion, the second camp uses PL2303HX chips. The Adafruit cable is in the latter camp. One thing to keep in mind is that a driver for the appropriate chip may be required for the cable to work correctly with your particular operating system. The driver for the PL2303HX was already installed on the machine being used in the demonstration.
There are two versions of the Jetson Nano. The newer version can be identified by the two CSI camera connectors. This is version B01. The earlier version, A02, had only one connector.
The wiring is straightforward. Before starting, make sure that there is no power to the Jetson. Wire the cable according to your Jetson Nano style version:
Jetson Nano B01, Jetson Nano 2GB, Jetson Xavier Nx
The serial debug console is available on the J50 header on the Jetson Nano. The J50 header is located on the edge of the carrier board opposite the I/O connectors. The connector is underneath the Jetson module, directly below the SD Card reader.
Jetson Nano J50 Pin 4 (TXD) → Cable RXD (White Wire)
Jetson Nano J50 Pin 3 (RXD) → Cable TXD (Green Wire)
Jetson Nano J50 Pin 7 (GND) → Cable GND (Black Wire)
The Jetson Nano J50 pins are also silkscreened on the underside of the board. Here’s what it should look like:
Jetson Nano A02
The serial debug console is available on the J44 header on the Jetson Nano. Connect the serial cable:
Jetson Nano J44 Pin 2 (TXD) → Cable RXD (White Wire)
Jetson Nano J44 Pin 3 (RXD) → Cable TXD (Green Wire)
Jetson Nano J44 Pin 6 (GND) → Cable GND (Black Wire)
The Jetson Nano J44 pins are also silkscreened on the underside of the board. Here’s what it should look like:
Before you can connect with a serial terminal application on the other computer, you will need to determine the port to which the Jetson Nano connects. This is dependent on the computer you are using.
In the video on the Ubuntu PC, we open a new Terminal and:
$ dmesg −−follow
Next, plug in the Serial Cable. You will see a driver assign the cable a port number. In the video, the cable is ttyUSB0.
In the video, we use the Minicom application. Other programs/platforms should be similar. We’ll cover the video walkthrough. Install Minicom:
$ sudo apt-get install minicom
To start Minicom:
$ sudo minicom
The ‘sudo’ is used because of serial port permissions. You’re then ready to configure the Settings to communicate with the Jetson Nano.
An important part of serial communication is settings that are used to communicate between the devices. Rather than go through a lengthy discussion of each setting and it’s meaning, let’s distill it into the settings themselves.
First set the device, in the video the device was ‘/dev/ttyUSB0‘.
Connection speed is 115200, with 8 bits, no parity, and 1 stop bit (115200 8N1). For these three wire cables, the correct setting is software control, no hardware control. If you choose a 5 wire setup with RTS and CTS lines, then select hardware control, and no software control.
In Minicom, Ctrl A Z brings up the main menu. Select the ‘cOnfigure Minicom’ menu item, enter the settings, and make sure that you save the configuration as described in the video. After that task is complete, exit Minicom and restart to have the settings take effect.
$ sudo minicom
Now power on the Jetson Nano, at which point you will see the kernel log starting to scroll on the Minicom window on the host.
There are a wide variety of ways to interact with the Nano through the serial console, one of the more useful tips is to interrupt the startup process with a keystroke to be able to interact with the bootloader.
You can also choose different kernels during this process when they are present. If you do not interrupt the process with a keystroke, the Nano will boot and you will be at a Terminal prompt.
The Serial Console is a useful tool to help debug the startup sequence, load different Linux kernels, or simply act as a headless console. All it takes is a cable, and you can talk to your Jetson Nano!
- Article update to include Jetson Nano 2GB, Jetson Xavier NX
- Article update to include Jetson Nano B01