<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://crancho.com/w/index.php?action=history&amp;feed=atom&amp;title=DSCAlarm%3ARouter%3ACam</id>
	<title>DSCAlarm:Router:Cam - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://crancho.com/w/index.php?action=history&amp;feed=atom&amp;title=DSCAlarm%3ARouter%3ACam"/>
	<link rel="alternate" type="text/html" href="https://crancho.com/w/index.php?title=DSCAlarm:Router:Cam&amp;action=history"/>
	<updated>2026-05-02T05:45:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://crancho.com/w/index.php?title=DSCAlarm:Router:Cam&amp;diff=277&amp;oldid=prev</id>
		<title>Ohayden: /* Tips and Tricks */</title>
		<link rel="alternate" type="text/html" href="https://crancho.com/w/index.php?title=DSCAlarm:Router:Cam&amp;diff=277&amp;oldid=prev"/>
		<updated>2008-05-11T20:01:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Tips and Tricks&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Web Cam / Motion Detection =&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Manufacturer !! Model !! Misc&lt;br /&gt;
|- &lt;br /&gt;
| Logitech     || QC Communicate STX || vend/prod from dmesg: 0x46d/0x8ad&lt;br /&gt;
|- &lt;br /&gt;
| NewPoint     || 4-Port USB Hub     || USB Version 1.X&lt;br /&gt;
|}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;*NOTE*&amp;#039;&amp;#039;&amp;#039; I tried a Kensington (model 33141) USB 2.0 hub that is backward compatible with 1.x and it didn&amp;#039;t work.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
*Make sure ipkg is updated:&lt;br /&gt;
 ipkg update&lt;br /&gt;
*Install USB drivers:&lt;br /&gt;
 ipkg install kmod-usb-core&lt;br /&gt;
 ipkg install kmod-usb-ohci&lt;br /&gt;
 ipkg install kmod-videodev&lt;br /&gt;
 reboot&lt;br /&gt;
* After rebooting, try plugging in the USB hub and you should get a message in dmesg at such:&lt;br /&gt;
 hub.c: new USB device 01:02.0-1, assigned address 2&lt;br /&gt;
 hub.c: USB hub found&lt;br /&gt;
 hub.c: 4 ports detected&lt;br /&gt;
&lt;br /&gt;
*Install the spca driver (backed up in the wrt\cam folder):&lt;br /&gt;
 wget http://pmeerw.net/openwrt/kmod-spca5xx_2.4.30+20060501-brcm-1_mipsel.ipk&lt;br /&gt;
 ipkg install kmod-spca5xx_2.4.30+20060501-brcm-1_mipsel.ipk&lt;br /&gt;
 insmod videodev&lt;br /&gt;
 insmod spca5xx&lt;br /&gt;
*Plug in the USB camera and you will get the following messags from dmesg:&lt;br /&gt;
 hub.c: new USB device 01:02.0-1.4, assigned address 5&lt;br /&gt;
 drivers/usb/spca5xx.c: USB SPCA5XX camera found. Logitech QC Communicate STX&lt;br /&gt;
 drivers/usb/spca5xx.c: [spca5xx_probe:8380] Camera type JPEG&lt;br /&gt;
 drivers/usb/zc3xx.h: [zc3xx_config:415] Find Sensor HV7131R(c)&lt;br /&gt;
 drivers/usb/spca5xx.c: [spca5xx_getcapability:2207] maxw 640 maxh 480 minw 176 minh 144&lt;br /&gt;
*To automatically do the &amp;quot;insmod&amp;quot;, append to /etc/modules as such:&lt;br /&gt;
 echo &amp;quot;videodev&amp;quot; &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
*Install motion and the jpeg library (backed up in the wrt\cam folder):&lt;br /&gt;
 ipkg install http://naaa.de/programme/motion/libjpeg_6b-1_mipsel.ipk &lt;br /&gt;
 ipkg install http://naaa.de/programme/motion/motion_3.2.6-1_mipsel.ipk &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;*NOTE*&amp;#039;&amp;#039;&amp;#039; Motion requires the &amp;quot;libpthread&amp;quot; package, but it should automatically pull it down from openwrt.org&amp;#039;&amp;#039;&lt;br /&gt;
*Push up the default config from the wrt\cam\motion_confs\single folder:&lt;br /&gt;
 scp motion.conf root@192.168.0.222:/etc/&lt;br /&gt;
*You should be able to run motion now, by typing &amp;quot;motion -n&amp;quot;.  If you have firefox (or another mozilla based browser), you can point it to the IP:8081 as such:&lt;br /&gt;
  http://192.168.0.22:8081&lt;br /&gt;
*Ctrl+C to get out of motion.&lt;br /&gt;
*Since I can&amp;#039;t always use firefox, I install a java (yuck) applet (backed up in the wrt\cam folder) for streaming as such:&lt;br /&gt;
 wget http://www.charliemouse.com/code/cambozola/cambozola-latest.tar.gz&lt;br /&gt;
 gunzip cambozola-latest.tar.gz&lt;br /&gt;
 tar xf cambozola-latest.tar.gz   &amp;lt;--- I received a &amp;quot;tar: Invalid tar magic&amp;quot; message.  It still works, but I should investigate later.&lt;br /&gt;
 mkdir /www/webcam/&lt;br /&gt;
 mv cambozola-0.68/* /www/webcam&lt;br /&gt;
 cd /www/webcam/&lt;br /&gt;
 vim example.html&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;*NOTE*&amp;#039;&amp;#039;&amp;#039; Change http://localhost:2020 to your IP:PORT as such: http://192.168.0.222:8081&amp;#039;&amp;#039;&amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;*NOTE*&amp;#039;&amp;#039;&amp;#039; Change width / height as desired, I used 600x480.&amp;#039;&amp;#039;&lt;br /&gt;
  mv example.html index.html&lt;br /&gt;
*Now you can run motion with either motion by itself for daemon mode, or with the -n for non-daemon mode.&lt;br /&gt;
*Point your IE browser to http://192.168.0.222/webcam and you should see your cam&amp;#039;s image stream.&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
For spcacat use spca5xx_lite.o (backed up in the wrt\cam folder):&lt;br /&gt;
*Needs the following packages:&lt;br /&gt;
 ipkg install libgcc&lt;br /&gt;
*insmod spca5xx_lite.o&lt;br /&gt;
*ln -s /dev/v4l/video0 /dev/video0    &amp;lt;---Won&amp;#039;t work with /dev/v41/video0&lt;br /&gt;
*spcacat -d /dev/video0 -s 640x480 -g -f jpg -p 3000 -o&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
=== Black Picture ===&lt;br /&gt;
 The web cam stream is showing a black picture and nothing more.&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Solution&amp;#039;&amp;#039;&amp;#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
 Kill motion and re-start it and it should solve the issue.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*http://www.macsat.com/macsat/content/view/36/30/&lt;br /&gt;
*http://wiki.openwrt.org/VideoSpca5xx&lt;br /&gt;
*http://wiki.openwrt.org/webcam?highlight=%28webcam%29&lt;br /&gt;
*http://www.charliemouse.com/code/cambozola/&lt;/div&gt;</summary>
		<author><name>Ohayden</name></author>
	</entry>
</feed>