CQcam.txt 6.4 KB

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