Webcam dev/video0 not found.

Help needed to set up USB webcam Logitech C510 and mjpg-streamer.

Device /dev/video0 not found by ls /dev/

Although it should be included in the Linux distribution.

lsusb finds webcam
Bus 001 Device 006: ID 046d:0804 Logitech, Inc. Webcam C250

But dmesg says only
usb 1-2.1: new full speed USB device using at91_ohci and address 6

Re: Webcam dev/video0 not found.

Webcam driver compilation and insertion into NanosG20

apt-get update
apt-get install make gcc dov4l libpt-1.11.2-plugins-v4l2
apt-get install subversion build-essential libjpeg62-dev libjpeg62

Need to install linux headers
Linux Kernel Quellcode Paket [85,90 MB]

wget https://www.ledato.de/download/linux-source-2.6.35.7-nanosg20.deb
dpkg -i linux-source-2.6.35.7-nanosg20.deb

cd /usr/src/linux-2.6.35.7-nanosg20
make menuconfig 

video drivers were not selected in the distro. Selected them and exit.

make modules_prepare

Started to build kernel using make, but it would take a day to compile.

Searched for ways how to compile just video modules.

Video drivers are here

cd /usr/src/linux-2.6.35.7-nanosg20/drivers/media/video

Running "make" in /video directory did not work.

Need to be here:

cd /usr/src/linux-2.6.35.7-nanosg20
make M=drivers/media/video/

Works!!! This creates .ko files. The order of insertion seems to be important.
Insertion of some modules produced error, so I ommited them.
To have the modules automatically loaded on next boot, place the code in

nano /etc/rc.local
########################################################
cd /usr/src/linux-2.6.35.7-nanosg20/drivers/media/video
insmod v4l1-compat.ko
insmod v4l2-int-device.ko
insmod videodev.ko
insmod v4l2-common.ko
insmod ov511.ko
insmod gspca/gspca_main.ko
insmod usbvideo/usbvideo.ko
insmod usbvideo/quickcam_messenger.ko
insmod uvc/uvcvideo.ko
########################################################

===============================================================
Camera now exists

ls /dev/video0

Now dmesg shows with Logitech C250

usb 1-2.1: new full speed USB device using at91_ohci and address 20
uvcvideo: Found UVC 1.00 device  (046d:0804)
input: UVC Camera (046d:0804) as /devices/platform/at91_ohci/usb1/1-2/1-2.1/1-2.1:1.0/input/input2
and with Logitech C510
input: UVC Camera (046d:081d) as /devices/platform/at91_ohci/usb1/1-2/1-2.4/1-2.4:1.2/input/input3

-------------------------------------------------

lsmod

uvcvideo 53016 0
v4l2_common 13739 0
ov511 57821 0
videodev 37680 3 uvcvideo,v4l2_common,ov511
v4l1_compat 13164 2 uvcvideo,videodev
v4l2_int_device 1986 0
......
-------------------------------------------------

====================================================================
Installing mjpg-streamer in /root folder

cd ~
wget http://sourceforge.net/projects/mjpg-streamer/files/mjpg-streamer/Source...

tar xzvf mjpg-streamer-r63.tar.gz

cd mjpg-streamer-r63
make clean all

runs 10 min, produces warnings, but exits without errors.
===================================================================

Example: produces information about stream and runs in foreground:

##########################################
export LD_LIBRARY_PATH=/root/mjpg-streamer-r63
cd /root/mjpg-streamer-r63

./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w www" 

##########################################

The webpage page of streamer
http://192.168.0.5:8080/
http://192.168.0.5:8080/javascript_simple.html

Might want to put it in background using -b.
Tried larger resolution -r 960x720 but that did not work.

##########################################

export LD_LIBRARY_PATH=/root/mjpg-streamer-r63
/root/mjpg-streamer-r63/mjpg_streamer \
-i "/root/mjpg-streamer-r63/input_uvc.so -r 960x720" \
-o "/root/mjpg-streamer-r63/output_http.so \
-w /root/mjpg-streamer-r63/www" \
-b
##########################################

Background process can be stopped by kill -9 processnr.

Re: Webcam dev/video0 not found.

I tried this but when 'insmod gspca_sonixb.ko' I got:

gspca: probing 0c45:602c
input: sonixb as /devices/platform/at91_ohci/usb1/1-2/input/input1
gspca: video0 created
kernel BUG at arch/arm/mm/dma-mapping.c:409!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
...
...
...
Message from syslogd@localhost at Oct 19 17:50:11 ...
kernel:Code: e1a01000 e59f000c eb0b9da1 e3a03000 (e5833000)
---[ end trace 7e4d3d4ce9f75c6b ]---
Segmentation fault

Re: Webcam dev/video0 not found.

... I've received the same error (but with a gspca-zc3xx driver).
It seems that the gspca driver has a bug in kernel version 2.6.35-7.

A detailed explanation and a single line patch to gspca.c can be found at
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=comm...

This patch solved at least my kernel OPS. My Logitech webcam is now
working without any problems.

Erik

Re: Webcam dev/video0 not found.

Is there any other way to get webcams to run with NanosG20 ?
E.g. a new kernel version or a demo image with prebuild drivers ?

I will need to get it to run for the following configuration:
lsusb: Bus 001 Device 003: ID 041e:406c Creative Technology, Ltd Live! Cam Sync [VF0520]
dmesg: usb 1-2: new full speed USB device using at91_ohci and address 3

Many thanks in advance...:-D

Syndicate content