Skip to content
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

Following the steps but does not work after plugin to pc #7

Closed
YunchuZhang opened this issue Nov 14, 2020 · 20 comments
Closed

Following the steps but does not work after plugin to pc #7

YunchuZhang opened this issue Nov 14, 2020 · 20 comments
Labels

Comments

@YunchuZhang
Copy link

Hi there,
Thanks for your writing. I want to ask when I finished all those steps and shutdown raspberry pis. When I plug it to pc, it does not show any devices in pc. Do you know what may caused this issue?

I am using pi zero w and mac

@geerlingguy
Copy link
Owner

When I plug it to pc, it does not show any devices in pc.

So are you plugging it into a PC or a Mac? In either case, you could go into Device Manager (on Windows) or About this Mac > System Report... and look for USB devices and see if you see a Raspberry Pi device connected.

Note that it takes 30 seconds to a minute the first time you plug it into your computer before it boots and would be available.

And if you have a really slow microSD card, it could take multiple minutes before it's available. Do you have an HDMI adapter you could use to watch the Pi's output while it boots up?

@YunchuZhang
Copy link
Author

I plug it to a Mac, and no device detected by it
but when I connect to a monitor and it boots up successfully

@YunchuZhang
Copy link
Author

image

@geerlingguy
Copy link
Owner

Can you run sudo systemctl status piwebcam too?

@YunchuZhang
Copy link
Author

Screen Shot 2020-11-14 at 6 59 41 PM

seems working on pi? What kind of usb cable it required? Does it need to be powered with another cable?

@YunchuZhang
Copy link
Author

I change another cable and it could work!!!
But the image seems too dark, is there a position I can modified the brightness? What is the range for that I saw default number is 55

@geerlingguy
Copy link
Owner

geerlingguy commented Nov 15, 2020

@YunchuZhang - Yay! Interesting that the cable was the problem, but glad you found that!

For the brightness, yes the default of 55 works great on macOS, and also I tested it on my Dell XPS 13 laptop and it seemed to work well in Windows 10 there. But I know some people mentioned that it should be set to 127 (or really, some value higher than the default 55). The range is up to 255, but if you set it to 0 it will likely be a black frame, and at 255 probably pure white :D

The way to do that would be to change the PU_BRIGHTNESS_DEFAULT_VAL value on this line (https://github.com/geerlingguy/uvc-gadget/blob/master/uvc-gadget.c#L91) and then recompile uvc-gadget. I really want that to be more easily configurable (see #4), because currently the only really easy way to do that is to fork my uvc-gadget repo and change it in your fork, then pull from there, or add a step to patch that file before it's applied on the Pi.

@YunchuZhang
Copy link
Author

what micro usb cable did you use for this? I bought two new cable from Amazon,
https://www.amazon.com/gp/product/B077HPJJFF/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
but does not work
Any recommend?

@geerlingguy
Copy link
Owner

I just used one of the old cables I have in my giant bag of USB cables I've collected over the years. I tried two different cables (one of them is Anker, the other I don't see any identifying mark), and both have worked for me.

@YunchuZhang
Copy link
Author

I found that if the cable has 'B' sign in the microusb part, it could work.
Does it mean the cable must be a usb-otg one?

@YunchuZhang
Copy link
Author

Also, when you try it with Linux Ubuntu systems, did you meet the error like this?

IMG_0375

@osilloh
Copy link

osilloh commented Nov 25, 2020

CheapPiCamjpg

This was a great little project as I have a bunch of Pi's, cheapy camera, and the flat heat sink you see, lying around. Runs at about 50 C with camera on. The camera was about $9 on Amazon and the case about $7, the Pi around $12, so this setup was <$30 US!

I did have to check here to get it to work as I am not an engineer or coder by any stretch of my imagination.

I could not get the camera to work on a Windows desktop after trying 4 different USB to micro USB cables. So I did a separate Pi USB power supply, waited for it to power up, than plugged in a USB to micro USB cable into my PC. Bingo, that worked.

I then removed the power supply cable to see what would happen. The camera remained up! with the USB in the other(non PWR-in) port!

So I'm wondering if its a timing thing, when I check device manager, I see this:

UVC Camera

But when I check with the single USB to MicroUSB cable in the PWR-IN port it does not appear.

Is it a timing issue? Where the camera is not yet started when the Pi is first plugged in so Windows does not detect it? Can you configure a delay to reset the code you have to bring up the camera? So Windows will see it?

Thanks you!

@starbasessd
Copy link

starbasessd commented Nov 25, 2020 via email

@starbasessd
Copy link

starbasessd commented Nov 25, 2020 via email

@osilloh
Copy link

osilloh commented Nov 25, 2020

ohhh. After watching the video again, I am supposed to use the USB port and NOT the PWR-IN port.

It works perfectly on the USB port with a single cable!

@YunchuZhang
Copy link
Author

ohhh. After watching the video again, I am supposed to use the USB port and NOT the PWR-IN port.

It works perfectly on the USB port with a single cable!

the cable matters for me. I use ps4 cables now and could work

@YunchuZhang
Copy link
Author

Another question is when I try with Linux, it fails and the fps shows wrong. Did you try with linux?
@geerlingguy @starbasessd
image

@0d0a
Copy link

0d0a commented Jan 15, 2021

my pi zero refuses to boot after updating to the latest raspberry pi os 5.4.83-v7l 1379 SMP Mon Dec !4 2020

@stale
Copy link

stale bot commented Apr 16, 2021

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Apr 16, 2021
@stale
Copy link

stale bot commented May 18, 2021

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants