UVC can't work at mac

UVC can’t work at mac

when connect to mac computer,tx2_xudc will auto disabled

6,36590,1826351316,-;g_webcam gadget: high-speed config #1: Video
6,36591,1826356627,-;g_webcam gadget: uvc_function_set_alt(0, 0)
6,36592,1826361841,-;g_webcam gadget: uvc_function_set_alt(1, 0)
6,36593,1826367073,-;tegra-xudc-new 3550000.xudc: ep 5 (type: 2, dir: in) enabled
SUBSYSTEM=platform
DEVICE=+platform:3550000.xudc
6,36594,1826380653,-;g_webcam gadget: uvc_function_set_alt(1, 0)
6,36595,1826391496,-;g_webcam gadget: uvc_function_set_alt(1, 0)
6,36596,1826396732,-;tegra-xudc-new 3550000.xudc: ep 5 disabled
SUBSYSTEM=platform
DEVICE=+platform:3550000.xudc
6,36597,1826401859,-;g_webcam gadget: uvc_function_set_alt: state to streamoff

when worked with windows computer,it can work well
6,36590,1826351316,-;g_webcam gadget: high-speed config #1: Video
6,36591,1826356627,-;g_webcam gadget: uvc_function_set_alt(0, 0)
6,36592,1826361841,-;g_webcam gadget: uvc_function_set_alt(1, 0)
6,36593,1826367073,-;tegra-xudc-new 3550000.xudc: ep 5 (type: 2, dir: in) enabled
SUBSYSTEM=platform
DEVICE=+platform:3550000.xudc

anyone can help me for why i have this problem?

Please share more detail.
1 Do you connect TX2 USB2 microAB port to a mac notebook? Can TX2 be detected as device mode?
2 Looks like oyu are opening a USB camera plugged in TX2 board?

yes ,tx2 can detected as device mode

the same driver and uvc app i used at windows and mac

sudo insmod /home/nvidia/work/kernel/kernel-4.4/drivers/media/v4l2-core/videobuf2-vmalloc.ko
sudo insmod /home/nvidia/work/kernel/kernel-4.4/drivers/usb/gadget/libcomposite.ko
sudo insmod /home/nvidia/work/kernel/kernel-4.4/drivers/usb/gadget/function/usb_f_uvc.ko bulk_streaming_ep=1 bulk_max_size=1843200
sudo insmod /home/nvidia/work/kernel/kernel-4.4/drivers/usb/gadget/legacy/g_webcam.ko

when connect to mac , tx2 udc report different with windows
6,36590,1826351316,-;g_webcam gadget: high-speed config #1: Video
6,36591,1826356627,-;g_webcam gadget: uvc_function_set_alt(0, 0)
6,36592,1826361841,-;g_webcam gadget: uvc_function_set_alt(1, 0)
6,36593,1826367073,-;tegra-xudc-new 3550000.xudc: ep 5 (type: 2, dir: in) enabled
SUBSYSTEM=platform
DEVICE=+platform:3550000.xudc

  • [b]6,36594,1826380653,-;g_webcam gadget: uvc_function_set_alt(1, 0) 6,36595,1826391496,-;g_webcam gadget: uvc_function_set_alt(1, 0) 6,36596,1826396732,-;tegra-xudc-new 3550000.xudc: ep 5 disabled SUBSYSTEM=platform DEVICE=+platform:3550000.xudc 6,36597,1826401859,-;g_webcam gadget: uvc_function_set_alt: state to streamoff[/b]
  • Hi,
    For more information, you connect a USB camera to USB3 type A on TX2 developer board and connect mac to USB2 micro AB on TX2 developer board? What is the usecase of this connections? Why not simple connect mac to a USB camera?

    Hi DaneLLL,

    I am jumping in just a little bit to provide some comments on your question. Actually capturing from a USB capable device or a MIPI/CSI camera on a Jetson platform and forwarding it to a host computer using something like UVC or network streaming is a very common use case.

    There is a bunch of possible products where you can allow the user to simply attach a webcam or use a custom camera and do some image processing within the Jetson, providing only the result of the computer vision processing to the host computer. This allows products to offer specialized and pocket-size solutions in computer vision field, being agnostic to the host computer on which it is going to be seen.

    Consider, for example, the following UVC demo running on Xavier, you can later just implement an object tracker or an NN within the Jetson and use it in the same way.

    Regards,

    Is the transfer mode isochronous? If so, then the micro-AB port does not support this in device mode.

    Hi,
    We don’t support GadgetFS.
    [url]https://devtalk.nvidia.com/default/topic/1046776/jetson-tx2/usb-3-2-can-t-set-config-1-error-110/post/5312690/#5312690[/url]

    You probably can try ConfigFS
    https://events.static.linuxfound.org/sites/events/files/slides/USB Gadget Configfs API_0.pdf

    Hi,

    1. From his log, it looks like he is using legacy drivers and not ConfigFS (or GadgetFS which is just an older attempt of ConfigFS). I think this is the best way to test UVC reducing the source of problems.

    2. There is no information about the user space application he is using alongside the driver but I assume it is Laurent’s sample code.

    3. It is not clear whether it works on Windows/Linux.

    4. From his log, it looks like he is enabling the bulk mode in the driver, I wonder if the UVC driver has been already modified to support bulk endpoints.

    Best Regards,