The following is based closely on an article I wrote for Yoper Linux some time ago. Attempting to install the Twinklecam in Debian proved less easy. I had problems with the sonix driver build, so I googled around a bit and discovered lots of people seem to be having issues attempting to use the sn9c102 driver for this camera. It may work for some models, but from my experience, it does not work for the cameras with the vid/pid numbers below.
So I have stuck this on the web for others having the same problems.
This should also apply to other similar cameras based on the same chipset.
Firstly, identify the chipset used by the webcam-
Plug in the webcam and, in a terminal, type "dmesg" without quotes.
Look down the output for the webcam - if the vid/pid numbers are 0x0c45/0x600D -
then you are in business! Note that the 0xc45/0x6009 - found in Sweex cams also works the same way.
The kernel will have loaded a driver for you - but it almost certainly won't
work. This seems to be due to the exact chipset not being recognised correctly.
In my own case at least, the kernel driver (SN9C102) does not work the camera.Dmesg may well claim the driver is loaded and all is well - but attempting to view the output in any viewer - xawtv,camstream,camorama or whatever - gives no joy. Xawtv gives a black screen, whilst camstream asks if you are sure there is a video cam plugged in!
OK, so here is how to get it to work :-)
One of the cheap and cheerful Chicony TwinkleCams - note there are a few older
models with different vid/pid IDs, which don't use this driver. The Trust
Spacec@m120 also should work with this info- it looks the same as the TwinkleCam
and uses the same sensors etc.
Drivers - You need the Sonixcam driver from
The CVS snapshot will get you sonixcam-module-20040526, which is what you need.
You will also need the kernel-source for your kernel to build the sonixcam
module - download this from the Yoper repository. Make sure you use the source
which matches your current kernel.
videodev - supplied by our OS and will be on your machine.
usbvideo.ko- again installed already by Yoper ( its worth just checking its
location on your system - it should be in
OK, on to the procedure-
After downloading the sonixcam driver, untar it to a suitable location ( I
created a folder called webcam in my home directory ) and follow the build
information to end up with the module we need in the src folder of the
sonixcam-module folder. This is very easy - simply run make as per the
instructions. We need sonixcam.ko - the 2.6 kernel module :-) If using Debian, see note at the end regarding usbvideo.h
The other goodies we need are conveniently supplied by Yoper as mentioned. These
are videodev and usbvideo.ko
Anyway, you now have the sonixcam.ko, so we can start getting the camera going.
Firstly,the kernel has already helpfully loaded the wrong driver for us- so that
To do this, open the terminal and su to become the root user. At the prompt, type
"rmmod sn9c102" ( without quotes) and press enter.
This removes the module - clearing the way for our own module to be inserted.
Now, still as root, enter the following commands, without quotes -
( or wherever it was located)
"insmod /home/your-home/webcam/sonixcam-module-20040526/src/sonixcam.ko" ( or
wherever you built the sonixcam modules)
The camera should now be running. Not that you will see anything exciting
happen. To show it is working, I always use Camstream - a good little app for
outputting camera pics to a web page or simply for taking snapshots etc.
Camstream can be downloaded from - http://www.smcc.demon.nl/camstream/ - follow
the build info and it is quite simple. I hope to rpm this for Yoper shortly.
Anyway - once you have built Camstream, fire it up from the command line as your
normal self ( no need to be root - in fact, it won't work if you are! ).
If all went well, you should have a grey window in front of you. Select File
from the top of this grey window and from the drop down menu, select open
viewer. Hopefully, in the new window you will see the Device listed as Sonix
Webcam. Click OK and you should be able to see the output of the camera! Easy
Now of course, you could use the camera for other purposes - Gnomemeeting etc (
although the Yoper version seems to be broken currently and I have had no joy
building from source either.)
If building in another distro, you may find usbvideo.ko isn't conveniently
available :-( The choice is to build it from another camera app ( a
few suggestions are in the Sonixcam-module readme )
For Debian for instance, I found installing video4linux-nw802-source gave me the usbvideo.h which attempting to build the sonix driver needed. I had to cd into the /usr/src/kernel-headers-version/drivers/usb/media folder and then symlink the usbvideo.h ;) I am sure there must be a better way - but at least this worked for me.
Thats all there is to it. Hope this has helped.