[vox-tech] QuickCam Express success! :)

Mark K. Kim vox-tech@lists.lugod.org
Fri, 7 Dec 2001 00:59:14 -0800 (PST)


Keywords: QuickCam Express, STV0602, xawtv, digital camera, webcam, getting unsupported hardware working

Well, nobody responded to my scream for help so I ventured out on my own
to figure this thing out.  It only took a few minutes, to my surprise.

What happened last time: I got a free Logitech QuickCam Express
from Verizon for signing up for DSL.  I wanted to get it to work
under Linux so I went through the HOWTOs, the web, etc.  I found
some docs and some sources, but none worked and none helped.  One
thing I found out was that my distribution (Mandrake 8.1) comes
with a Quickcam module (mod_quickcam), but for some reason it
didn't work (it loaded but it gave no valid or invalid message, and no
/dev/videoN appeared).  I also found that mod_quickcam source is available
on sourceforge, not that it helped.

So today, I decided to try some other things.  I tried poking around the
mod_quickcam source.  I noticed the code checks the vendor and product ID
codes so I compared them with the values returned by `usbview`....  It
turned out the product ID wasn't correct (the code had 840, but usbview
reports 870).  I modified the code, with some caution.

Note: If the product ID is different, then the chances are I have a
different model that won't work with the mod_quickcam module... but
hopefully they'll be similar in design and hopefully I'll only need to
tweak mod_quickcam only a little to get it to work.

But the modification didn't do anything, so I put some "printk(...)"
statements to figure out where the code was going and where it wasn't
(printk prints statements in /var/log/messages).  It turned out there was
another place where 840 was hard-coded, so I changed that to 870 as well.

After those two lines of codes were fixed, loading the module showed
/dev/video1 (/dev/video0 is my TV capture card).  I executed `xawtv -c
/dev/video1`, but I didn't see anything.

So the reason is probably that the hardware is slightly different from the
original hardware mod_quickcam was intended for.  I figured I might be
able to get some specs on the chip inside the camera to modify the code,
so I opened up the camera (it's very easy to open) and found the chip to
be STV0602.

The mod_quickcam module was written for STV0600, so that's why simply
modifying the product ID didn't work.

I then did a search on Google.  Hopefully I'll find a completely
different, pre-written module so I won't need to figure thing out for
myself.  Only one website came up.... and it contained modification
information for mod_quickcam to get it to work with the "dexxa webcam
STV0602-AA Agilent QDCS", right on the mod_quickcam website on SourceForge
:P  I applied the changes suggested on the page, and everything worked!:

   http://qce-ga.sourceforge.net/stv.html

Note, though, the page does not tell you to change the product ID
information in the source.  I think you need to do that to get it to work
properly.  To do that, apply the changes described on the above link, and
change the occurrences of "870" in the "quickcam.c" files to "840" (there
should be exactly two.)

-Mark (a little wiser today than yesterday)

--
Mark K. Kim
http://www.cbreak.org/mark/
PGP key available upon request.