Screen command not working for headless mode in Jetson nano 2GB

Hi,
I tried to use my first Jetson nano board using headless mode. My host computer is ubuntu 20.04.
I etched the Jetson Nano 2GB Developer Kit SD Card Image into my memory card from the NVIDIA website.
After connecting the board to my computer using the micro-usb and the usb-c port, I can see the a USB device on my computer. Specifically, lsusb produces the following output

Bus 001 Device 099: ID 0955:7020 NVIDIA Corp. L4T (Linux for Tegra) running on Tegra

I can also see /dev/ttyACM0 on my computer. Additionally I can see 2 ethernet connections in my computer. However, when I try to connect to the board using

sudo screen /dev/ttyACM0 115200

I only see a blank screen. The screen command probably is connecting to the board but nothing happens then. I have tried to unplug and plugging the board multiple times but I don’t notice any changes.

I don’t understand the problem. Your help is appreciated.

You should be able to use a terminal program on the serial device (e.g., I like gtkterm, others use minicom or picocom or anything else) to see the serial login. Once you are there with login, then this is when you would use screen to start screen. Otherwise you’re trying to reattach to an existing screen session on your local host which is not associated with the Nano. It is blank because there is nothing yet on the session.

I use screen a lot to a friend’s PC to help him start various long-running applications without ever using the GUI. I ssh to his system, and then use either screen directly (without sudo), or else sudo screen to start the session. After I get the process running I detach, then log out of ssh. I can then come back later on ssh (or he can) and reattach (such as with -r). Note that if the screen uses sudo, then you should use sudo during the reattach.

So in summary, the first thing you have to do is connect from host PC to Jetson without using screen since screen will be running on the remote system and not the local system. Then run screen. It won’t matter if you first connect via ethernet and ssh, or if you connect via serial console over ttyACM0screen won’t know and won’t care.

Thank you for your reply.
However, I don’t understand what you meant actually. Do you want me to connect the board to my ost pc using a serial cable? I don’t have a serial cable at this moment.
If it helps to understand what I am trying to do, it is exactly what shown in this jetsonhacks video. I am using the first method i.e till 7:38.
I was also expecting to see something similar. But I don’t understand why it works for him but not for me.

The description for serial console on a Nano is here:
https://www.jetsonhacks.com/2019/04/19/jetson-nano-serial-console/

One end of a serial console is usually a UART over USB, while the other end is usually just bare wires. Some Jetsons do have serial console on a micro-B USB connector, and can then use just a correct USB cable (without being a USB serial UART cable). In the case of a device with name “ttyACM0” it implies this is a serial UART USB cable with the USB connected to the computer which generates the file “/dev/ttyACM0” (presumably this is your host PC). You’ll see in the above URL that you do need a USB serial UART cable for serial console.

If you do not have such a cable, then you can simply use ssh. If your host PC has allowed the virtual wired ethernet over USB, then your host should be able to “ping 192.168.55.1”. This would imply you could successfully “ssh 192.168.55.1”. Or, if the regular ethernet is connected to a router the host PC is also connected to, then you could use the regular ethernet IP address and ssh to that.

Regardless, you must be connected to a logged in session on the remote Jetson prior to running screen. Technically you could run screen on the local PC, but it is something which does not make any sense and won’t do what you want it to do.

In that video’s URL he is using ethernet, but a serial console would also work. Any logged in session works. You could in fact run screen while logged in to serial console, detach, and then log back in either local to the Jetson or via ethernet ssh, and reattach. The trick is to have screen running on the Jetson itself during a logged in session, detach, and then later reattach via any logged in session. Then your host PC can disconnect or be rebooted, and the session will continue on the Jetson as if the host PC never disconnected.

Note that since screen runs on the Jetson and not on the host PC, then even though screen is a Linux program, you could even reattach from a Windows machine using PuTTY, or from a Mac, or anything else.

Note: In the video when he mentions a ttyACM it implies he is using serial console with a USB serial UART having the USB side connected to the host PC. Or else he is using a micro-B USB port which has an ACM serial UART integrated on the USB port (some Jetsons have this as a convenience, but it depends on the model).

Thanks. It worked. I appreciate your help.