I have this enumerating and streaming synthetic uncompressed data to FaceTime via my Raspberry Pi Zero W. The ConfigFS example in the kernel gadget documentation works for the most part. It has some typos when it comes to proper
../.. path navigation, the
streaming_maxpacket field which no longer exists in ConfigFS, and you'll need to set bDeviceClass=239, bDeviceSubClass=0x02, bDeviceProtocol=0x01. However, for starters it's actually simpler to just run the legacy
modprobe g_webcam. I'm assuming you have the required dtoverlay=dwc2 and have tested other gadget modules like
g_serial. It sounds like you might already be using
g_ether or the ConfigFS equivalent for your workaround networking solution.
When you enable the g_webcam module, it won't enumerate on a typical Mac/Windows/Linux PC until the userspace uvc-gadget program is running. Setting this up has its pitfalls as the required patches were never fully reviewed by Laurent Pinchart and introduce bugs of their own. You can find my patched repo with fixes here. I have run that with
./uvc-gadget -d -u /dev/video0 on both Raspbian 8 Jessie and Raspbian 9 Stretch.
I'm basically describing the same steps as you saw joe60 did on the Raspberry Pi forums, but as it's a very error-prone procedure having another reference point shouldn't hurt.
Note that even once you have the base case working there's a large cross-product of cases for the format (
-f), memory type (
-o), bulk vs isochronous (
-b) and image data source (
-v), much of which may have limited support in the uvc-gadget application.