Root/Documentation/video4linux/CQcam.txt

1c-qcam - Connectix Color QuickCam video4linux kernel driver
2
3Copyright (C) 1999 Dave Forrest <drf5n@virginia.edu>
4            released under GNU GPL.
5
61999-12-08 Dave Forrest, written with kernel version 2.2.12 in mind
7
8
9Table of Contents
10
111.0 Introduction
122.0 Compilation, Installation, and Configuration
133.0 Troubleshooting
144.0 Future Work / current work arounds
159.0 Sample Program, v4lgrab
1610.0 Other Information
17
18
191.0 Introduction
20
21  The file ../../drivers/media/video/c-qcam.c is a device driver for
22the Logitech (nee Connectix) parallel port interface color CCD camera.
23This is a fairly inexpensive device for capturing images. Logitech
24does not currently provide information for developers, but many people
25have engineered several solutions for non-Microsoft use of the Color
26Quickcam.
27
281.1 Motivation
29
30  I spent a number of hours trying to get my camera to work, and I
31hope this document saves you some time. My camera will not work with
32the 2.2.13 kernel as distributed, but with a few patches to the
33module, I was able to grab some frames. See 4.0, Future Work.
34
35
36
372.0 Compilation, Installation, and Configuration
38
39  The c-qcam depends on parallel port support, video4linux, and the
40Color Quickcam. It is also nice to have the parallel port readback
41support enabled. I enabled these as modules during the kernel
42configuration. The appropriate flags are:
43
44    CONFIG_PRINTER M for lp.o, parport.o parport_pc.o modules
45    CONFIG_PNP_PARPORT M for autoprobe.o IEEE1284 readback module
46    CONFIG_PRINTER_READBACK M for parport_probe.o IEEE1284 readback module
47    CONFIG_VIDEO_DEV M for videodev.o video4linux module
48    CONFIG_VIDEO_CQCAM M for c-qcam.o Color Quickcam module
49
50  With these flags, the kernel should compile and install the modules.
51To record and monitor the compilation, I use:
52
53 (make zlilo ; \
54  make modules; \
55  make modules_install ;
56  depmod -a ) &>log &
57 less log # then a capital 'F' to watch the progress
58
59But that is my personal preference.
60
612.2 Configuration
62
63  The configuration requires module configuration and device
64configuration. I like kmod or kerneld process with the
65/etc/modprobe.conf file so the modules can automatically load/unload as
66they are used. The video devices could already exist, be generated
67using MAKEDEV, or need to be created. The following sections detail
68these procedures.
69
70
712.1 Module Configuration
72
73  Using modules requires a bit of work to install and pass the
74parameters. Understand that entries in /etc/modprobe.conf of:
75
76   alias parport_lowlevel parport_pc
77   options parport_pc io=0x378 irq=none
78   alias char-major-81 videodev
79   alias char-major-81-0 c-qcam
80
81will cause the kmod/modprobe to do certain things. If you are
82using kmod, then a request for a 'char-major-81-0' will cause
83the 'c-qcam' module to load. If you have other video sources with
84modules, you might want to assign the different minor numbers to
85different modules.
86
872.2 Device Configuration
88
89  At this point, we need to ensure that the device files exist.
90Video4linux used the /dev/video* files, and we want to attach the
91Quickcam to one of these.
92
93   ls -lad /dev/video* # should produce a list of the video devices
94
95If the video devices do not exist, you can create them with:
96
97  su
98  cd /dev
99  for ii in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
100    mknod video$ii c 81 $ii # char-major-81-[0-16]
101    chown root.root video$ii # owned by root
102    chmod 600 video$ii # read/writable by root only
103  done
104
105  Lots of people connect video0 to video and bttv, but you might want
106your c-qcam to mean something more:
107
108   ln -s video0 c-qcam # make /dev/c-qcam a working file
109   ln -s c-qcam video # make /dev/c-qcam your default video source
110
111  But these are conveniences. The important part is to make the proper
112special character files with the right major and minor numbers. All
113of the special device files are listed in ../devices.txt. If you
114would like the c-qcam readable by non-root users, you will need to
115change the permissions.
116
1173.0 Troubleshooting
118
119  If the sample program below, v4lgrab, gives you output then
120everything is working.
121
122    v4lgrab | wc # should give you a count of characters
123
124  Otherwise, you have some problem.
125
126  The c-qcam is IEEE1284 compatible, so if you are using the proc file
127system (CONFIG_PROC_FS), the parallel printer support
128(CONFIG_PRINTER), the IEEE 1284 system,(CONFIG_PRINTER_READBACK), you
129should be able to read some identification from your quickcam with
130
131     modprobe -v parport
132     modprobe -v parport_probe
133     cat /proc/parport/PORTNUMBER/autoprobe
134Returns:
135  CLASS:MEDIA;
136  MODEL:Color QuickCam 2.0;
137  MANUFACTURER:Connectix;
138
139  A good response to this indicates that your color quickcam is alive
140and well. A common problem is that the current driver does not
141reliably detect a c-qcam, even though one is attached. In this case,
142
143     modprobe -v c-qcam
144or
145     insmod -v c-qcam
146
147  Returns a message saying "Device or resource busy" Development is
148currently underway, but a workaround is to patch the module to skip
149the detection code and attach to a defined port. Check the
150video4linux mailing list and archive for more current information.
151
1523.1 Checklist:
153
154  Can you get an image?
155        v4lgrab >qcam.ppm ; wc qcam.ppm ; xv qcam.ppm
156
157  Is a working c-qcam connected to the port?
158        grep ^ /proc/parport/?/autoprobe
159
160  Do the /dev/video* files exist?
161        ls -lad /dev/video
162
163  Is the c-qcam module loaded?
164        modprobe -v c-qcam ; lsmod
165
166  Does the camera work with alternate programs? cqcam, etc?
167
168
169
170
1714.0 Future Work / current workarounds
172
173  It is hoped that this section will soon become obsolete, but if it
174isn't, you might try patching the c-qcam module to add a parport=xxx
175option as in the bw-qcam module so you can specify the parallel port:
176
177       insmod -v c-qcam parport=0
178
179And bypass the detection code, see ../../drivers/char/c-qcam.c and
180look for the 'qc_detect' code and call.
181
182  Note that there is work in progress to change the video4linux API,
183this work is documented at the video4linux2 site listed below.
184
185
1869.0 --- A sample program using v4lgrabber,
187
188v4lgrab is a simple image grabber that will copy a frame from the
189first video device, /dev/video0 to standard output in portable pixmap
190format (.ppm) To produce .jpg output, you can use it like this:
191'v4lgrab | convert - c-qcam.jpg'
192
193
19410.0 --- Other Information
195
196Use the ../../Maintainers file, particularly the VIDEO FOR LINUX and PARALLEL
197PORT SUPPORT sections
198
199The video4linux page:
200  http://linuxtv.org
201
202The V4L2 API spec:
203  http://v4l2spec.bytesex.org/
204
205Some web pages about the quickcams:
206   http://www.pingouin-land.com/howto/QuickCam-HOWTO.html
207
208   http://www.crynwr.com/qcpc/ QuickCam Third-Party Drivers
209   http://www.crynwr.com/qcpc/re.html Some Reverse Engineering
210   http://www.wirelesscouch.net/software/gqcam/ v4l client
211   http://phobos.illtel.denver.co.us/pub/qcread/ doesn't use v4l
212   ftp://ftp.cs.unm.edu/pub/chris/quickcam/ Has lots of drivers
213   http://www.cs.duke.edu/~reynolds/quickcam/ Has lots of information
214
215
216

Archive Download this file



interactive