The following guidance might be useful in helping to configure a Webcam on a Linux system.
The following notes describe configuration of a Logitech QuickCam Deluxe for Notebooks on an Acer 4000 WLMi Travelmate laptop.
Check the SPCA5xx webcam driver site for an appropriate driver. Two options were investigated: spca5xx-20060501.tar.gz (the variant used earlier for my Linux Web-server) and spca5xx-v4l1goodbye.tar.gz. Both were downloaded from the site.
Attempts were made to to built both, but difficulties were encountered trying to build/install the latter, so the former (spca5xx-20060501) variant was used.
In a suitable location on the laptop, unpack and build the spca5xx.ko Loadable Kernel Module (LKM) as follows:
# uname -a Linux 99dpr-003 2.6.9-67.0.15.EL #1 Thu May 8 10:39:19 EDT 2008 i686 i686 i386 GNU/Linux # # uname -r 2.6.9-67.0.15.EL # # pwd /usr/local/src/spca5xx/spca5xx-20060501 # # make Building SPCA5XX driver for 2.5/2.6 kernel. Remember: you must have read/write access to your kernel source tree. make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/local/src/spca5xx/spca5xx-20060501 CC=cc modules make[1]: Entering directory `/usr/src/kernels/2.6.9-67.0.15.EL-i686' CC [M] /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/spca5xx.o CC [M] /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/spcadecoder.o LD [M] /usr/local/src/spca5xx/spca5xx-20060501/spca5xx.o Building modules, stage 2. MODPOST CC /usr/local/src/spca5xx/spca5xx-20060501/spca5xx.mod.o LD [M] /usr/local/src/spca5xx/spca5xx-20060501/spca5xx.ko make[1]: Leaving directory `/usr/src/kernels/2.6.9-67.0.15.EL-i686' # # make install mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/ rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca50x.ko rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/et61x.ko install -c -m 0644 spca5xx.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/ /sbin/depmod -ae #
Add the modules to the kernel, if not in fact already done by the make install command above, as follows:
# modprobe videodev # modprobe spcaxx5xx # # modprobe --list | grep spca /lib/modules/2.6.9-67.0.15.EL/kernel/drivers/usb/media/spca5xx.ko # # # lsmod | grep spca spca5xx 604560 1 videodev 10049 2 spca5xx # lsmod | grep video videodev 10049 2 spca5xx # # # ls -l total 2088 -rw-r--r-- 1 1000 users 48252 Apr 29 2006 CHANGELOG -rwx------ 1 1000 users 372 Sep 10 2005 cutlog.py drwxr-xr-x 3 1000 users 4096 Jan 1 1970 drivers -rwx------ 1 1000 users 1487 Feb 28 2006 INSTALL -rw-r--r-- 1 1000 users 17992 Dec 6 2002 LICENSE -rw-r--r-- 1 1000 users 6970 Apr 29 2006 Makefile -rwx------ 1 1000 users 21290 Feb 28 2006 README -rw-r--r-- 1 1000 users 739 Apr 2 2006 README-KERNEL-UPTO-2.6.16 -rwx------ 1 1000 users 478 Sep 10 2005 README-SONIX -rwx------ 1 1000 users 513 Dec 31 2005 README-TV8532 -rwx------ 1 1000 users 828 Sep 25 2005 RGB-YUV%2fmodule-setting -rw-r--r-- 1 root root 958187 May 20 10:33 spca5xx.ko -rw-r--r-- 1 root root 12084 Dec 4 18:45 spca5xx.mod.c -rw-r--r-- 1 root root 60604 May 20 10:33 spca5xx.mod.o -rw-r--r-- 1 root root 898749 May 20 10:32 spca5xx.o #
If some difficulty is encountered here (e.g. the make install command failed) then the following can be executed manually:
# rm -f /lib/modules/`uname -r`/kernel/drive rs/usb/media/spca50x.ko # install -c -m 0644 spca5xx.ko /lib/modules /`uname -r`/kernel/drivers/usb/media/ # /sbin/depmod -ae # modprobe spca5xx # modprobe --list | grep spca /lib/modules/2.6.9-67.0.15.EL/kernel/drivers/usb/media/spca5xx.ko #
A summary of the system status after all of the above actions is shown below:
Console system message details as below:
# dmesg | more Linux version 2.6.9-67.0.15.EL (mockbuild@builder10.centos.org) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)) #1 Thu May 8 10:39:19 EDT 2008 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009f800 (usable) BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved) ... ... Linux video capture interface: v1.00 /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/spca5xx.c: USB SPCA5XX camera found. Logitech Notebooks Deluxe Zc0302 + Hdcs2020 /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/spca5xx.c: [spca5xx_probe:5480] Camera type JPEG /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/zc3xx.h: [zc3xx_config:558] Find Sensor HV7131R(c) /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/spca5xx.c: [spca5xx_getcapability:1765] maxw 640 maxh 480 minw 176 minh 144 usbcore: registered new driver spca5xx /usr/local/src/spca5xx/spca5xx-20060501/drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered #
USB device details as below:
# lsusb Bus 004 Device 001: ID 0000:0000 Bus 003 Device 004: ID 046d:08a9 Logitech, Inc. Bus 003 Device 003: ID 04f3:02f0 Elan Microelectronics Corp. Bus 003 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 cannot read device descriptor No such device (19)
Full LKM listed configuration details as below:
# lsmod Module Size Used by spca5xx 604560 1 videodev 10049 2 spca5xx i915 81605 3 parport_pc 24833 0 lp 12333 0 parport 37513 2 parport_pc,lp autofs4 30405 0 i2c_dev 11585 0 i2c_core 22337 1 i2c_dev sunrpc 163236 1 arc4 1985 1 ieee80211_crypt_wep 5057 1 ds 17605 2 ipt_REJECT 6721 1 ipt_state 1985 12 ip_conntrack 41077 1 ipt_state iptable_filter 3009 1 ip_tables 17601 3 ipt_REJECT,ipt_state,iptable_filter md5 4161 1 ipv6 236929 14 dm_mirror 31045 0 dm_mod 67577 1 dm_mirror joydev 10625 0 button 6737 0 battery 9029 0 ac 4933 0 yenta_socket 19009 0 pcmcia_core 63993 2 ds,yenta_socket uhci_hcd 31705 0 ehci_hcd 31429 0 snd_usb_audio 59681 2 snd_usb_lib 12225 1 snd_usb_audio snd_intel8x0 34025 2 snd_ac97_codec 64145 1 snd_intel8x0 snd_pcm_oss 49401 0 snd_mixer_oss 18241 3 snd_pcm_oss snd_pcm 97865 3 snd_usb_audio,snd_intel8x0,snd_pcm_oss snd_timer 30149 1 snd_pcm snd_page_alloc 10573 2 snd_intel8x0,snd_pcm snd_mpu401_uart 8897 1 snd_intel8x0 snd_rawmidi 26853 2 snd_usb_lib,snd_mpu401_uart snd_seq_device 8265 1 snd_rawmidi snd 56357 14 snd_usb_audio,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device soundcore 10017 3 snd ipw2200 103061 0 ieee80211 32905 1 ipw2200 ieee80211_crypt 7489 2 ieee80211_crypt_wep,ieee80211 b44 23629 0 mii 5313 1 b44 ext3 117577 8 jbd 72409 1 ext3 ata_piix 15045 0 libata 111261 1 ata_piix sd_mod 17217 0 scsi_mod 125261 2 libata,sd_mod
It necessary to create a video device on the laptop: for details on how this is done see Create Video Device, especially using the Make Video Device script automating the process.
Now by running GnomeMeeting it was possible to show that the set-up had been successful.
The typical command history sequence for this process is shown below:
# uname -r # cd /usr/local/src/ # mkdir spca5xx # mv spca5xx-20060501.tar.gz /usr/local/src/spca5xx/ # cd spca5xx/ # tar zxvf spca5xx-20060501.tar.gz # cd spca5xx-20060501 # ls -l /lib/modules/`uname -r`/kernel/drivers/usb # make install # ls -l /lib/modules/`uname -r`/kernel/drivers/usb/media # modprobe videodev # modprobe spca5xx # lsmod | grep video # lsmod | grep cam # modprobe --list | grep spca # dmesg| more # lsusb # mknod /dev/video0 c 81 0 # chmod a+r /dev/video0 # ln -s /dev/video0 /dev/video # group add video # groupadd video # chgrp video /dev/video0 # chmod g+rw /dev/video0
Only if problems are encountered do the following manual steps need to be carried out:
# rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca50x.ko # install -c -m 0644 spca5xx.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/ # /sbin/depmod -ae