USB not working on Jetson Nano

Hello,
I wanted to install my Jetson Nano using the headless mode as describe in : Getting Started With Jetson Nano Developer Kit | NVIDIA Developer
Unfortunately when I connected the USB cable between my PC and my Jetson nothing appears on my PC. I tried different cable and also on Linux and on Windows but it didn’t work. So I have decided to use my Jetson in the classic mode. I have noticed that when I launch my Jetson the same error message always display :
[FAILED] Failed to start Configure USB flashing port for device mode.
And I have done several test and the USB keep not working.
Does anyone have an idea ?
Thank you in advance

Hi,

What kind of usb not works here? Usb devices like mouse/keyboard or only the usb device mode to your PC?

If usb mouse/keyboard is not working now, I would suggest you can use the UART to access the board and dump the log for us.

Hi,

It’s the USB mode. I have no issues concerning the usb mouse/keyboard

Ok, then could you use mouse/keyboard + HDMI monitor to operate your jetson nano.

Run below command and share the result.

nvidia@nvidia-desktop:~$ sudo systemctl status nv-l4t-usb-device-mode

It give me this :

nv-l4t-usb-device-mode.service - Configure USB flashing port for device mode
Loaded: loaded (/etc/systemd/system/nv-l4t-usb-device-mode.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-05-04 18:59:20 CEST; 15h ago
Main PID: 4405 (code=exited, status=1/FAILURE)

mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[4872]: /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh: line 34: echo: write error: No such device
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5004]: rmdir: failed to remove ‘l4t/configs/c.1/strings/0x409’: No such file or directory
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5014]: rmdir: failed to remove ‘l4t/functions/ncm.usb0/’: No such file or directory
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5016]: rmdir: failed to remove ‘l4t/functions/ecm.usb0/’: No such file or directory
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5019]: rmdir: failed to remove ‘l4t/functions/mass_storage.0/’: No such file or directory
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5021]: rmdir: failed to remove ‘l4t/functions/acm.GS0/’: No such file or directory
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5034]: l4tbr0: ERROR while getting interface flags: No such device
mai 04 18:59:17 jetsonnano nv-l4t-usb-device-mode-stop.sh[5040]: bridge l4tbr0 doesn’t exist; can’t delete it
mai 04 18:59:20 jetsonnano systemd[1]: nv-l4t-usb-device-mode.service: Failed with result ‘exit-code’.
mai 04 18:59:20 jetsonnano systemd[1]: Failed to start Configure USB flashing port for device mode.

What will be printed if you reboot the device and directly run this ?

sudo /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh

It print this :
opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh: line 127: echo: write error: Invalid argument

Which software release are you using?

I’m using Ubuntu 20.04

I mean the jetpack release on jetson.

I don’t know I have installed the Jetson Nano image on this tutorial : https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write

Oh ok. Jetpack4.5.1.

Does below patch exist on your jetson nano?

/sys/kernel/config/usb_gadget/l4t/functions/rndis.usb0/host_addr

If no, then does “/sys/kernel/config/usb_gadget/” exist?

Yes the first one exist and there is a MAC address inside.

Ok, then we do below command to clean up previous setup first and try again and see what error would be.

sudo /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh
sudo /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh

It’s the same error that last time :

sudo /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh
[sudo] password for jetsonnano:
/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh: line 34: echo: write error: No such device
rmdir: failed to remove ‘l4t/configs/c.1/strings/0x409’: No such file or directory
rmdir: failed to remove ‘l4t/functions/ncm.usb0/’: No such file or directory
rmdir: failed to remove ‘l4t/functions/ecm.usb0/’: No such file or directory
rmdir: failed to remove ‘l4t/functions/mass_storage.0/’: No such file or directory
rmdir: failed to remove ‘l4t/functions/acm.GS0/’: No such file or directory
l4tbr0: ERROR while getting interface flags: No such device
bridge l4tbr0 doesn’t exist; can’t delete it
jetsonnano@jetsonnano:~$ sudo /opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh
/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh: line 127: echo: write error: Invalid argument

I think I got this error before. I think that time I need to delete

/opt/nvidia/l4t-usb-device-mode/mac-addresses

and reset the Nano then it works again.

Can you upload your /opt/nvidia/l4t-usb-device-mode as a tarball here to see if it is modified somehow?

1 Like

Thanks for your response !
So I delete the file like you said and then I reboot and try to connect to my PC and it didin’t work…
I have done a tarball before and after I have deleted the file and I notice that before the mac-addresses file was empty and then it has data written inside. I upload the two tarball maybe you will notice something after.tar (34.6 KB) before.tar (32.9 KB)

Does the script still say the error is on line 127?

Yes it says :
/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode-start.sh: line 127: echo: write error: Device or resource busy