Page 1 of 1

missing webcam

Posted: Wed Nov 29, 2017 11:27 am
by pakikje
Hello y'all,

I have 2 webcams attached to my SBC (Orange Pi plus) from which i take a 1 snapshot every minute. (fswebcam/cron)

Sometimes one webcam is gone in the system. "lsusb" will only show 1 webcam (/dev/video0) at that moment. This seems to be related to the usb-ports on my SBC (can't handle the load and dumps 1 device?). What i do is reboot the SBC and usually this will solve the problem.

But: isn't there a way (command) to re-scan the hardware and solve the problem like that?? (i am usually not near the SBC so i an looking for a "remote" solution)

ps: both webcams are Logitech (pro 5000 and E 3500)

Re: missing webcam

Posted: Wed Nov 29, 2017 12:22 pm
by pakikje
I think i found it :-)

"modprobe -v uvcvideo"

Re: missing webcam

Posted: Fri Dec 01, 2017 5:57 am
by WarHawk
Was the driver itself unloading?

What does the error messages in the /var/log look like?

Did the modprobe fix the issue or has it returned?

Re: missing webcam

Posted: Fri Dec 01, 2017 2:16 pm
by pakikje
The issue hasn't returned yet. I will have a look and report when i know more.. Thnx for the input.

Re: missing webcam

Posted: Sun Dec 03, 2017 2:39 pm
by pakikje
It happened again. Modprobe command didn't fix the problem. lsusb gives me:

Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 046d:08ce Logitech, Inc. QuickCam Pro 5000
Bus 002 Device 004: ID 045e:0800 Microsoft Corp.
Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Most log-file are empty. Is there a specific log-file i should be looking in?

The command: "v4l2-ctl --list-devices" gives me:
UVC Camera (046d:08ce) (usb-sunxi-ehci-1.4):
/dev/video1

Failed to open /dev/video0: No such file or directory


ps: Both logitech webcam use the same driver (one is still working/detected)
ps: after a reboot the lost cam was defected again.

root@HomeAssistant:~# lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 046d:08ce Logitech, Inc. QuickCam Pro 5000
Bus 002 Device 004: ID 045e:0800 Microsoft Corp.
Bus 002 Device 003: ID 046d:09a4 Logitech, Inc. QuickCam E 3500
Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Re: missing webcam

Posted: Sun Dec 03, 2017 4:05 pm
by pakikje
I just want to add that i switched from fswebcam to ffmpeg (for taking a snapshot from the webcams). I noticed that ffmpeg takes better screenshots, don't know why. I hope that it will also help with the above mentioned problem. (perhaps?)

Re: missing webcam

Posted: Wed Dec 06, 2017 8:28 am
by pakikje
i added a usb-dock with power supply to the sbc. (and moved the usb-cams to this dock. Let's see if this helps.

Re: missing webcam

Posted: Thu Dec 07, 2017 2:16 pm
by pakikje
Right, the usb-dock did help a bit. (/dev/video1 hasn't disappeared anymore). Other problem: frequently ffmpeg can't get an image from this webcam (at 640x480 pix). I changed my bash-script so it will first grab a 320x240 image (which works all the time) and then try to grab a 640x480 image. If the second one fails i always have the 320x240 image.

Re: missing webcam

Posted: Sat Dec 30, 2017 6:11 pm
by pakikje
I am using "motion" now. Somehow "motion" prevents the cam's from hooking all the memory and that prevents input/output errors.