How to work Pico B with CSI2 Camera module as UVC.

  • Hello,

    To achieve UVC functionality with your Luckfox Pico Mini B and CSI camera module when connected to a PC via USB-C, you can refer to the tutorial at the following link:

    Tutorial link:https://wiki.luckfox.com/Luckfox-Pico/L ... usb-camera
  • Thank you for the Link. However, that is the way to connect a USB camera to a LuckFox Pico, which is the opposite of what I want to achieve.
    I will wait for the SDK to be updated in the future.
    Thanks again.
  • Thank you for your feedback. If your goal is realized in a future SDK update, we will notify you as soon as it becomes available.
  • I have the same function requirement, Does the SDK have update?
  • I believe this should work with the SDK as-is. You´d need to configure the kernel to add UVC USB gadget, then configure your usb gadget module
    https://www.kernel.org/doc/html//next/u ... t_uvc.html
  • Not sure about Pico B, but I'm pretty close to making it work on Pico Pro. Here's what I did:

    -compiled buildroot with UVC gadget (you can also manually edit /etc/init.d/S50usbgadget.sh to enable UVC mode)
    -cross-compiled uvc-gadget from https://github.com/wlhe/uvc-gadget
    This version of uvc-gadget recognizes the UVC device and allows streaming of empty content or JPEG image. What does not work is streaming of V4L2 device to UVC device - for some reason ioctl shows 'bad file descriptor' error.
    I think that this may work - v4l2-ctl uses same ioctl methods, but it works in v4l2-ctl and not in uvc-gadget.
  • On my RV1106 pico pro board,
    I tried /etc/init.d/S50uvcdevice script and /oem/usr/bin/usb_config.sh, but camera device did not appear on host's device manager.
    The configfs generated by the script is flawless.
    But UDC binding is not interacting with host USB and host is not detecting anything.

    I tried UVC gadget on other SoCs, but did not see this issue.
    If anyone solved this issue, please share how.