B3 USB Camera

Got problems with your B2 or B3? Share and get helped!
romtoc
Posts: 19
Joined: 21 Jun 2011, 04:18

B3 USB Camera

Post by romtoc » 15 Jul 2011, 07:33

Hello.
I have a Genius Look 312p webcam (http://bit.ly/nAqFGI), and I want to use it for surveillance.
I would like to connect it to my B3, and create an video stream.

Can it be done?
Can you tell me how? I really need to know if the house is safe, as I will be away from Bucharest a few weeks.
Many thanks,
Matei Cristian Dumitru
http://www.romtoc.net/

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 USB Camera

Post by Cheeseboy » 15 Jul 2011, 08:17

Hi romtoc,

First check if the B3 recognizes your camera as a camera.
Install the usbutils package.
As root:

Code: Select all

# apt-get install usbutils
Then plug the camera in, give it a minute and then:

Code: Select all

$ lsusb
If the system has identified the hardware correctly, you should see something like this (my camera is from Logitech):

Code: Select all

Bus 001 Device 003: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
You should also be able to see a directory called /dev/video0.
In the /var/log/syslog you should see something like this:

Code: Select all

Jul 15 13:57:13 b3 kernel: [2019559.635084] usb 1-1.2: new high speed USB device using orion-ehci and address 3
Jul 15 13:57:13 b3 kernel: [2019560.445622] Linux video capture interface: v2.00
Jul 15 13:57:14 b3 kernel: [2019560.487916] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0990)
Jul 15 13:57:14 b3 kernel: [2019560.529931] input: UVC Camera (046d:0990) as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input1
Jul 15 13:57:14 b3 kernel: [2019560.541037] usbcore: registered new interface driver uvcvideo
Jul 15 13:57:14 b3 kernel: [2019560.546969] USB Video Class driver (v1.0.0)
If all is OK so far, you can install a package called motion:

Code: Select all

# apt-get install motion
After you install it, you have to edit /etc/motion.conf and /etc/default/motion.
The files have comments that pretty much explains what you need to do.
There are a lot of options in there, enabling you to save the video capture as picture files and/or video in different formats, be saved only when motion is detected, stream it in a simple web server, mask certain areas (like windows), etc.

Have fun!

CheeseBoy

kjellberg
Posts: 38
Joined: 03 Dec 2010, 07:18

Re: B3 USB Camera

Post by kjellberg » 15 Jul 2011, 09:41

I actually did this last saturday and it works like a charm! :D

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 USB Camera

Post by Cheeseboy » 15 Jul 2011, 09:47

kjellberg wrote:I actually did this last saturday and it works like a charm! :D
Do you also have a webcam that looks like a stuffed animal? :-)

Ubi
Posts: 1547
Joined: 17 Jul 2007, 09:01

Re: B3 USB Camera

Post by Ubi » 16 Jul 2011, 03:51

is a charm a stuffed animal?

romtoc
Posts: 19
Joined: 21 Jun 2011, 04:18

Re: B3 USB Camera

Post by romtoc » 16 Jul 2011, 07:24

Thanks for the help, I will try it as soon as I can!
Oh, and... don't you think a camera that looks like a dog is funny?
Many thanks,
Matei Cristian Dumitru
http://www.romtoc.net/

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 USB Camera

Post by Cheeseboy » 16 Jul 2011, 07:29

Oh, and... don't you think a camera that looks like a dog is funny?
Yes, that's why I made a comment about it.

romtoc
Posts: 19
Joined: 21 Jun 2011, 04:18

Re: B3 USB Camera

Post by romtoc » 16 Jul 2011, 07:45

Hmm... I followed your tutorial, and I get stuck at lsusb...
When I enter the command, it just... stucks... I can't do anything else, and it takes forever...
PS: I don't have a "/dev/video0/" directory.
Many thanks,
Matei Cristian Dumitru
http://www.romtoc.net/

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 USB Camera

