-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on Raspberry Pi 4B or A/A+ #5
Comments
I decided to also try on my 3 B+ today, and it exhibited the exact same behavior—that is, it gets stuck with the 'ACT' LED stuck on: And at the same point during the bootup it gets stuck at some point (it changes each time, which suggests it starts loading piwebcam.service then while another unit is loading it locks up): |
Trying on the Pi 3B, it got stuck at ssh.service on the screen, but the ACT LED never stayed on green. |
2B is giving different behaviors on different boots. It gets past the 'Welcome to the Desktop' splash screen sometimes, and it's ACT LED doesn't stay lit green either. |
Just for fun I tried the original Pi 1 and it booted all the way, but I don't believe its USB power port can double as OTG. I'm testing with an original A+ model now... |
A+ seems to get locked up during the splash screen too. |
On my Pi 4, after starting off the
Screenshotted: And over in dmesg seeing a lot of:
|
Also I ran |
Had the same issues. Now it works. |
Had the same issues, with a raspberry Pi 4, I also had this RCU error. Update: it is really unstable, hangs multiple seconds at a time, cannot be killed, and sometimes needs some re-plugging to be recognized. |
just a note for those struggling to get the pi 4 (I think it is model B) to work following the Directions for setting up a RaspberryPi to act as a generic USB webcam even with the older Raspbian Buster Lite 2020-02-13: Do not run Right now using both the internal webcam of my laptop and the pi 4 with attached hq cam as a uvc device within obs studio on arch linux. I cannot yet confirm hangs, or stability issues as @blaueente describes, although when trying to stop uvc-gadget on the pi, it will fail and eventually try to remount the whole sdcard filesystem read-only and also become unresponsive (i.e. I have to power cycle it) The pi is connected to network via wifi, I have not yet tested wether it can also connect via ethernet while being used as an uvc device. Also note that, until I successfully started
and only after starting uvc-gadget I got:
and could use the pi as a webcam. |
Thanks for posting all the feedback; I agree with @blaueente that it would be better if we could find a way to make things work with newer kernels—locking in to an old kernel is not a wonderful option for many reasons (security, other software patches, etc.). It's so strange that I can't get it to work even on the original A+ I have though, while the Zero happily runs. Don't they use the same SoC? |
Just noting the download for Raspbian older releases is over at http://downloads.raspberrypi.org/raspbian/images/raspbian-2020-02-07/ |
This is only possible on the Raspberry Pi 0, 0W, A, A+, and 4. The Pi B, B+, 2, 3, 3A+, and 3B+ lack the required pin for OTG. https://raspberrypi.stackexchange.com/questions/71613/how-to-use-raspberry-pi-3-as-a-usb-gadget |
@fangfufu - Ah, that's news to me, I thought all the Pis were able to do it. Good to know, and I think I should add a compatibility chart on the README. |
For the PI4's (especially after the modded usb-c power issues) look here: |
Using the old kernal work around on 4b, camera only works in Facetime on Mac, no other apps recognize the can. Works fine on PC. Interestingly using 4b alpha version of show me webcam only works on Mac if cam is opened first in Photo Booth, then extremely laggy. Scrambled vertical bars otherwise. |
I have the same problem. |
Have you considered insufficient power consumption and powered the 4B over GPIO instead of USB? |
@kolewu The only way it could work for a Raspberry Pi 4 is a powered USB hub with output specs that supports ≥2.5A in a single port, and that's not an easy thing to find. In Amazon you'll most likely end up with charging stations, followed by powered USB hubs that separates charging ports and data ports and the latter only gives ≤2.0A. I am still testing multiple brands of USB hubs at the moment. |
The port being used Pi 4 | USB-C 'Power' port not USB 2.0 https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/ dwc2 sets a 'lower power' gadget mode. So presumably its also being connected to usb 3.0, but also isn't the problem universal and happens on all except zero for some reason? Also though I am reading it should be https://www.kernel.org/doc/Documentation/devicetree/bindings/usb/generic.txt @geerlingguy Have you had a browse of these? |
I tried to use a Pi 3A+ for the webcam and it didn't work. I do not read a lot about the 3A+ here. I tried with the current RaspianOS (2021-01-12 - lite and desktop) and it stuck every time at swap or bluetooth during booting. After I found this article I tried the version 2020-05-28-lite. There it fully boots up, but no new device pops up on my Windows PC. During shutdown the Pi, it stuck at bluetooth device. After that I tried 2020-02-07-lite. Fully start up and shutdown but no device on my PC. Your sheet at the main page said, that I have to use a USB-A to USB-A Cable. I used one of that and it fully powered up the Pi. (I had undervoltage using it directly on my PC front panel, I solved the problem with an active powered USB hub) Is there a mistake on my side or did I missed to read something here? |
@DarkStiller this was already answered above: #5 (comment) It isn't possible on 3A+ due to lack of necessary hardware support. |
Edit 2: Got it working on Linux with a Pi 4 Model B over USB-C (after removing the C/CS-mount adapter https://youtu.be/3S1MQM8B-DU?t=186): Original rant:Not sure if this is relevant, just started tinkering with it so haven't really had time to dissect this fully.
And checking
This is on a Raspberry Pi 4 Model B from 2018, using OS Version 10 (Buster):
It does boot however, which is a good sign. On the cient-side (the desktop that wants to use the webcam), I get the following after the ansible playbook:
All I had to do was add
And I'm one step closer to resolving this issue.
I still don't know what Edit / fix:Adding And after a bit of digging around, it feels like it's the serial driver that doesn't want to comply.
(modified from https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/) And I get this on the client machine:
The "side effect" being that I also get a network controller thrown in there.
And that you have to use a "proper" USB-C cable, anyone with Quick-Charge or Power-Delivery or w/e they call it should work. |
Some resources on the topic that summarized my random input better that I wish I found before I debugged:
And it seams like the first link has some interesting stuff to get it working on Windows. |
Tested on Windows 10, works there as well with the following
It's taken from the link mentioned in the previous post and replaces the one from my previous post. |
I have a Mac and have not been able to get the 1080p to work. The 1080p camera shows up just as the 720p camera shows up, I'm able to login via a serial connection and the status of piwebcam looks as successful as the 720p piwebcam status, however both OBS or Photo Booth show a black screen.
Has anyone been able to use a Pi 4/HQ Camera/1080p with a Mac? For consideration, here are the two status screens from the successful 720p and unsuccessful 1080p:
Given the status is seems to be successful on both, it seems to be a Mac issue. Thanks, |
Did someone have any success running the gadget on the pi 4 with newer 5.x kernels? always getting the RCU error? Side note, you can downgrade your kernel on an up-to-date raspberry OS using rpi-update. The following command sets up the latest available 4.19 kernel that works with UVC gadget:
|
Has anyone managed to get this going yet out of interest? I was hoping to use an RPi 0W mk2 for a webcam but naturally, that isn't supported in the known good 2020 build |
@JamesHannon - I opened a new, separate issue for that specific use case (hopefully it works?) #54 |
Perhaps related to recent breaking changes to the camera drivers: https://www.raspberrypi.com/news/bullseye-camera-system/ And they've setup a repository showcasing how to use it: https://github.com/raspberrypi/libcamera-apps I'm to unfamiliar with RPi to get this working again. |
You can either switch to using the legacy camera stack, or somehow someone/somewhere we need to get uvc-gadget support with libcamera integration. |
Yea the second one I guess. First isn't really a sustainable option. I got it working with RTSP and stuff but those have a slight delay compared to uvc-gadget :) |
If anyone is interested in working on this and has time, I'll be happy to help guide or support them on it, but I haven't had time to work on it myself yet. |
I'd love to but would mean a lot of effort |
Hello kbingham, I'm really interested in a guide because I'm completely lost, I bought a RPi 4 B 2gb and everything was going well, I've plugged it into a Windows OS (also Debian) and it was recognized as a UVC camera on Windows as well on Linux. But when I tried to see the video stream, the device suddenly disappears from both OS... I tried to install an old release of raspbian like it was told previously in this post but it doesn't boot on this RPi 4, it shows me the same screen as when there's no sd card in it. |
I wanted to be able to have this project work great on the Pi 4, even though it makes the footprint a little larger... but it seems to not work so well. When you start the service, the system just halts, no input, no log output, nothing. And when you have it enabled on boot, the system gets to the step
polkit.service
(according to the GUI boot screen) and then does the same (just... stops).The green LED goes on and remains steady, lit until you physically power off the Pi. Nothing responds to input.
Strange thing, and it looks like I'm not the only one who's experienced this—see https://gist.github.com/justinschuldt/36469e2a89d95ef158a8c4df091e9cb4#gistcomment-3467068
Current workaround
You can download the 2020-02-07 Raspbian release and run it instead of the latest kernel, and it should work on that version. Don't run
sudo apt-get update
orrpi-update
or you'll be upgraded to the newer kernel that doesn't currently work with this project.The text was updated successfully, but these errors were encountered: