jakebpg
Posts: 36
Joined: Tue Sep 04, 2012 9:36 pm

motion & usb cam

Mon Oct 01, 2012 7:55 pm

I've been trying to get motion to run on a constant basis but it appears that the usb bus falls into a sleep mode disabling the cam.
The usb cam is a Microsoft Corp. LifeCam NX-3000 (UVC-compliant).

It works for about an hour or so and then the cam turns off. I've tried it in a usb hub and from the pi hub with no avail it always sleeps and never comes back.
Now I tried this cam on my laptop which is running arch Linux just like the pi and it runs forever, never sleeping, just watching and waiting for motion to happen.

So what could be going on with the cam and pi that is so different from my laptop setup?
Is there some kind of power setting on the pie that needs to be set?
Is there a script that I could run that would keep the cam running such as with a keep-alive statement like for nics?

Any help with this problem would be greatly appreciated!


jakebpg
Posts: 36
Joined: Tue Sep 04, 2012 9:36 pm

Re: motion & usb cam

Mon Oct 01, 2012 10:10 pm

Scorp could you please be a little more specific! There are many different topics at your link!
Many talking about irrelevant BS.

As stated using a powered USB does NOT solve the problem either. So I find it doubtful that power has anything to do with it. My nano wifi nic works great and never falls a sleep, but the cam seems to appear to do so. As if the signal goes dead. Like there is no keep-alive signal being sent to the device!

If it's a known problem and there is no fix then say so. Voltage at tp1/tp2 is 5.1 volts constant with all devices connected and operating.

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: motion & usb cam

Mon Oct 01, 2012 10:55 pm

Arch kernel has a patch for just such a thing, it's in your kernel now but doesn't mention your particular cam
https://github.com/archlinuxarm/PKGBUIL ... cams.patch
Have you tried another distro? They won't have the patch and wonder if it makes a difference

jakebpg
Posts: 36
Joined: Tue Sep 04, 2012 9:36 pm

Re: motion & usb cam

Tue Oct 02, 2012 12:13 am

pepe, thanks.

No I haven't tried another distro. I did check the kernel versions from my laptop to the pi kernel and there is a couple of reversion differences. I don't know how close the two kernels are though as far as functionality goes though.
Laptop version:
3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 x86_64 GNU/Linux

PI version:
3.2.27-8-ARCH+ #1 PREEMPT Wed Sep 26 23:12:01 UTC 2012 armv6l GNU/Linux

I remember someone else saying they used this cam on their pi but can't find it and they didn't mention any problems with it.

Can I create a script file that will send a keep-alive signal to this cam?

If I unplug the cam and plug it back in it powers right back up but motion doesn't find it so I have to restart motion for it to use it again.

Is it the cam that has the problem or is it a pi usb problem? The reason I ask is that no matter if plugged directly to the pi or a powered usb hub it just dies.

Now after it dies that it no longer is receiving a signal from motion it still shows up in lsusb and I can still use it with fswebcam. It seems like the keep alive is failing and causing motion to lose communications.

scorp
Posts: 96
Joined: Tue May 29, 2012 6:21 pm

Re: motion & usb cam

Tue Oct 02, 2012 7:59 am

jakebpg wrote:Scorp could you please be a little more specific! There are many different topics at your link!
Many talking about irrelevant BS.

As stated using a powered USB does NOT solve the problem either. So I find it doubtful that power has anything to do with it. My nano wifi nic works great and never falls a sleep, but the cam seems to appear to do so. As if the signal goes dead. Like there is no keep-alive signal being sent to the device!

If it's a known problem and there is no fix then say so. Voltage at tp1/tp2 is 5.1 volts constant with all devices connected and operating.
I'm sorry, I don't know more than you. Just wanted to show you that topic so you may find the answer there. It looks like there are several combinations of issues with USB driver and people are working on it and improving slowly. I have myself frequently freezing 3 different webcams so I also look forward to seeing the result.

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: motion & usb cam

Tue Oct 02, 2012 9:19 am

That's running a much later kernel, probably where all these bugs have been ironed out over time. It could be the motion package?
Might be best to see if raspbian has the problem, by either trying it, or get a pal to.

Return to “Arch”