Error creating USB gadgets on Jetson Nano

Hi,

I want to make use of the USB gadgets functionality, specifically the NCM mode. I’ve been following the guide made by RidgeRun to get ECM working first, but hitting a roadblock at step #4, when I’m trying to edit the idVendor file and fill that with the VID previously set. Error I get is:

jetson@jetson:/sys/kernel/config/usb_gadget/l4t$ sudo echo "$VID" > idVendor
bash: idVendor: Permission denied

I’m using the micro-USB port on the Jetson Nano Developer kit and have tried this both with the cable plugged and unplugged.

This is full version info:

Model: NVIDIA Jetson Nano Developer Kit - Jetpack 4.6 [L4T 32.6.1]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - P-Number: p3448-0000
 - Module: NVIDIA Jetson Nano (4 GB ram)
Platform:
 - Distribution: Ubuntu 18.04 Bionic Beaver
 - Release: 4.9.253-tegra
jtop:
 - Version: 4.2.6
 - Service: Active
Libraries:
 - CUDA: 10.2.300
 - cuDNN: 8.2.1.32
 - TensorRT: 8.0.1.6
 - VPI: 1.1.15
 - Vulkan: 1.2.70
 - OpenCV: 4.1.1 - with CUDA: NO

Thank you!

Hi,
We would suggest consult with 3rdparty to get support. They should have more experience about the function and can provide further suggestion.

1 Like

Not an answer, but those files in /sys are pseudo files that don’t actually exist on the disk. These are actually in RAM as part of the driver itself. This means that since you used sudo, that the driver is not accepting a write to the file. There is probably some other requirement locking the file, e.g., if you have a USB cable plugged in already, then it might lock out changes. The device mode service could perhaps be temporarily turned off, and the cable removed, after which maybe it will work.

1 Like

Thank you both! As soon as I switched to ‘root’, it all went in fine. But actually didn’t need RidgeRun’s guide, the Nvidia scripts (after I discovered them) were more than enough. I think it’s a topic that maybe should be covered a bit better in the documentation.