| Spca5xx-LE WebCam |
|
|
|
| Written by macsat | |
| Tuesday, 03 January 2006 | |
|
This tutorial is specific for spca5xx based webcams. Theese cams include popular models like the Creative NX, Creative NX Pro, Creative NX Pro2, Creative Live!, Logitech Quickcam IM, Logitech Quickcam for Notebook and many more. The complete list of compatible devices can be found on: http://mxhaard.free.fr/spca5xx.html
Index
1) Installing spca5xx Installing spca5xx
Very often installing software in OpenWrt is as easy as 1-2-3. Unfortunately I havent been able to find any pre-build ipkg packages including the kernel modules and software for using with the spca5xx web cams.
The first thing to do, is to download the needed files. To (of three) binaries are needed. You will need a kernel module (driver) and a small programme to retrieve images from the web cam. There are two possible kernel modules, the "normal" one and one made specifically for Embedded Devices like the OpenWrt routers - this version is suffixed with "LE". If your device is supported by the LE version of the driver, I really do suggest that you use this one, as it takes up less ressources than the "full" version. Consult the list of compatible devices here: http://mxhaard.free.fr/spca5xx.html and pay attention to the "Driver" column. If your device is listed with spca5xx/LE, you can use the LE version - if it is listed with spca5xx you will need the full version. The modules can be found on the Downloads section of this page. Unfortunately I have been forced to make the section registered-users only, in order to try to keep traffic a bit down. So if you decide to go on from here, you will have to register. This also allows you to post questions and comments on the forums, so it might be worhtwhile anyway.
The needed files are: Kernel Module - Full version: http://www.macsat.com/macsat/component/option,com_docman/task,doc_details/gid,10/Itemid,63/ Software to retrive images: http://www.macsat.com/macsat/component/option,com_docman/task,doc_details/gid,12/Itemid,63/ I will show the way to install the LE version. Installing the non-LE version is EXCATELY the same, just with a different name of the files :-) After having downloaded the files, you need to copy them to your router. An easy and smooth way to do this is by sftp or ftp. Start by changing to the directory where you uploaded your two files. Often this will be in /tmp since this is the default "server root" for the sftpd server. Then move the files to the appropiate folders, unpack them and set the correct file rights.
mv spca5xx_lite.o.gz /lib/modules/2.4.30 Now it is time to add the module, so that it is loaded at statup. The kernel module is dependent of the kmod-videodev, so this will be installed first, and then the spca4xx_lite module is set to be loaded at startup.
ipkg install videodev In order to test if this works, either reboot your router or run something like this:
insmod videodev Try running dmesg to see if you get something like this occurs at the end:
Linux video capture interface: v1.00 Now connect your web cam, for my cam - a Creative NX Pro - I get this in my syslog (dmesg):
hub.c: new USB device 01:02.0-1, assigned address 5
This creates a device called /dev/v4l/video0 ln -s /dev/v4l/video0 /dev/video0
Using spcacat
The spcacat binary has the following possible switches: I have made a small bash script that will retrieve an image every 10 seconds, and save it as SpcaPict.jpg.
My script is called imagesnap.sh and looks like: As you can see, I write my log on the /opt location, meaning that I write it on an external storage device. It is NOT recommended to write the output log in the falsh, as it will wear out with all the writing. If you do not have an external storage device attached, I recommend that you write the log (the > /opt/var/log/spcacat.log statement) and the image itselves, to /tmp
To make the script run at startup, you can place it in /opt/www and make a S97webcam like: Now at boot time you will have your webcam create the image /opt/www/SpcaPict.jpg every 10 seconds. To access the file, I have made a small html page (/opt/www/webcam.html) :
<html><head>
Now you can access your webcam by http://<your-router-ip>/webcam.html (if youre web server is setup to serve this location!) |
|
| Last Updated ( Monday, 26 February 2007 ) |
| < Prev | Next > |
|---|







