Jetson/TX1 Serial Console

= Serial Console Wiring =

The serial console is extremely valuable for many reasons, including the ability to choose menu entries for boot images during boot, as well as having access even when networking and direct monitor/keyboard/mouse are unavailable. This functionality is accessed via the rectangular connector J21, near the power-on button.

The Software Side
Any serial port program should work as a console. Examples are PuTTY, gtkTerm, and minicom. Connection speed is 115200, with 8 bits, no parity, and 1 stop bit (115200 8N1). Flow control will be RTS/CTS.

The USB Serial UART
Because of the custom nature of the TX1 board connector wiring, a USB serial UART is by far the easiest and most reliable way to connect the host side of the serial console. This serial UART is required to handle 3.3V I/O. Most of the serial UARTs available should work if the UART is designed for 3.3V I/O. Beware that other USB serial UART cables are available which support an incompatibile 5V or 12V I/O...do not use these.

Because the FTDI USB chips are so widely available and often have drivers by default for Linux host machines, this chipset is a good starting point when you have many choices. The example USB serial UART used here is the TTL-232R-3V3 by FTDI. One source of this serial UART is here: https://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393.

About Serial Port Cabling
The example cable comes with a 6-wire cable and 0.1in spacing 6-pin female header. Five of the 6 pins are used. This cable could be used directly with the J17 UART header, but this information is concerned with showing how to wire the standard 6-wire serial UART cable to connector J21 (J21 has the serial console UART, not J17...don't try the cable with J17 unless you know what you are doing).

Color Codes and Pin Descriptions of the USB Serial UART Cable
Pin 1 of the serial USB UART 6-pin connector should be marked.


 * Pin 1 is black.
 * This is a ground wire in common with both x86 host and Jetson TX1 ground.
 * J21 pin 9 is convenient (there are several ground pins which would work).
 * Pin 2 is brown.
 * This is the host-side CTS (clear-to-send).
 * This will connect to Jetson TX1's RTS (request-to-send).
 * J21 pin 11 should be used.
 * Pin 3 is red.
 * This pin is supplied +5V from the host USB HUB, and is not used.
 * Pin 4 is orange.
 * This pin is TXD (transmit data).
 * This will connect to Jetson TX1's RXD (receive data).
 * J21 pin 10 should be used.
 * Pin 5 is yellow.
 * This pin is RXD (recieve data).
 * This will connect to Jetson TX1's TXD (transmit data).
 * J21 pin 8 should be used.
 * Pin 6 is green.
 * This pin is RTS (request-to-send).
 * This will connect to Jetson TX1's CTS (clear-to-send).
 * J21 pin 36 should be used.

The crossing over between send and receive (as well as request to send and clear to send) means this is a "NULL modem" or "crossover" cable.

Note that if you prefer to simplify the assembly, you can ignore the connection between CTS and RTS. Doing so implies using software flow control instead of CTS/RTS flow control

Required Parts
The USB serial UART has already been mentioned. The 6-pin connector is easily used in combination with soldering a ribbon cable to a standard 0.1in connector. The example here should work: https://www.digikey.com/product-detail/en/M20-9990646/952-2270-ND/3728234.

Any standard 0.1in spacing female header should work for the Jetson TX1's J21 connector. A connector capable of self-splicing of an inserted ribbon cable is recommended. Although many of these connectors were not intended to be re-opened and added to at a later date, there isn't usually an issue with opening the connector up and adding wires to a position which has never been used before. Here is a large list of example female 40-pin headers arranged in two rows: https://www.digikey.com/product-search/en?pv88=23&FV=fff40016%2Cfff802f5%2C1640001%2C1680002%2C800000f%2C8000014%2C8cc0003&k=ribbon&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=500.

Soldering to the 6-pin header will not be easy without a proper soldering iron. Once soldered these pins need insulation. The example used small diameter heat shrink tubing around each conductor, and then a larger diameter section of heat shrink tubing was used to keep the entire assembly together. Any stray wires may also be insulated with heat shrink tubing.

The cable was generic ribbon cable which thankfully was color coded exactly the same as the 6-pin cable of the USB serial UART. This makes knowing which orientation to use for connecting male and female 6-pin connectors a non-issue. If there is no color coding, then some means of insuring pin 1 of one connector matches pin 1 of the other connector is required.

The Example USB Serial UART Assembly
Here's a picture of what a working assembly is like:

Connecting a Linux Host to Jetson TX1 Serial Console
The final step from your Linux host to connecting to the serial console is to name the serial device file which belongs to the USB serial UART. This can present a challenge and a lot of guessing if you move your USB devices around, as they might enumerate differently depending on order of detecting USB devices.

The general naming of serial USB UART devices is of the format /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2...these names work well, but may not be convenient in the long run.

The udev automated system of naming device special files also categorizes many devices by type and then by information to the specific device (something like a serial number). These alternate names remain constant, and are simply symbolic links to the more common ttyUSB# scheme. These files are found in /dev/serial/by-id/.

The example USB serial UART has this symbolic link in /dev/serial/by-id/: usb-FTDI_FT232R_USB_UART_A10171DT-if00-port0. Other USB related serial console labels may change, this particular file should stay constant. This makes it easy to have several USB serial devices without mixing them up when operated simultaneously.

Some Serial Port Administration Information
Typically, the serial port requires sudo or root authority to access, which can be irritating. The serial port devices are group dialout, and adding your user to this gains access to serial ports without sudo. Programs requiring lock files (some of which are serial console programs) may require sudo or root access unless your user is a member of group lock. Consider using a non-root developer account and granting these groups:

sudo usermod -a -G dialout  ''sudo usermod -a -G lock  ''

Note that if you have installed OpenOCD, then udev may attempt to set your ttyUSB group to "plugdev", rather than to "dialout". If "plugdev" does not exist, then your ttyUSB files will default to group "root". If you use Fedora (and who knows how many other distributions), then getting group "dialout" back requires edit of "/lib/udev/rules.d/99-openocd.rules", replacing "plugdev" with "dialout".