Post by Cheeseboy » 16 Jul 2011, 07:54

Aah, that seems like trouble.
Check this out:
https://bugs.launchpad.net/ubuntu/+sour ... bug/570049

Could you try with another (perhaps less stuffed) camera? Or any other USB device?

romtoc
Posts: 19
Joined: 21 Jun 2011, 04:18

Re: B3 USB Camera

Post by romtoc » 16 Jul 2011, 07:59

I think it is because of the camera too, but I don't have any other one.
Anyways, many thanks for the help. I will try anything I can to make it work...
Many thanks,
Matei Cristian Dumitru
http://www.romtoc.net/

kjellberg
Posts: 38
Joined: 03 Dec 2010, 07:18

Re: B3 USB Camera

Post by kjellberg » 18 Jul 2011, 01:16

The only actual hard thing of geting motion to work is getting the webcam work under linux. Try google the cam-brand +linux to see if you can find any tutorials.
I have one webcam that I simply could not get to give anything but the great battle of ant's :!:
As soon as I tried another camera it worked out of the box and I was up and running in less than five minutes :D

mike_nl
Posts: 49
Joined: 03 Jul 2009, 13:56

Re: B3 USB Camera

Post by mike_nl » 19 Jul 2011, 16:01

That sounds cool... the usb cam. I had running this a while ago on an older machine, so i will try this on bubba-2 too. Thanks for the idea and info's.

BTW: it will be the old but ever runnging Lego Cam(denmark), what it's the old logitech webcam. Which is also running perfect on a windows home server based on windows server 2003.

Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 USB Camera

Post by Cheeseboy » 20 Jul 2011, 11:49

Just a word of caution:
The hardware detection is different between the standard OS on the Bubba2 and the B3.
I could never get the same camera to work on the Bubba2.
In the same spirit, the Bubba2 recognised my USP as a HID device, but the B3 doesn't...

bumpaberra
Posts: 5
Joined: 05 Aug 2011, 16:32

Re: B3 USB Camera

Post by bumpaberra » 05 Aug 2011, 16:53

I got 4 files in /etc/motion/ motion.conf , thred1.conf , thread2.conf , and 3 and 4.
But cant edit motion.con in my sftp only edit the thread1 - 4 files?
rw - r ---- and on others rw - r - r
I dont ether got a directory called /dev/video0. Only a file video0 in /dev/ ?

Results in B3
Bus 001 Device 004: ID 046d:09c1 Logitech, Inc. QuickCam Deluxe for Notebooks


Plz help.
Think a need a newbie guide.

/Erik

bumpaberra
Posts: 5
Joined: 05 Aug 2011, 16:32

Re: B3 USB Camera

Post by bumpaberra » 09 Aug 2011, 11:24

My /etc/motion.conf is empty? And no lib /dev/video0 ?

Log file:
Aug 9 16:46:11 b3 kernel: [ 6616.154093] usb 1-1.1: new high speed USB device using orion-ehci and address 3
Aug 9 16:46:12 b3 kernel: [ 6616.966537] Linux video capture interface: v2.00
Aug 9 16:46:12 b3 kernel: [ 6617.032901] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam HD-3000 (045e:0779)
Aug 9 16:46:12 b3 kernel: [ 6617.046893] input: Microsoft® LifeCam HD-3000 as /devices/platform/orion-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input1
Aug 9 16:46:12 b3 kernel: [ 6617.057901] usbcore: registered new interface driver uvcvideo
Aug 9 16:46:12 b3 kernel: [ 6617.063713] USB Video Class driver (v1.0.0)
Aug 9 16:46:13 b3 kernel: [ 6618.543567] 3:3:1: cannot get freq at ep 0x82
Aug 9 16:46:13 b3 kernel: [ 6618.552051] usbcore: registered new interface driver snd-usb-audio
Aug 9 16:46:20 b3 Bubba: :Apt[2378]: 0, Timeout: Bubba::Apt server terminating

Post Reply