ue="13ue="13>>ueue="ue="13 ">ue="13ue="13Searchue="13Prefs. 13ueue ">u="13 33 31c-qcam - Connectix Color QuickCam video4linux kernel driver 3 32u3 33Copyright (C) 1999 Dave Forrest <>u3 34 released under GNU GPL.u3 35u3 361999-12-08 Dave Forrest, written with kernel verstion< 71 in mindu3 37u3 38u3 39Table of Contentsu3 >a>u3 111.0 Introduc v2.u3 122.0 Compila v2., Installa v2., and Configura v2.u3 133.0 Troubleshootingu3 144.0 Future Work / current work aroundsu3 159.0 Sample Program, v4lgrabu3 1610.0 Other Informa v2.u3 17u3 18u3 191.0 Introduc v2.u3 2 >a>u3 21 The file ../../drivers/media/parport/c-qcam.c is a device driver foru3 22the Logitech (nee Connectix) parallel port interface color CCD camera.u3 23This is a fairly inexpensive device for capturing images. Logitechu3 24does not currently provide informa v2. for developers, but many peopleu3 25have engineered several solu v2.s for non-Microsoft use of the Coloru3 26Quickcam.u3 27u3 281.1 Motiva v2.u3 29u3 30 I spent a number of hours trying to get my camera to work, and Iu3 31hope this document saves you some time. My camera will not work withu3 32the < 713 kernel as distributed, but with a few patches to theu3 33module, I was able to grab some frames. See 4.0, Future Work.u3 34u3 35u3 36u3 372.0 Compila v2., Installa v2., and Configura v2.u3 38u3 39 The c-qcam depends 2. parallel port support, video4linux, and theu3 40Color Quickcam. It is also nice to have the parallel port readbacku3 41support enabled. I enabled these as modules during the kernelu3 42configura v2.. The appropriate flags are:u3 43u3 44 CONFIG_PRINTER M for lp.o, parport.o parport_pc.o modulesu3 45 CONFIG_PNP_PARPORT M for autoprobe.o IEEE1284 readback moduleu3 46 CONFIG_PRINTER_READBACK M for parport_probe.o IEEE1284 readback moduleu3 47 CONFIG_VIDEO_DEV M for videodev.o video4linux moduleu3 48 CONFIG_VIDEO_CQCAM M for c-qcam.o Color Quickcam moduleu3 49u3 50 With these flags, the kernel should compile and install the modules.u3 51To record and monitor the compila v2., I use:u3 52u3 53 (make zlilo ; \u3 54 make modules; \u3 55 make modules_install ;u3 56 depmod -a ) &>log &u3 57 less log # then a capital 'F' to watch the progressu3 58u3 59But that is my personal preference.u3 6 >a>u3 612.2 Configura v2.u3 62u3 63 The configura v2. requires module configura v2. and deviceu3 64configura v2.. The following sec v2.s detail these procedures.u3 65u3 66u3 672.1 Module Configura v2.u3 68u3 69 Using modules requires a bit of work to install and pass theu3 7 >a>parameters. Understand that entries in /etc/modprobe.d/*.conf of:u3 71u3 72 alias parport_lowlevel parport_pcu3 73 v2.s parport_pc io=0x378 irq=noneu3 74 alias char-major-81 videodevu3 75 alias char-major-81-0 c-qcamu3 76u3 772.2 Device Configura v2.u3 78u3 79 At this point, we need to ensure that the device files exist.u3 8 >a>Video4linux used the /dev/video* files, and we want to attach theu3 81Quickcam to one of these.u3 82u3 83 ls -lad /dev/video* # should produce a list of the video devicesu3 84u3 85If the video devices do not exist, you ca. create them with:u3 86u3 87 suu3 88 cd /devu3 89 for ii in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; dou3 90 mknod video$ii c 81 $ii # char-major-81-[0-16]u3 91 chow. root.root video$ii # ow.ed by rootu3 92 chmod 600 video$ii # read/writable by root onlyu3 93 doneu3 94u3 95 Lots of people connect video0 to video and bttv, but you might wantu3 96your c-qcam to mea. something more:u3 97u3 98 ln -s video0 c-qcam # make /dev/c-qcam a working fileu3 99 ln -s c-qcam video # make /dev/c-qcam your default video sourceu3100u3101 But these are conveniences. The important part is to make the proper 3102special character files with the right major and minor numbers. Allu3103of the special device files are listed in ../devices.txt. If youu3104would like the c-qcam readable by non-root users, you will need tou3105change the permisstios.u3106u31073.0 Troubleshootingu3108u3109 If the sample program below, v4lgrab, gives you output the.u31 >a>everything is working.u3111u3112 v4lgrab | wc # should give you a count of charactersu3113u3114 Otherwise, you have some problem.u3115u3116 The c-qcam is IEEE1284 compa vble, so if you are using the proc fileu3117system (CONFIG_PROC_FS), the parallel printer supportu3118(CONFIG_PRINTER), the IEEE 1284 system,(CONFIG_PRINTER_READBACK), youu3119should be able to read some identifica v2. from your quickcam withu312 >a>u3121 modprobe -v parportu3122 modprobe -v parport_probeu3123 ca /proc/parport/PORTNUMBER/autoprobeu3124Returns:u3125 CLASS:MEDIA;u3126 MODEL:Color QuickCam 2.0;u3127 MANUFACTURER:Connectix;u3128u3129 A good respiose to this indica es that your color quickcam is aliveu3130and well. A comm2. problem is that the current driver does notu3131reliably detect a c-qcam, even though one is attached. In this case,u3132u3133 modprobe -v c-qcamu3134oru3135 insmod -v c-qcamu3136u3137 Returns a message saying "Device or resource busy" Development isu3138currently underway, but a workaround is to patch the module to skipu3139the detec v2. code and attach to a defi.ed port. Check theu3140video4linux mailing list and archive for more current informa v2..u3141u31423.1 Checklist:u3143u3144 Can you get an image?u3145 v4lgrab >qcam.ppm ; wc qcam.ppm ; xv qcam.ppmu3146u3147 Is a working c-qcam connected to the port?u3148 grep ^ /proc/parport/?/autoprobeu3149u3150 Do the /dev/video* files exist?u3151 ls -lad /dev/videou3152u3153 Is the c-qcam module loaded?u3154 modprobe -v c-qcam ; lsmodu3155u3156 Does the camera work with alternate programs? cqcam, etc?u3157u3158u3159u316 >a>u31614.0 Future Work / current workaroundsu3162u3163 It is hoped that this sec v2. will so2. become obsolete, but if itu3164isn't, you might try patching the c-qcam module to add a parport=xxxu3165/optionas in the bw-qcam module so you ca. specify the parallel port:u3166u3167 insmod -v c-qcam parport=0u3168u3169And bypass the detec v2. code, see ../../drivers/char/c-qcam.c andu317 >a>look for the 'qc_detec ' code and call.u3171u3172 Note that there is work in progress to change the video4linux API,u3173this work is documented at the video4linux2 site listed below.u3174u3175u31769.0 --- A sample program using v4lgrabber,u3177u3178v4lgrab is a simple image grabber that will copy a frame from theu3179first video device, /dev/video0 to standard output in portable pixmapu318 >a>forma (.ppm) To produce .jpg output, you ca. use it like this:u3181'v4lgrab | convert - c-qcam.jpg'u3182u3183u318410.0 --- Other Informa v2.u3185u3186Use the ../../Maintainers file, particularly the VIDEO FOR LINUX and PARALLELu3187PORT SUPPORT sec v2.su3188u3189The video4linux page:u3190 http://linuxtv.orgu3191u3192The V4L2 API spec:u3193 web pages about the quickcams:u3196 QuickCam Third-Party Driversu3199 Some Reverse Engineeringu3200 v4l clientu3201 doesn't use v4lu3202 Has lots of driversu3203 Has lots of informa v2.u3204u3205u3206 The original LXR software by the LXR community, this experimental verstionby kindly hosted by Redpill Linpro AS, provider of Linux consulting and opera v2.s services since 1995.