wuhanstudio Posted January 27, 2022 Share Posted January 27, 2022 (edited) Armbianmonitor: http://ix.io/3NF9 Hi, I was trying to use OrangePi One to add a filter to my USB camera, so that I can apply some image processing to the original input image. The original project uses raspberrypi: https://github.com/likeablob/rpi-wfh-webcam It captures the image from a USB Camera, then applys some image processing on Raspberry Pi. Lastly, it creates a virtual camera that sends the output image to the PC. I would like to achieve the same effect using OrangePi One (Armbian), and the only problem left is to simulate a virtual camera using the USB Gadget. What I tried: $ sudo modprobe g_webcam musb-hdrc.4.auto: failed to start g_webcam: -22 According to this post, a more preferred way to do this is to use configfs: I followed instructions here: https://developer.ridgerun.com/wiki/index.php?title=How_to_use_the_UVC_gadget_driver_in_Linux But unfortunately, it returned with the same error: Invalid Argument: sudo modprobe libcomposite dwc2 usb_f_uvc mkdir -p /sys/kernel/config/usb_gadget/g1 cd /sys/kernel/config/usb_gadget/g1 echo 0x0525 > idVendor echo 0x0102 > idProduct mkdir -p strings/0x409 echo 0123456789 > strings/0x409/serialnumber echo $(hostname) > strings/0x409/manufacturer echo "UVC Gadget" > strings/0x409/product mkdir configs/c.1 mkdir configs/c.1/strings/0x409 mkdir functions/uvc.0 mkdir -p functions/uvc.0/streaming/uncompressed/u/360p cat <<EOF > functions/uvc.0/streaming/uncompressed/u/360p/dwFrameInterval 666666 1000000 5000000 EOF mkdir functions/uvc.0/streaming/header/h cd functions/uvc.0/streaming/header/h ln -s ../../uncompressed/u cd ../../class/fs ln -s ../../header/h cd ../../class/hs ln -s ../../header/h cd ../../class/ss ln -s ../../header/h cd ../../../control mkdir -p header/h ln -s header/h class/fs ln -s header/h class/ss cd ../../../ echo 2048 > functions/uvc.0/streaming_maxpacket ln -s functions/uvc.0 configs/c.1 ls /sys/class/udc > UDC Does this mean the Allwinner H2/H3 USB IP Core does not support g_webcam / usb_f_uvc ? (Both g_serial and g_eth works, but not g_webcam) Edited January 27, 2022 by wuhanstudio 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.