Jetson Nano – Headless Setup

Many people would like to set up their Jetson Nano without the need of attaching the Jetson to a monitor and keyboard (headless setup). With the advent of JetPack 4.2.1, this is now possible! Looky here:

Background

In earlier versions of JetPack, there was a requirement that the Jetson be connected to a monitor and keyboard (this is called ‘headed’ mode) to initially configure the Jetson the first time it boots. With the release of JetPack 4.2.1 it is possible to attach the Jetson through its default debugging port to a host computer’s tty device and enter this information through a serial application running on the host. In this case, the Jetson does not need a monitor or keyboard (this is called ‘headless’ mode).

The first time a Jetson Nano boots, a script allows the user to set their username and password, language, time zone, and so on. If the Jetson is attached to a monitor and keyboard, the user inputs the configuration from the Jetson keyboard.

In earlier versions of JetPack, this was the only way to configure the Jetson. With the advent of JetPack 4.2.1, it is now possible to do this configuration directly from a host computer without the need for the monitor and keyboard on the Jetson.

Many robotics and IoT applications do not need a desktop environment, and therefore have a different setup requirement from a desktop configuration. After all, why dig up an extra monitor and keyboard just to do a one time configuration for the Jetson? Also, because there is no desktop requirement, there is no need to have the extra support software for that environment on board. Running a minimal environment helps save space, and can lead to more efficient operation.

Note: You will see reference in most of the documentation to a host device and a target device. The Jetson is the target device, the host device is a PC desktop/laptop. On the Jetson Nano, if you simply create a SD Card Image from a NVIDIA supplied disk image, you can create the SD card and configure the Jetson from a machine running Windows, Linux or Macintosh. If you create your SD card through the SDK Manager, you will need an Ubuntu machine.

Tell me how

There is a script subsystem tool that runs on the Jetson the first time it boots, named oem-config (The link opens up the complete documentation on the NVIDIA website). If the Jetson has a display and keyboard, oem-config runs as the familiar GUI application on the Jetson and walks the user through the configuration process.

However, if there is no monitor and keyboard on the Jetson (headless mode), oem-config can configure the system through the default debugging port. On the Jetson Nano, the easiest way to access the debugging port is through the micro-USB connector. You will connect the micro-USB connector to the Jetson, and the other end of the USB cable will go to the host PC. Typically this is a USB Type A connector.

Note: Make sure that the cable is data capable. Some USB cables (such as those that come with phones) only transmit power.

You will need to supply power the Jetson through the barrel jack (don’t forget the jumper on J48!).

Setup

You will need a serial terminal application. In the video we use the app screen on the Ubuntu machine, an puTTY on the Windows machine example. screen also works on the Macintosh from the Terminal. You can install screen on Ubuntu:

$ sudo apt-get install screen

There are multiple network interfaces on the Jetson Nano, including ones which you may add yourself such as those for wifi access. Since this process is very well documented in the actual NVIDIA documentation and shown in the walk through video above, we won’t cover it in too much detail here. However, you will need to have your network connection up and running before oem-config starts setup, i.e. have your Ethernet cable plugged in and attached to the network, or wireless card installed and WiFi network accessible, etc.

You will also need to know the device/name of the Jetson when you plug it into the USB port of your host. On Linux and Macintosh, the Jetson will show up in the /dev directory. On Linux, the Jetson presents itself as a ttyACM* device (for example /dev/ttyACM0) and on a Mac a tty.usbmodem* device (something similar to /dev/tty.usbmodem148303). On Windows the Jetson is a COM* device.

On Linux and Mac you can simply ls the /dev directory, on Windows probably the easiest way is to use the Device Manager. You will need to show ‘hidden devices’ in the View menu, as ports are normally not shown.

It’s easiest to take inventory before you power the Jetson up, and then see what shows up after you power up the Jetson. Remember that it takes the Jetson ~ 45 seconds to boot, so you should be a little patient.

The Jetson interface is 115200 baud, so when using your serial terminal app you typically would enter something like:

$ screen /dev/ttyACM0 115200

where the address matches your configuration. Under Windows using puTTY, you enter the COM port number, and set the speed (see video).

You may need to hit the Esc key a couple of times when the serial app starts. Remember that it does take a while for the Jetson to boot, waiting a little while before starting setup is your friend. One of the setup issues that I have encountered is that if you try to exit/restart the configuration process, it may not be recoverable. In that case, you may need to flash the SD card and start again.

Most of the questions are simple, the only variation comes when you get to the Network Configuration screen. It is relatively straightforward. Once the Jetson is configured, it reboots. At this point you can ssh into the Jetson.

There is a small chicken and egg problem. You may not know the IP address of the Jetson. You can use the same USB cable and serial app to log in to the Jetson at this point and look up the address using something like ifconfig.

Once you know the IP address of the Jetson, you can then SSH into it. The command is:

$ ssh <account name>@<ipaddress>

An example:

$ ssh jetsonhacks@10.0.1.21

You should now be connected to the Jetson.

List o’ Stuff

Here’s a list of the bits and pieces used in the video:

These are all affiliate links. JetsonHacks gets a small commission on these items (but they don’t cost you anything more). These are all items that I have bought and used myself.

Conclusion

This is a little less nuts and bolts than most of the articles here on JetsonHacks. That’s mostly due to the fact that there are many paths your network configuration can take, as well as different machines that you can use as your host.

For most questions, you will be referred back to the official NVIDIA Jetson Nano Forum, so that a larger group of developers and NVIDIA engineers can lend their experience.

16 Comments

  1. I can tell where things are on my Windows 7 computer because it has a file tree. When it comes to Nano, I am a child. I have loaded lots of software on my Nano, but I have no idea if it was permanently installed and if so, where it is??? As software is being loaded, sometimes the loading dialogue says that a file can’t be found??? What causes that? Did I screw up creating the SD? Should I have loaded something else first? Help! I am lost in a foreign country, and I don’t speak the language.

  2. Great article. Headless mode expands the use case of jetson nano. How do I connect my android tablet to the nano when nano is in headless mode ?

  3. Great article , definitely headless mode extends the use cases of jetson nano. For the home project I am working on I want to connect it to android tablet(that I am not using) and run a GUI app(like capture a picture) and push the data in to jetson nano.

  4. Great video and very informative / entertaining !
    I followed the guide exactly but when I get to the stage where I connect my pc using putty to configure it shows a linux login and no opportunity to configure the device !
    I down loaded 4.2.1 which should allow headless set up – bit strange .
    Any ideas ? I’ll keep working at it anyway.

  5. Thanks for providing info. I am still waiting my nano kit to arrive and headless setup is saver – I simply do not have any keyboard/mouse/monitor – have been using notebooks for last 15 years.

    Question about power consumption. It is obvious that external DC power supply is necessary while USB is used for serial connectivity.

    However, if Nano does not have any external peripherals like wifi adapter, USB drives, keyboard, monitor, etc, will the 2A 5V USB sufficient to required power for the device to operate? Let’s consider real time motion/face detection use case.

    Separate question – is it possible to connect and setup the board via serial connectivity using GPIO instead of USB?

    Thanks

Leave a Reply

Your email address will not be published.


*