TeHashX
Very Senior Member
New site with updated guide
Here is another tutorial about webcam video surveillance via mjpg-streamer from RT-N56U project, thx guys.
If you own a webcam from this list than you can attach it to the RT-N66U routers usb port and see in real time images from it, like babyroom, garage, courtyard...
We need a usb-flash formatted EXT2 or a usb-hdd formated EXT3, may not work on FAT32 or NTFS.
On router UI we have to enable Telnet or SSH under Administration / System Tab (SSH is enabled only on custom firmware and is more safe).
• To start the optware environment:
• go to http://192.168.1.1/APP_Installation.asp and install Download Master (uninstall or disable after, if you are not using it)
• Login to router with putty terminal
• ipkg update
• ipkg upgrade
• ipkg install wget-ssl http://tinyurl.com/mjpg-streamer-r63-2
• rm /opt/etc/init.d/K99webcam
• /opt/bin/wget -c -O /opt/etc/init.d/S99webcam http://tinyurl.com/S98webcam --no-check-certificate
• chmod 755 /opt/etc/init.d/S99webcam
• /opt/bin/wget -q http://tinyurl.com/videodev-rt-n66u --no-check-certificate -O- | cat > /opt/etc/webcam/videomod.sh
• /opt/bin/wget -c -O /opt/tmp/kmods_video_rt-n66u_2.6.22.19.tar.gz http://goo.gl/c5lBDb --no-check-certificate
• cd /
• tar -zxf /opt/tmp/kmods_video_rt-n66u_2.6.22.19.tar.gz
• /opt/etc/webcam/videomod.sh load
• /opt/etc/init.d/S99webcam start
• go to web browser and type: http://192.168.1.1:9999/stream_simple.html default username admin password admin
You can change username, password, resolution, fps...
• ipkg install nano
• /opt/etc/init.d/S99webcam stop
• nano /opt/etc/init.d/S99webcam find this two lines and replace with desired login
• save with CTRL-O / Enter / and exit with CTRL-X
To start mjpg-streamer automatically on every router reboot we have to make a script (available only on Merlin's firmwares)
• nano /jffs/scripts/post-mount and add this lines
#!/bin/sh
/opt/etc/init.d/S99webcam start
• save with CTRL-O / Enter / and exit with CTRL-X
• chmod a+rx /jffs/scripts/post-mount (make it executable)
If you want to access the webcam from wan, we have to create another script that open the port 9999 (available only on Merlin's firmwares)
• nano /jffs/scripts/firewall-start add this lines
#!/bin/sh
iptables -I INPUT -p tcp --destination-port 9999 -j ACCEPT
• save with CTRL-O / Enter / and exit with CTRL-X
• chmod a+rx /jffs/scripts/firewall-start (make it executable)
• /opt/etc/init.d/S99webcam start
Now just type your_wan_ip adress:9999/stream_simple.html in browser and should see your webcam
If you have dynamic ip, better set a dynamic dns
Tested successfully with Logitech C270 webcam
Video HERE...
Here is another tutorial about webcam video surveillance via mjpg-streamer from RT-N56U project, thx guys.
If you own a webcam from this list than you can attach it to the RT-N66U routers usb port and see in real time images from it, like babyroom, garage, courtyard...
We need a usb-flash formatted EXT2 or a usb-hdd formated EXT3, may not work on FAT32 or NTFS.
On router UI we have to enable Telnet or SSH under Administration / System Tab (SSH is enabled only on custom firmware and is more safe).
• To start the optware environment:
• go to http://192.168.1.1/APP_Installation.asp and install Download Master (uninstall or disable after, if you are not using it)
• Login to router with putty terminal
• ipkg update
• ipkg upgrade
• ipkg install wget-ssl http://tinyurl.com/mjpg-streamer-r63-2
• rm /opt/etc/init.d/K99webcam
• /opt/bin/wget -c -O /opt/etc/init.d/S99webcam http://tinyurl.com/S98webcam --no-check-certificate
• chmod 755 /opt/etc/init.d/S99webcam
• /opt/bin/wget -q http://tinyurl.com/videodev-rt-n66u --no-check-certificate -O- | cat > /opt/etc/webcam/videomod.sh
• /opt/bin/wget -c -O /opt/tmp/kmods_video_rt-n66u_2.6.22.19.tar.gz http://goo.gl/c5lBDb --no-check-certificate
• cd /
• tar -zxf /opt/tmp/kmods_video_rt-n66u_2.6.22.19.tar.gz
• /opt/etc/webcam/videomod.sh load
• /opt/etc/init.d/S99webcam start
• go to web browser and type: http://192.168.1.1:9999/stream_simple.html default username admin password admin
You can change username, password, resolution, fps...
• ipkg install nano
• /opt/etc/init.d/S99webcam stop
• nano /opt/etc/init.d/S99webcam find this two lines and replace with desired login
• save with CTRL-O / Enter / and exit with CTRL-X
To start mjpg-streamer automatically on every router reboot we have to make a script (available only on Merlin's firmwares)
• nano /jffs/scripts/post-mount and add this lines
#!/bin/sh
/opt/etc/init.d/S99webcam start
• save with CTRL-O / Enter / and exit with CTRL-X
• chmod a+rx /jffs/scripts/post-mount (make it executable)
If you want to access the webcam from wan, we have to create another script that open the port 9999 (available only on Merlin's firmwares)
• nano /jffs/scripts/firewall-start add this lines
#!/bin/sh
iptables -I INPUT -p tcp --destination-port 9999 -j ACCEPT
• save with CTRL-O / Enter / and exit with CTRL-X
• chmod a+rx /jffs/scripts/firewall-start (make it executable)
• /opt/etc/init.d/S99webcam start
Now just type your_wan_ip adress:9999/stream_simple.html in browser and should see your webcam
If you have dynamic ip, better set a dynamic dns
Tested successfully with Logitech C270 webcam
Video HERE...
Last edited: