Webcam Video Surveillance via Motion Debian Arm

If you own a webcam from this list than you can attach it to the AsusWRT routers usb port and capture images from it when motion is detected, like babyroom, garage, courtyard...

It's only for arm devices like RT-AC56U, RT-AC68U, RT-AC87U...

1- Install Debian from here
2- Download videomod script

wget -c -O /opt/etc/
chmod a+rx /opt/etc/

2b - Download and load UVC Modules

wget -c -O /opt/tmp/uvc_modules_2.6.36brcmarm-380.58-arm.tgz
cd /
tar -zxf /opt/tmp/uvc_modules_2.6.36brcmarm-380.58-arm.tgz
/opt/etc/ load

3 - Enter Debian

debian enter

4 - Update Debian

apt-get update
apt-get upgrade

5 - Install motion

apt-get install motion

6 - Enable start

sed -i 's/start_motion_daemon=no/start_motion_daemon=yes/g' "/etc/default/motion"

7 - Fix start

sed -i 's/--chuid motion/--chuid root/g' "/etc/init.d/motion"

8 - Change download directory

sed -i 's/target_dir \/var\/lib\/motion/target_dir \/mnt\/motion/g' "/etc/motion/motion.conf"

9 -Exit debian


10 - Rename original script and add it to chrooted services list

mv /opt/debian/etc/init.d/motion /opt/debian/etc/init.d/S90motion-debian
echo "" >>/opt/etc/chroot-services.list
echo "S90motion-debian" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

11 - Create script to load UVC Modules and motion at startup

nano /jffs/scripts/post-mount

Add this lines

sleep 5
/opt/etc/ load
sleep 10
/opt/etc/init.d/S99debian start

Save with CTRL-O / Enter / and exit with CTRL-X

chmod a+rx /jffs/scripts/post-mount

12 - Start motion

debian restart

13 - Perform a movement in the front of your webcam.

14 - Go to media folder you setup in S99debian script here at point 4 and you'll find pictures captured by webcam and some .swf files witch can be oppened with your internet browser.


Tested successfully with Logitech C270 webcam


  • Incognito Psytrancer

    Thank you very much, the modules work well on the new firmware Merlin!

  • khan

    How can I get the sound record from my c270 camera?

    • I'm not shore if is possible, maybe with alsa-lib

  • Incognito Psytrancer

    Hello! With the new firmware from Merlin RT-AC68U_3.0.0.4_378.50_beta1 modules of this manual (input-core.ko, v4l1-compat.ko, videodev.ko, v4l2-int-device.ko, v4l2-common.ko, uvcvideo .ko) do not work! Maybe tell how to compile these modules for the new firmware or lay ready? Thanks You!


To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...