lime + usb webcam realtime

Started by salviador, February 28, 2014, 03:55:35 PM

Previous topic - Next topic

salviador

Hi, I'm new.
I have just buy lime board.
I need  connect in USB my logiech webcam. and stream video in realtime.
I have this prebuild image:
https://drive.google.com/file/d/0B-bAEPML8fwlZWMtZHZCNVNoYTQ/edit?usp=sharing

I download this in:
http://olimex.wordpress.com/2014/01/15/building-debian-linux-bootable-sd-card-with-hardware-accelerated-video-decoding-and-kernel-3-4-for-a10-olinuxino-lime/


How I do?
I need re-compile the kernel, for enable webcam driver?

lubod

#1
You don't mention if you're new to using a Lime, or computers/Linux in general.

First, while some things like writing the disk image to a micro SD card are possible in Mac OS X or Windows, others (like compiling kernels for the Lime) are much easier/quicker with Linux, especially Debian or Ubuntu (I'm using Ubuntu myself). So that would be the first question: do you have a Linux (Debian or Ubuntu) PC?

If you do, plug the USB webcam in, open a terminal and type:

lsusb

It should list all your USB controllers/devices. Look for something that says Logitech. Here is an example of another USB device from my system, not a webcam:

Bus 007 Device 002: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse

Write down the Device ID (in this case 046d:c05a). It is one of the best ways to track down if there is a driver for Linux compatible with the webcam. Take a look at  this page:

http://qce-ga.sourceforge.net/#supported

See how they show that cameras with a particular vendor ID are compatible? More reliable as a way to identify hardware than the model number, manufacturers often make many revisions of the same model of webcam with completely different internal components, which need one of many possible drivers. In other words the outside label lies, only the vendor ID is true.  :) You can look up the vendor ID in Mac OS and Windows too. With a Mac it's in the System Profiler, with Windows I think it's in the msinfo32.exe or System Properties but I use Windows as little as possible. :)

Second question: Is the Lime working for other things besides the webcam? Can you see a desktop, or SSH into it over the network? If yes, start with the webcam unplugged but a terminal window open on the Lime, plug the webcam in, check dmesg to see if it was recognized:

dmesg

When I plug in a USB wifi card, it says:

[35590.456136] usb 3-3: new full-speed USB device number 8 using ohci-pci
[35590.665929] usb 3-3: New USB device found, idVendor=2001, idProduct=3700
[35590.665941] usb 3-3: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[35590.665947] usb 3-3: SerialNumber: 000000000000
[35590.670770] prism2_usb: Checking for firmware prism2_ru.fw
[35590.698342] prism2_usb: Firmware not available, but not essential
[35590.698354] prism2_usb: can continue to use card anyway.


if you find out (by searching the vendor ID on google) what driver you need, check if it is loaded. For my wireless card I do: (replace prism2_usb with the name of your driver!)

lsmod|grep prism2_usb

It can be loaded manually (if it's in the kernel but hasn't loaded automatically) with: (may need sudo or root access, like an administrator on windows, to run modprobe and similar commands)

modprobe prism2_usb

If it isn't in the kernel, then compiling a new kernel is most likely the only option left.

If the Lime is not booting yet, I got my Lime working by following the instructions how to compile u-boot from olimex, but another disk image (much smaller download! only 120MB) https://romanrm.net/dl/a10/debian/

P.S. I also found this information about another Linux driver which very likely supports your webcam (31 models from Logitech, compare the vendor ID listed to yours)

http://www.linuxtv.org/wiki/index.php/Gspca_devices

But if it can't be loaded with modprobe (if it's built in, you can check if it exists in a directory like /lib/modules/3.4.79-r0-s-rm1+/kernel/drivers/media/video/gspca) then it's kernel compile time.

P.P.S. The kernel from the disk image I mentioned above
https://romanrm.net/a10/kernel
already has the gspca driver built in. You probably want the Video Version, it's supposed to have full video encoding/decoding acceleration in hardware.

HTH