UVC Device Mode

Is it possible to enumerate Xavier AGX Development kit as UVC Video OUT Device? Is there are any implementation or examples available?

There might be a way, and for other modes (not video), there is already an example. I will qualify this ahead of time by saying one would normally use isochronous transfer mode for video, but this is not supported on Jetsons. It is possible to use bulk transfer mode for video, but I don’t now how well that works.

On any other Jetson you would have to do this with the micro-B USB. For a normally running Xavier, if you connect the USB-C to your host PC, then you’ll notice it shows up on “lsusb -d 0955:7020”. During addition of optional packages from SDK Manager one interface of this device acts as an ethernet device, although it is really just a virtual device. This is how you get the “192.168.55.1” address for the Xavier, and the “192.168.55.100” address on the host PC over USB.

Plugging in the same USB-C, while running “watch -n 1 lsblk -f”, will result in also seeing the quite small virtual mass storage device with label “L4T-README”. This too is part of the same framework of having a device mode which is from “pretend” virtual devices. Sorry, no UVC example.

The API is part of Linux, and is the “gadget” framework. The code setting this up for the L4T-README and virtual ethernet and virtual router is found at:
/opt/nvidia/l4t-usb-device-mode/

What the gadget framework is could basically be considered a “template” for some of the standard class devices, but the end user must set up all of the variables. If you were to set up for isochronous mode, then it would fail. I have not used this for UVC, but so long as you stick to bulk transfer mode and fill in the correct template, then likely you would succeed. You could save an unmodified copy of the original files in “/opt/nvidia/l4t-usb-device-mode/”, and then experiment as you read up on the Linux kernel “gadget” framework.

Here is one gadget reference:
https://www.kernel.org/doc/html/v4.13/driver-api/usb/gadget.html

Or a general Google search:
https://www.google.com/search?source=hp&ei=sNZTX4mhN9e3tQaArZG4Cw&q=linux+kernel+gadget&oq=linux+kernel+gadget&gs_lcp=CgZwc3ktYWIQAzICCAAyBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB46DgguELEDEMcBEKMCEJMCOggILhCxAxCDAToFCAAQsQM6CwguELEDEMcBEKMCOggIABCxAxCDAToOCC4QsQMQgwEQxwEQowI6CAguEMcBEKMCOgUILhCxAzoICC4QxwEQrwE6AgguUKcEWPQZYNgsaABwAHgAgAGVAYgB8QiSAQQxOC4xmAEAoAEBqgEHZ3dzLXdpeg&sclient=psy-ab&ved=0ahUKEwiJubO10NLrAhXXW80KHYBWBLcQ4dUDCAg&uact=5

@linuxdev thanks for the information , I will look into it and give a try and let you know. Thanks!