JetsonHacks

Developing on NVIDIA® Jetson™ for AI on the Edge

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 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- (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, we access this through the micro-USB connector on the board.

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

Using a micro-USB to USB A cable, connect the micro-USB connector to the Jetson, and the other end of the USB cable to the host PC.

Note: Make sure that the cable is data capable. Some USB cables (such as those that come with phones) only transmit power. Here is a suitable USB to Micro-USB cable on Amazon.

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 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.

Facebook
Twitter
LinkedIn
Reddit
Email
Print

33 Responses

  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 ?

      1. You’ll need to install a terminal emulation/SSH program on your android tablet. You should have no problem finding one at the Play Store.
        That’s a good idea, I may look into it myself! (I’m currently using a PineBook Pro running MNJRO Linux.)

  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.

      1. I used the example 2 in your video(wireless) and i am able to find the ipaddress. However for me if i disconnect the usb from mac i cannot get to the nano with the ipaddress identified but when i connect the nano to my mac using usb i can ssh in to the nano with the same ipaddress identified. Any help as to why this would happen ?

        1. Difficult to diagnose from the information you give. Both the Nano and the Mac must be on the same wireless network. I don’t know how you determined the IP address, the IP using USB and WLAN are different.

          1. Thanks @kangalow, you are right. I jumbled up with the steps to follow, following the steps as listed worked like a charm.

  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

  6. although running sudo without a password is good for teaching, its really just bad form!

    consider showing how to make and use a shared key

  7. Thank you for your videos! I am having trouble with the screen cmd. The L4T-Readme drive is mounted, and I can detect the nano on dev/ttyACM0. However, running screen /dev/ttyACM0 115220, just printed “[screen is terminating]”. I have reflashed a bunch of times, with the same result each time. My host runs Manjaro linux, but I do not think that should matter. Any experience with this sort of problem?

  8. Hi and thank you for all of your great tutorials. I tried connecting to my Jetson in headless mode using your this tutorial, but since I needed the GPU, I tried to connect to the Jetson remotely using noMachine app and everything worked fine.
    The problem is that whenever there is no display connected to the Jetson at the booting time, the resolution is set to 640×480 and I cannot change that.

    1. Thank you for the kind words. I do not have anything to share on your issue. Please ask this question on the official NVIDIA Jetson Nano forum where a large group of developers and NVIDIA engineers share their experiences. Thanks for reading!

  9. love the videos. very helpful, cheerful, and applicable. the IP address of the nano changes after power down sometimes. is there a way to find out the IP address of the nano later on without the serial connection via screen? thanks again.

  10. Hello, Jetson Hacks!

    I am a HUGE fan of your very detailed and well explained videos and articles. I found this specific video and article fantastic. I used method 1: connecting the nano through the usb chord. It worked flawlessly while the USB was connected. However, when I took it off and tried to ssh into the nano, my computer spit out a time out error. How can I overcome this problem?

  11. I have been following your tutorial, I am running my Jetson Nano 4Gb from SDD and not from SDcard anymore. My nano is connected to the internet via Ethernet cable, it can hit aroung 600+Mbps. Now my issue is, I cannot find it in my network, it is unreachable but still connected to internet. Any help to resolve this issue? I am trying to setup some services and test it locally.

  12. hello, is it possible to do a headless installation like jetson orin nano? I am in doubt on this matter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer

Some links here are affiliate links. If you purchase through these links I will receive a small commission at no additional cost to you. As an Amazon Associate, I earn from qualifying purchases.

Books, Ideas & Other Curiosities