USB / Network freeze with Logitech C920 webcam


11 posts
by mattiasottosson » Sat Apr 06, 2013 1:32 pm
Hi all.

I'm building a small weather station for my parents with my pi. I wanted a fairly decent image quality so I went for the Logitech C920 It all works pretty well for a couple of hours mostly, with arch linux, i can capture full 1080p, with no image corruption.

However, suddenly the network and usb connection drops, and there's nothing to do except pull the power cord and restart it.

I've updated to the latest firmware and kernel, tried both arch linux and raspbian, tried different cabels, power adapters and usb hubs and the bandwidth quirk described in http://elinux.org/R-Pi_Troubleshooting#freeze and i also verified the voltage with a multimeter and it's in the acceptable range, but it still crashes.

Before the connection drops, you can see all that the network leds on the motherboard turns off for a second or two, then comes back on, so there's something going on there.

Just found out that the system itself dosen't crash, it's only the network connection, if i play a sound with aplay, it keeps on playing after the network connection drops. Maybe there's a way to reset the usb/network services?

Since it only needs to upload a image / temperature data every ten minutes, that could be a ugly workaround for now.

/Mattias
Posts: 2
Joined: Sat Apr 06, 2013 1:15 pm
by broo0ose » Sat Apr 06, 2013 2:47 pm
You could try

Code: Select all
sudo /etc/init.d/networking restart
Posts: 238
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK
by mattiasottosson » Sun Apr 07, 2013 5:53 pm
Thanks for the reply!

Do you know the equivalent in arch linux?
Posts: 2
Joined: Sat Apr 06, 2013 1:15 pm
by broo0ose » Sun Apr 07, 2013 7:22 pm
Sorry no, I missed that you were using arch, I'm sure someone will know.
Posts: 238
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK
by rpiuser3000 » Tue Jul 02, 2013 12:45 am
Hey,

I have exactly the same problem on my raspberry pi when webcam is plugged in and is taking snapshots.My webcam is Microsoft Lifecam HD-3000. I tried different usb power adapters and powered usb hub. USB hub is powered by 2 amp power adapter and raspberry by 1 amper. It happens on both of my raspberries- 256 and 512 versions. -

This webcam has absolutely no problems on old Celeron PC that is running ubuntu 12.10.
Posts: 21
Joined: Sat Apr 27, 2013 11:47 pm
by rpiuser3000 » Thu Jul 04, 2013 9:47 pm
I've decided to simply reset the webcam's usb port every hour and everything has being working stable for ~48 hours now.
It's not the best solution, but it works and takes few seconds to reset instead of rebooting the whole device.


echo 1-1.2 > /sys/bus/usb/drivers/usb/unbind
echo 1-1.2 > /sys/bus/usb/drivers/usb/bind


the 1-1.2 part you have to change with whatever port your devices is connected to. dmesg shows that information when you plug it in.
Posts: 21
Joined: Sat Apr 27, 2013 11:47 pm
by gsh » Fri Jul 05, 2013 7:38 pm
Do you see any errors in dmesg?
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 763
Joined: Sat Sep 10, 2011 11:43 am
by rpiuser3000 » Sat Jul 06, 2013 2:50 am
gsh wrote:Do you see any errors in dmesg?


Nope, no errors except for
Code: Select all
 w1_slave_driver 28-0000044b5dde: 18S20 doesn't respond to CONVERT_TEMP.
which is completely unrelated to usb.

Its being up for 22:50:38 up 3 days now and usb/ethernet didn't hang.(with the hourly usb reset) I am continuously(every 60 seconds) taking picture from webcam and setting it as background for my RPI alarm clock web application.

Image

Btw, I am looking for a good icon for temperature thermometer sensor.
Posts: 21
Joined: Sat Apr 27, 2013 11:47 pm
by brian.hudson » Sun Dec 08, 2013 12:45 am
Greetings.

I know this is an old thread, but I was hoping you (original poster) could give me some advice.

I have a Pi B (512) with Raspian (2013-12 build) and a Logitech C920 camera.

Using V4L2, I can easily access the camera as an input for VLC. I can successfully open the camera in full 1080p/30fps/H264 mode. However, when attempting to save or stream video, it is periodically corrupted with square artifacts, which appear for a few seconds then clear up. This happens with nearly any resolution, so I don't think its an issue with the Pi's USB port not keeping up.

This isn't an issue with the C920's H264 encoding, since the same camera works flawlessly through V4L2 / VLC on a Linux Mint 14 / x86 processor. I believe this is a problem with the V4L2 driver on the Pi (ARM).

You mentioned that you were able to capture full 1080p @ 30fps. Could you share your setup for doing that? Perhaps it would help me track down the problem I am seeing..

Many thanks,

--brian
Posts: 1
Joined: Sun Dec 08, 2013 12:38 am
by wymand » Wed Dec 18, 2013 12:58 am
I am streaming 1280X720 using mjpg_streamer without a hitch. It even works on a camera board out of a bricked web cam
( USB ID 0402-8667) that did not work with other software.
Never stop learning
Never stop evolving
User avatar
Posts: 18
Joined: Thu Nov 28, 2013 2:06 am
Location: Tiger Mountain in the Issaquah Alps
by gsh » Sat Feb 22, 2014 7:25 am
You should try P33M's next firmware release...

viewtopic.php?p=509285#p509285
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 763
Joined: Sat Sep 10, 2011 11:43 am