A Serial Console is a useful tool for embedded development, remote access, and those times when the development kit has issues that you need to sneak around to observe. Here’s a simple approach for adding a serial console to a Jetson TK1.
Serial Console Background
Because the Jetson 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, for this particular case the program Minicom was chosen. Other platforms and software programs can be used including Windows and Macintosh boxen.
The cable being used in the video is a USB to Null Modem RS232 DB9 Serial DCE Adapter Cable with FTDI
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 the RS-232 to USB conversion, the second camp uses PL2303HX chips. The StarTech cable is in the former 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 and hardware. The FTDI driver was already installed on the PC machine being used in the demonstration.
Plug the DB9 end of the cable into the Jetson, and then plug the USB connector into the host machine.
Here’s what it should look like:
Once the Jetson is wired and connected, check to make sure that you can see it.
Should list the device, the name is dependent on the chip being used by the USB-TTL cable. In the video, the device was listed as a FT 232 USB-Serial (UART).
You will then need to find which USB port to which the device is mapped.
$ ls /dev/ttyUSB*
This will list out the USB ports. On the machine in the video, there is only one device. Other machines may have more, you’ll have to figure out which is which. In this case, remember /dev/ttyUSB0 is the device to be later entered into the terminal emulator later.
You are then ready to install Minicom:
$ sudo apt-get install minicom
To start Minicom:
$ sudo minicom
The ‘sudo’ is used because of the serial port permissions. You’re then ready to configure the Settings to communicate with the Jetson TX1.
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 this particular cable, the correct setting is no software flow control, yes on hardware flow 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
You may then start the Jetson, 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 Jetson 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 Uboot.
It is simple to connect a serial cable to the Jetson TK1 to monitor the serial console. If you want to be able to interact with some of the lower level boot parameters or simply have simple remote access, just plug the cable in and get started!