Webcam Video Surveillance via Mjpg-Streamer Debian Arm

If you own a webcam from this list than you can attach it to the AsusWRT routers usb port and see in real time images from it, like babyroom, garage, courtyard...

This version is for arm devices like RT-AC56U, RT-AC68U, RT-AC87U...

1- Install Debian from here

2- Download videomod script

wget -c -O /opt/etc/videomod.sh http://goo.gl/1RW00w
chmod a+rx /opt/etc/videomod.sh

2b - Download and load UVC Modules

wget -c -O /opt/tmp/uvc_modules_2.6.36brcmarm-380.58-arm.tgz http://goo.gl/UkS8Xy
cd /
tar -zxvf /opt/tmp/uvc_modules_2.6.36brcmarm-380.58-arm.tgz
/opt/etc/videomod.sh load

3 - Enter Debian

debian enter

4 - Update Debian

apt-get update
apt-get upgrade

5 - Install necessary packages

apt-get install wget procps libjpeg-dev libv4l-dev

6 - Download and install mjpg-streamer

wget -c -O /var/tmp/mjpg-streamer_182-1_armel.deb http://goo.gl/xMnSf4
dpkg -i /var/tmp/mjpg-streamer_182-1_armel.deb

7 - Download startup script

wget -c -O /etc/init.d/S99mjpg-streamer-debian http://goo.gl/UKIgeq
chmod 755 /etc/init.d/S99mjpg-streamer-debian

8 - Exit Debian

exit

9 - Add script to chrooted services list

echo "" >>/opt/etc/chroot-services.list
echo "S99mjpg-streamer-debian" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

10 - Create script to load UVC Modules and mjpg-streamer at startup

nano /jffs/scripts/post-mount

Add this lines

#!/bin/sh

/opt/etc/videomod.sh load
sleep 5
/opt/etc/init.d/S99debian start

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

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

11 - Start mjpg-streamer

debian restart

12 - Go to 192.168.1.1:3000/stream_simple.html and should see images from your webcam

If you want to change username, password, portresolution and fps, edit /opt/debian/etc/init.d/S99mjpg-streamer-debian script

 

Tested successfully with Logitech C270 webcam
c270

 

  • Cory

    Hey, i'm getting this with the latest 380.59 versions. Do you have updated UVCs for the 380.x's
    Jul 31 17:00:27 kernel: Adding 524284k swap on /opt/swap. Priority:-1 extents:148 across:540400k
    Jul 31 17:00:27 kernel: input_core: disagrees about version of symbol module_layout
    Jul 31 17:00:27 kernel: v4l1_compat: disagrees about version of symbol module_layout
    Jul 31 17:00:27 kernel: videodev: disagrees about version of symbol module_layout
    Jul 31 17:00:28 kernel: v4l2_int_device: disagrees about version of symbol module_layout
    Jul 31 17:00:28 kernel: v4l2_common: disagrees about version of symbol module_layout
    Jul 31 17:00:28 kernel: uvcvideo: disagrees about version of symbol module_layout

    • TeHashX

      Last compilation was with firmware 376.50
      Try to load modules twice

      /opt/etc/videomod.sh load

      • Cory

        Thanks, i'll stop banging my head on it then. Loading again didn't work, same result. Unfortunately I need the .59 fixes for my setup so I can't roll back. Lemme know if you think of any other solutions.

      • TeHashX

        I will try a new compilation tomorrow

      • TeHashX

        Try this modules http://goo.gl/UkS8Xy compiled for v380.58

      • TeHashX

        Modules order

        #!/bin/sh
        PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        do_load_kmods_video()
        {

        ## If uvcvideo module is already loaded exit with 1.
        ## Note: uvcvideo is being loaded last.
        lsmod | grep -q uvcvideo && exit 1

        DRV_PATH=lib/modules/uname -r/kernel/drivers

        kmods_req="
        usb/core/usbcore.ko
        input/input-core.ko
        media/video/v4l1-compat.ko
        media/video/videodev.ko
        media/video/v4l2-int-device.ko
        media/video/v4l2-common.ko
        media/video/gspca/gspca_main.ko
        media/video/uvc/uvcvideo.ko"

        kmods_path=""

        for i in $kmods_req ; do
        if [ -f /$DRV_PATH/$i ] ; then
        kmods_path="$kmods_path /$DRV_PATH/$i"
        else
        kmods_path="$kmods_path /opt/$DRV_PATH/$i"
        fi
        done

        for i in $kmods_path ; do
        insmod $i >/dev/null 2>&1
        done

        }

        do_unload_kmods_video()
        {

        ## If videodev module is not loaded exit with 1.
        ## Note: videodev.ko is being loaded first.
        lsmod | grep -q videodev || exit 1

        kmods_media="
        uvcvideo
        input-core
        v4l2-int-device
        v4l2-common
        v4l1-compat
        gspca_main
        videodev"

        for i in $kmods_media ; do
        rmmod $i >/dev/null 2>&1
        done

        }

        case "$1" in
        load)
        do_load_kmods_video
        ;;
        unload)
        do_unload_kmods_video
        ;;
        *)
        echo "Usage: $0 { load | unload }"
        exit 3
        esac

        exit 0

      • Cory

        Still the same result. I'm on .59 though, is that the difference still?
        Also that modules script is missing the ' ' in DRV_PATH=lib/modules/'uname -r'/kernel/drivers... but otherwise its the same right?

        May 3 08:48:35 kernel: usbcore: disagrees about version of symbol module_layout
        May 3 08:48:35 kernel: input_core: disagrees about version of symbol module_layout
        May 3 08:48:35 kernel: v4l1_compat: disagrees about version of symbol module_layout
        May 3 08:48:35 kernel: videodev: disagrees about version of symbol module_layout
        May 3 08:48:35 kernel: v4l2_int_device: disagrees about version of symbol module_layout
        May 3 08:48:35 kernel: v4l2_common: disagrees about version of symbol module_layout
        May 3 08:48:35 kernel: gspca_main: disagrees about version of symbol module_layout
        May 3 08:48:36 kernel: uvcvideo: disagrees about version of symbol module_layout
        May 3 08:48:51 MJPG-streamer [2537]: starting application
        May 3 08:48:51 MJPG-streamer [2537]: enabling daemon mode
        May 3 08:48:51 MJPG-streamer [2539]: MJPG Streamer Version: svn rev: 3:182M
        May 3 08:48:51 MJPG-streamer [2539]: Using V4L2 device.: /dev/video0
        May 3 08:48:51 MJPG-streamer [2539]: Desired Resolution: 320 x 240
        May 3 08:48:51 MJPG-streamer [2539]: Frames Per Second.: 15
        May 3 08:48:51 MJPG-streamer [2539]: Format............: JPEG
        May 3 08:48:51 MJPG-streamer [2539]: TV-Norm...........: DEFAULT
        May 3 08:48:51 MJPG-streamer [2539]: init_VideoIn failed

      • TeHashX

        Remove old modules and videomod.sh then continue from step 2
        rm /opt/etc/videomod.sh
        rm -r /opt/lib/modules

      • TeHashX

        There is some changes in v59b2 kernel, I will wait until RMerlin release the 59 final version and compile another set of modules.

      • Cory

        Makes sense, I just can't go back. It breaks the WAN connection in any 380 before .59. Asus introduced a UI error in earlier version that they fixed.
        Thanks for you work in keeping this current for us. I greatly appreciate it.

      • TeHashX

        Ok, use this fresh modules :)
        http://goo.gl/91NOfJ

      • TeHashX

        I tested on v380.59beta2 and are ok, how about you?

      • Cory

        ohh, dang just got this reply.. Let me try

      • Cory

        Here's the upgrade lines/steps for .59 and above. Though

        rm -r /opt/lib/modules

        wget -c -O /opt/tmp/uvc_modules_2.6.36brcmarm-380.59beta2-arm.tgz http://goo.gl/91NOfJ
        cd /
        tar -zxf /opt/tmp/uvc_modules_2.6.36brcmarm-380.59beta2-arm.tgz
        /opt/etc/videomod.sh load

      • TeHashX

        I can't compile modules for every new release, just if user ask me...

      • TeHashX

        Dunno why all your comments need approval (you are the only one), can I delete your account then recreate?
        Thanks

      • Cory

        :) sure

      • Please recreate your account now after clearing browser cache.

      • landcameras

        logged-in test

      • TeHashX

        It's ok now

      • Let me know if you succed!

      • Cory

        I know.. just putting that out there for folks who run into this. Thanks again.

      • Cory

        Back in business! thanks so much! looks like there needs to be an addendum to this article for versions. or step 2b, 2c 2d..etc.

      • Cory

        Yeah, I did that..

      • You did what?

      • Cory

        rm'd the modules, cleaned it up before reinstalling.

  • Dorofte Ciprian

    HI, I followed the instruction but when I try to load the webpage ... Chrome just displays the message "This webpage is not available"
    Router log:
    MJPG-streamer [1106]: ERROR: could not find input plugin
    MJPG-streamer [1106]: Perhaps you want to adjust the search path with:
    MJPG-streamer [1106]: # export LD_LIBRARY_PATH=/path/to/plugin/folder
    MJPG-streamer [1106]: dlopen: libjpeg.so.8: cannot open shared object file: No such file or directory

    My router RT-AC68U, firmware 378.56_2, webcam Microsoft Lifecam VX-700

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# free
    total used free shared buffers
    Mem: 255720 157968 97752 0 960
    -/+ buffers: 157008 98712
    Swap: 524284 0 524284

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/root 29568 29568 0 100% /
    devtmpfs 127752 0 127752 0% /dev
    tmpfs 127860 448 127412 0% /tmp
    /dev/mtdblock4 64256 1748 62508 3% /jffs
    /dev/sda1 47990920 909644 44521328 2% /tmp/mnt/sda1
    /dev/sda2 437183484 18361388 418822096 4% /tmp/mnt/sda2
    devtmpfs 127752 0 127752 0% /tmp/mnt/sda1/optware-ng.arm/debian/dev
    /dev/sda2 437183484 18361388 418822096 4% /tmp/mnt/sda1/optware-ng.arm/debian/mnt

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# mount
    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro,relatime)
    devtmpfs on /dev type devtmpfs (rw,relatime,size=127752k,nr_inodes=31938,mode=755)
    proc on /proc type proc (rw,relatime)
    tmpfs on /tmp type tmpfs (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    devpts on /dev/pts type devpts (rw,relatime,mode=600)
    /dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
    usbfs on /proc/bus/usb type usbfs (rw,relatime)
    /dev/sda1 on /tmp/mnt/sda1 type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
    /dev/sda2 on /tmp/mnt/sda2 type tntfs (rw,nodev,relatime,uid=0,gid=0,umask=00,nls=utf8,min_prealloc_size=64k,max_prealloc_size=437183484,readahead=1M,user_xattr,case_sensitive,fail_safe,hidden=show,dotfile=show,errors=continue,mft_zone_multiplier=1)
    devtmpfs on /tmp/mnt/sda1/optware-ng.arm/debian/dev type devtmpfs (rw,relatime,size=127752k,nr_inodes=31938,mode=755)
    proc on /tmp/mnt/sda1/optware-ng.arm/debian/proc type proc (rw,relatime)
    sysfs on /tmp/mnt/sda1/optware-ng.arm/debian/sys type sysfs (rw,relatime)
    /dev/sda2 on /tmp/mnt/sda1/optware-ng.arm/debian/mnt type tntfs (rw,nodev,relatime,uid=0,gid=0,umask=00,nls=utf8,min_prealloc_size=64k,max_prealloc_size=437183484,readahead=1M,user_xattr,case_sensitive,fail_safe,hidden=show,dotfile=show,errors=continue,mft_zone_multiplier=1)

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# cat /jffs/scripts/post-mount
    #!/bin/sh

    if [ "$1" = "/tmp/mnt/sda1" ] ; then
    ln -nsf $1/optware-ng.arm /tmp/opt
    fi

    if [ -f /opt/swap ]
    then
    echo -e "Mounting swap file..."
    swapon /opt/swap
    else
    echo -e "Swap file not found or /opt is not mounted..."
    fi

    /opt/etc/videomod.sh load

    sleep 5

    /opt/etc/init.d/S99debian start

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# cat /opt/etc/chroot-services.list

    S99mjpg-streamer-debian

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# ls -l /opt/etc/init.d
    -rwxr-xr-x 1 ex5 root 2576 Feb 29 15:37 S99debian
    -rwxrwxrwx 1 ex5 root 2788 Feb 29 15:33 rc.func
    -rwxrwxrwx 1 ex5 root 841 Feb 29 15:33 rc.unslung

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# ls -l /opt
    lrwxrwxrwx 1 ex5 root 7 Nov 2 17:46 /opt -> tmp/opt

    dmesg command:
    ........
    uvcvideo: Found UVC 1.00 device Microsoft LifeCam (045e:074a)
    input: Microsoft LifeCam as /class/input/input0
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (v0.1.0)

    ex5@RT-AC68U:/tmp/mnt/sda1/optware-ng.arm# ls -l /dev
    ..........
    brw-r--r-- 1 ex5 root 8, 0 Aug 1 2015 sda
    brw-r--r-- 1 ex5 root 8, 1 Aug 1 2015 sda1
    brw-r--r-- 1 ex5 root 8, 2 Aug 1 2015 sda2
    crw-r--r-- 1 ex5 root 21, 0 Aug 1 2015 sg0
    drwxr-xr-x 2 ex5 root 40 Jan 1 1970 shm
    crw-rw-rw- 1 ex5 root 5, 0 Jan 1 1970 tty
    crw------- 1 ex5 root 4, 64 Jan 1 1970 ttyS0
    crw------- 1 ex5 root 4, 65 Jan 1 1970 ttyS1
    crw-rw-rw- 1 ex5 root 1, 9 Jan 1 1970 urandom
    crw-r--r-- 1 ex5 root 189, 0 Aug 1 2015 usb1
    crw-r--r-- 1 ex5 root 189, 128 Aug 1 2015 usb2
    crw-r--r-- 1 ex5 root 189, 256 Aug 1 2015 usb3
    crw-r--r-- 1 ex5 root 189, 0 Aug 1 2015 usbdev1.1
    crw-r--r-- 1 ex5 root 189, 128 Aug 1 2015 usbdev2.1
    crw-r--r-- 1 ex5 root 189, 129 Aug 1 2015 usbdev2.2
    crw-r--r-- 1 ex5 root 189, 130 Aug 1 2015 usbdev2.3
    crw-r--r-- 1 ex5 root 189, 256 Aug 1 2015 usbdev3.1
    crw-r--r-- 1 ex5 root 81, 0 Aug 1 2015 video0
    crw-rw-rw- 1 ex5 root 1, 5 Jan 1 1970 zero

    how to solve?, thanks

    • TeHashX

      Inside debian
      apt-get install libjpeg-turbo8

      • Dorofte Ciprian

        I got this:

        root@RT-AC68U:/# apt-get install libjpeg-turbo8
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        Package libjpeg-turbo8 is not available, but is referred to by another package.
        This may mean that the package is missing, has been obsoleted, or
        is only available from another source

        E: Package 'libjpeg-turbo8' has no installation candidate

      • TeHashX

        Not at home atm, search on google this error and you will find soon a solution :)

  • Csaba Benesch

    my camera has a mic, can I enable it?

    • Yes, something with alsalib but is very difficult and I can't help you

  • Up and running well! a few questions about the config.

    Seems there is an odd lack of documentation that I can can find about the mjpeg-streamer options

    here's my startup messages:

    Nov 12 12:12:54 MJPG-streamer [3235]: starting application
    Nov 12 12:12:54 MJPG-streamer [3235]: enabling daemon mode
    Nov 12 12:12:54 MJPG-streamer [3237]: MJPG Streamer Version: svn rev: 3:182M
    Nov 12 12:12:54 MJPG-streamer [3237]: Using V4L2 device.: /dev/video0
    Nov 12 12:12:54 MJPG-streamer [3237]: Desired Resolution: 800 x 600
    Nov 12 12:12:54 MJPG-streamer [3237]: Frames Per Second.: 3
    Nov 12 12:12:54 MJPG-streamer [3237]: Format............: JPEG
    Nov 12 12:12:54 MJPG-streamer [3237]: TV-Norm...........: DEFAULT
    Nov 12 12:12:54 MJPG-streamer [3237]: FPS coerced ......: from 3 to 5
    Nov 12 12:12:54 MJPG-streamer [3237]: Frame period time ......: 333 ms
    Nov 12 12:12:54 MJPG-streamer [3237]: www-folder-path...: /usr/www/
    Nov 12 12:12:54 MJPG-streamer [3237]: HTTP TCP port.....: 8101
    Nov 12 12:12:54 MJPG-streamer [3237]: username:password.: disabled
    Nov 12 12:12:54 MJPG-streamer [3237]: commands..........: enabled
    Nov 12 12:12:54 MJPG-streamer [3237]: starting input plugin /usr/lib/input_uvc.so
    Nov 12 12:12:54 MJPG-streamer [3237]: starting output plugin: /usr/lib/output_http.so (ID: 00)

    What is the switch to change it from JPEG to MJPEG format?

    Also, i'm getting a ton of log spamming. This is probably super simple, but i'm not that familiar with debian. My router log is filled with:

    Nov 12 12:17:55 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:55 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:55 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:55 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:55 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:55 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:56 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:56 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:57 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:57 MJPG-streamer [3237]: serving client: 10.8.2.2
    Nov 12 12:17:57 MJPG-streamer [3237]: serving client: 10.8.2.2
    nearly every frame I think is logged! how do I stop that? honestly, I don't really care, and running 24/7 it will fill up precious router space with logging!

  • Csaba Benesch

    If the router rebooted, then the camera don't started automatically , any idea?

    • Read carefully points 9 and 10

      • Csaba Benesch

        steps followed but same, after reboot, the camera dont start automatically

      • Post here following outputs:
        free
        df
        mount
        cat /jffs/scripts/post-mount
        cat /opt/etc/chroot-services.list
        ls -l /opt/etc/init.d
        ls -l /opt

      • Csaba Benesch

        I have new installed my system (ac87u 'latest merlin fw' now with optware) , infos what you needs:

        ASUSWRT-Merlin RT-AC87U_3.0.0.4 Mon Nov 2 15:00:06 UTC 2015

        criton@rt-ac87u:/tmp/home/root# free

        total used free shared buffers

        Mem: 255720 241168 14552 0 2596

        -/+ buffers: 238572 17148

        Swap: 524284 392 523892

        criton@rt-ac87u:/tmp/home/root# df

        Filesystem 1K-blocks Used Available Use% Mounted on

        /dev/root 43392 43392 0 100% /

        devtmpfs 127752 0 127752 0% /dev

        tmpfs 127860 5456 122404 4% /tmp

        /dev/mtdblock4 64256 1732 62524 3% /jffs

        /dev/sda5 961393964 2355488 910202488 0% /tmp/mnt/sda5

        devtmpfs 127752 0 127752 0% /tmp/mnt/sda5/optware-ng .arm/debian/dev

        criton@rt-ac87u:/tmp/home/root# mount

        rootfs on / type rootfs (rw)

        /dev/root on / type squashfs (ro,relatime)

        devtmpfs on /dev type devtmpfs (rw,relatime,size=127752k,nr_inodes=31938,mode=75 5)

        proc on /proc type proc (rw,relatime)

        tmpfs on /tmp type tmpfs (rw,relatime)

        sysfs on /sys type sysfs (rw,relatime)

        devpts on /dev/pts type devpts (rw,relatime,mode=600)

        /dev/mtdblock4 on /jffs type jffs2 (rw,noatime)

        usbfs on /proc/bus/usb type usbfs (rw,relatime)

        /dev/sda5 on /tmp/mnt/sda5 type ext4 (rw,nodev,relatime,barrier=1,data=ordered)

        devtmpfs on /tmp/mnt/sda5/optware-ng.arm/debian/dev type devtmpfs (rw,relatime,s ize=127752k,nr_inodes=31938,mode=755)

        proc on /tmp/mnt/sda5/optware-ng.arm/debian/proc type proc (rw,relatime)

        sysfs on /tmp/mnt/sda5/optware-ng.arm/debian/sys type sysfs (rw,relatime)

        criton@rt-ac87u:/tmp/home/root# cat /jffs/scripts/post-mount

        #!/bin/sh

        if [ $1 = "/tmp/mnt/sda5" ]

        then

        ln -nsf $1/optware-ng.arm /tmp/opt

        fi

        if [ -f /opt/swap ]

        then

        echo -e "Mounting swap file..."

        swapon /opt/swap

        else

        echo -e "Swap file not found or /opt is not mounted..."

        fi

        sleep 10

        /opt/etc/videomod.sh load

        sleep 5

        /opt/etc/init.d/S99debian start

        criton@rt-ac87u:/tmp/home/root# cat /opt/etc/chroot-services.list

        S99mjpg-streamer-debian

        criton@rt-ac87u:/tmp/home/root# ls -l /opt/etc/init.d

        -rwxr-xr-x 1 criton root 3959 Nov 7 10:51 S95transmission

        -rwxr-xr-x 1 criton root 2578 Nov 12 11:18 S99debian

        -rwxrwxrwx 1 criton root 2788 Nov 12 10:58 rc.func

        -rwxrwxrwx 1 criton root 841 Nov 12 10:58 rc.unslung

        criton@rt-ac87u:/tmp/home/root# ls -l /opt

        lrwxrwxrwx 1 criton root 7 Nov 2 16:48 /opt -> tmp/opt

      • On optware-ng is a little bit different, all scripts in /opt/etc/init.d/ are automatically executed by /jffs/scripts/services-start and I guess debian is starting but uvc modules not because is that sleep 10 delay, so we should remove it

        Modify /jffs/scripts/post-mount like this
        ...
        echo -e "Swap file not found or /opt is not mounted..."
        fi
        /opt/etc/videomod.sh load

        And reboot router
        If still not working, let me know

      • Csaba Benesch

        without sleep 10 its works, many many thanks. Which platform do you prefer? optware or entware?

      • Optware-NG but Entware-NG is comming too :)

      • Csaba Benesch

        in step 8 you write "exit debian" so, now iam in entware and I get the following message :

        criton@RT-AC87U-31C8:/tmp/home/root# echo "" >>/opt/etc/chroot-services.list

        criton@RT-AC87U-31C8:/tmp/home/root# echo "S99mjpg-streamer-debian" >>/opt/etc/chroot-services.list

        criton@RT-AC87U-31C8:/tmp/home/root# chmod 755 /opt/etc/chroot-services.list

        criton@RT-AC87U-31C8:/tmp/home/root# /opt/etc/chroot-services.list

        /opt/etc/chroot-services.list: line 2: S99mjpg-streamer-debian: not found

        criton@RT-AC87U-31C8:/tmp/home/root#

  • Marcus Lindén

    Until I get the cam plugged in the correct way, I wanted to do this:

    "If you want to change username, password, port, resolution and fps, edit /opt/debian/etc/init.d/S99mjpg-streamer-debian script"

    user, passw, port is there, but not res and fps?

    • Marcus Lindén

      Router log:

      Feb 5 12:41:55 MJPG-streamer [17023]: starting application
      Feb 5 12:41:55 MJPG-streamer [17023]: enabling daemon mode
      Feb 5 12:41:55 MJPG-streamer [17025]: MJPG Streamer Version: svn rev: 3:182M
      Feb 5 12:41:55 MJPG-streamer [17025]: Using V4L2 device.: /dev/video0
      Feb 5 12:41:55 MJPG-streamer [17025]: Desired Resolution: 640 x 480
      Feb 5 12:41:55 MJPG-streamer [17025]: Frames Per Second.: not limited
      Feb 5 12:41:55 MJPG-streamer [17025]: Format............: JPEG
      Feb 5 12:41:55 MJPG-streamer [17025]: TV-Norm...........: DEFAULT
      Feb 5 12:41:55 MJPG-streamer [17025]: init_VideoIn failed

    • mjpg_streamer -b -i "/usr/lib/input_uvc.so -r 320x240 -f 15" -o "/usr/lib/output_http.so -p 3000 -w /usr/www -c admin:admin"

      • Marcus Lindén

        Plugged the webcam straight into the router and it worked!
        But efter editing the above I only get this when browsing:

        404: Not Found!
        Could not open file

      • Marcus Lindén

        Hm, got the cam working. But it is very twichy.
        Service stops random.
        Port-forwarded port 3000 for access via WAN, that worked about 30 minutes.

      • To forward port, put in firewall-start script
        #!/bin/sh

        iptables -I INPUT -p tcp --destination-port 3000 -j ACCEPT

        Which webcam?

      • Marcus Lindén

        Where is that located?
        Microsoft HD Lifecam 3000

      • See here at point 15 but put only port 3000
        https://www.hqt.ro/bubbleupnp-server-through-debian-arm/
        It's better to access router from vpn not opening ports

      • Marcus Lindén

        This will create a new file?

      • Marcus Lindén

        Well, created that script and did a reboot, no access from WAN.
        Funny it worked for a limited time.

      • ls -l /jffs/scripts
        cat /jffs/scripts/firewall-start

      • Marcus Lindén

        admin@RT-AC68U-1FD0:/tmp/home/root# ls -l /jffs/scripts
        -rw-rw-rw- 1 admin root 70 Feb 6 08:27 firewall-start
        -rwxrwxrwx 1 admin root 85 Feb 5 21:48 post-mount
        -rwxrwxrwx 1 admin root 29 Feb 5 08:53 services-stop

        admin@RT-AC68U-1FD0:/tmp/home/root# cat /jffs/scripts/firewall-start
        #!/bin/sh

        iptables -I INPUT -p tcp --destination-port 3000 -j ACCEPT

        firewall-start did I create just now, did not exist before.

      • I know :)
        Make it executable
        chmod a+rx /jffs/scripts/firewall-start
        sh /jffs/scripts/firewall-start

      • Marcus Lindén

        Now it works from WAN.
        Do I need to start this every time the router is rebooted?

      • Firewall script is permanent and run automatically

      • Marcus Lindén

        Shit, had massive printer-problems, 75% of every print-job was lost in cyberspace.
        Updated to 378.50 and now the webcam won't show up at all, ls -l /dev show no webcam how much I try.

      • But did you updated uvc modules from point 2b?

  • deyanimay

    I followed the instruction but when I try to load the webpage at the end, I get nothing. Chrome just displays the message "This webpage is not available"

    • Which firmware?

      • deyanimay

        merlin 376.49_5

      • Need to compile gspca modules

      • deyanimay

        I've tried following a guide for this, but I cannot even install the package gspca-source, it doesn't seem to exist in the default repository. (I apologize if my understanding of the procedure is wrong as I am not very knowledgeable when it come to linux.) Is it possible that you could make a guide for this or at least point me in the right direction. Thanks.

      • Gspca modules are not included and need to be compiled by me, which webcam do you have, exact model?

      • deyanimay

        The two webcams I have tried have the following usb ids: 093a:2464 and 046d:092f. According to: http://linuxtv.org/wiki/index.php/Gspca_devices the subdrivers should be gspca_pac207 and gspca_spca561 respectively. I would appreciate if you could help me get the first one working at least. Thanks.

      • Ok, I will try to compile modules if are in the list on gspca.

      • I found only gspca_spca561, see screenshots
        Edit:
        Pixart Pac207 is available too in second screenshot :)

      • I found only gspca_spca561, see screenshots
        Edit:
        Pixart Pac207 is available too in second screenshot :)

      • deyanimay

        I followed the instructions you sent me but when I visit the streaming page it still says "This webpage is not available" and I'm getting the followinf message in my router log:

        Feb 4 15:51:26 MJPG-streamer [9120]: init_VideoIn failed

      • Post here outputs:
        uname -a
        nvram get buildno
        nvram get model
        dmesg
        lsmod

      • deyanimay

        uname -a: Linux RT-AC68U-2490 2.6.36.4brcmarm #1 SMP PREEMPT Sat Jan 31 18:25:52 EST 2015 armv7l GNU/Linux
        nvram get buildno: 378.50
        nvram get model: RT-AC68U
        dmesg:
        Linux version 2.6.36.4brcmarm (merlin@mint-dev) (gcc version 4.5.3 (Buildroot 2012.02) ) #1 SMP PREEMPT Sat Jan 31 18:25:52 EST 2015

        CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7f
        CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
        Machine: Northstar Prototype
        Ignoring unrecognised tag 0x00000000
        bootconsole [earlycon0] enabled
        Memory policy: ECC disabled, Data cache writealloc
        MPCORE found at 19020000
        On node 0 totalpages: 65536
        DMA zone: 256 pages used for memmap
        DMA zone: 0 pages reserved
        DMA zone: 32512 pages, LIFO batch:7
        Normal zone: 4864 pages used for memmap
        Normal zone: 27904 pages, LIFO batch:7
        PERCPU: Embedded 7 pages/cpu @c8215000 s5472 r8192 d15008 u65536
        pcpu-alloc: s5472 r8192 d15008 u65536 alloc=16*4096
        pcpu-alloc: [0] 0 [0] 1
        Built 1 zonelists in Zone order, mobility grouping on. Total pages: 60416
        Kernel command line: root=/dev/mtdblock2 console=ttyS0,115200 init=/sbin/preinit earlyprintk debug
        PID hash table entries: 1024 (order: 0, 4096 bytes)
        Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
        Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
        Memory: 128MB 128MB = 256MB total
        Memory: 255532k/255532k available, 6612k reserved, 0K highmem
        Virtual kernel memory layout:
        vector : 0xffff0000 - 0xffff1000 ( 4 kB)
        fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
        DMA : 0xf7e00000 - 0xffe00000 ( 128 MB)
        vmalloc : 0xd0800000 - 0xf0000000 ( 504 MB)
        lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
        modules : 0xbf000000 - 0xc0000000 ( 16 MB)
        .init : 0xc0008000 - 0xc003d000 ( 212 kB)
        .text : 0xc003d000 - 0xc03a3000 (3480 kB)
        .data : 0xc03ba000 - 0xc03dd000 ( 140 kB)
        SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
        Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
        NR_IRQS:256
        MPCORE GIC init
        External imprecise Data abort at addr=0x0, fsr=0x1c06 ignored.
        MPCORE Global Timer Clock 400000000Hz
        Calibrating delay loop... 1599.07 BogoMIPS (lpj=7995392)
        pid_max: default: 32768 minimum: 301
        Mount-cache hash table entries: 512
        CPU: Testing write buffer coherency: ok
        MPCORE Private timer setup CPU0
        Calibrating local timer... 399.859MHz.
        L310: cache controller enabled 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x7a130000
        CPU1: Booted secondary processor
        MPCORE Private timer setup CPU1
        Brought up 2 CPUs
        SMP: Total of 2 processors activated (3194.88 BogoMIPS).
        devtmpfs: initialized
        atomic64 test passed
        NET: Registered protocol family 16
        Found a AMD NAND flash:
        Total size: 128MB
        Block size: 128KB
        Page Size: 2048B
        OOB Size: 64B
        Sector size: 512B
        Spare size: 16B
        ECC level: 8 (8-bit)
        Device ID: 0x 1 0xf1 0x 0 0x1d 0x 1 0xf1
        CCA UART Clock Config: Sel=1 Ovr=1 Div=48
        CCA UART Clock rate 100000000Hz
        bio: create slab at 0
        Switching to clocksource mpcore_gtimer
        NET: Registered protocol family 2
        IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
        TCP established hash table entries: 8192 (order: 4, 65536 bytes)
        TCP bind hash table entries: 8192 (order: 4, 98304 bytes)
        TCP: Hash tables configured (established 8192 bind 8192)
        TCP reno registered
        UDP hash table entries: 128 (order: 0, 4096 bytes)
        UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
        NET: Registered protocol family 1
        PCI: CLS 0 bytes, default 32
        PCI: no core
        PCI: no core
        PCI: scanning bus 0
        pci 0000:00:00.0: reg 10: [mem 0x18000000-0x18000fff]
        pci 0000:00:00.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:01.0: reg 10: [mem 0x18001000-0x18001fff]
        pci 0000:00:01.0: reg 14: [mem 0x18002000-0x18002fff]
        pci 0000:00:01.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:02.0: reg 10: [mem 0x1802c000-0x1802cfff]
        pci 0000:00:02.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:03.0: reg 10: [mem 0x18024000-0x18024fff]
        pci 0000:00:03.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:04.0: reg 10: [mem 0x18025000-0x18025fff]
        pci 0000:00:04.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:05.0: reg 10: [mem 0x18026000-0x18026fff]
        pci 0000:00:05.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:06.0: reg 10: [mem 0x18027000-0x18027fff]
        pci 0000:00:06.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:07.0: reg 10: [mem 0x18012000-0x18012fff]
        pci 0000:00:07.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:08.0: reg 10: [mem 0x18013000-0x18013fff]
        pci 0000:00:08.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:09.0: reg 10: [mem 0x18014000-0x18014fff]
        pci 0000:00:09.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0a.0: reg 10: [mem 0x1800b000-0x1800bfff]
        pci 0000:00:0a.0: reg 14: [mem 0x1800c000-0x1800cfff]
        pci 0000:00:0a.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0b.0: reg 10: [mem 0x18022000-0x18022fff]
        pci 0000:00:0b.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0b.1: reg 10: [mem 0x18021000-0x18021fff]
        pci 0000:00:0b.1: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0c.0: reg 10: [mem 0x18023000-0x18023fff]
        pci 0000:00:0c.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0d.0: reg 10: [mem 0x18020000-0x18020fff]
        pci 0000:00:0d.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0e.0: reg 10: [mem 0x18210000-0x1821ffff]
        pci 0000:00:0e.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:0f.0: reg 10: [mem 0x18010000-0x18010fff]
        pci 0000:00:0f.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:10.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:11.0: reg 10: [mem 0x18028000-0x18028fff]
        pci 0000:00:11.0: reg 30: [mem 0x00000000-0x000007ff pref]
        pci 0000:00:12.0: reg 10: [mem 0x18029000-0x18029fff]
        pci 0000:00:12.0: reg 30: [mem 0x00000000-0x000007ff pref]
        PCI: Fixing up bus 0
        PCIE1 link=1
        PCIE1 switching to GEN2
        PCIE1 link=1
        pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
        pci 0001:00:00.0: PME# disabled
        PCI: Fixing up bus 0
        PCI: bus0: Fast back to back transfers disabled
        pci 0001:01:00.0: reg 10: [mem 0x08000000-0x08007fff 64bit]
        pci 0001:01:00.0: supports D1 D2
        PCI: Fixing up bus 1
        PCI: bus1: Fast back to back transfers disabled
        pci 0001:00:00.0: BAR 8: assigned [mem 0x08000000-0x080fffff]
        pci 0001:01:00.0: BAR 0: assigned [mem 0x08000000-0x08007fff 64bit]
        pci 0001:01:00.0: BAR 0: set to [mem 0x08000000-0x08007fff 64bit] (PCI address [0x8000000-0x8007fff]
        pci 0001:00:00.0: PCI bridge to [bus 01-01]
        pci 0001:00:00.0: bridge window [io disabled]
        pci 0001:00:00.0: bridge window [mem 0x08000000-0x080fffff]
        pci 0001:00:00.0: bridge window [mem pref disabled]
        PCIE2 link=1
        PCIE2 switching to GEN2
        PCIE2 link=1
        pci 0002:00:00.0: PME# supported from D0 D3hot D3cold
        pci 0002:00:00.0: PME# disabled
        PCI: Fixing up bus 0
        PCI: bus0: Fast back to back transfers disabled
        pci 0002:02:00.0: reg 10: [mem 0x40000000-0x40007fff 64bit]
        pci 0002:02:00.0: supports D1 D2
        PCI: Fixing up bus 2
        PCI: bus2: Fast back to back transfers disabled
        pci 0002:00:00.0: BAR 8: assigned [mem 0x40000000-0x400fffff]
        pci 0002:02:00.0: BAR 0: assigned [mem 0x40000000-0x40007fff 64bit]
        pci 0002:02:00.0: BAR 0: set to [mem 0x40000000-0x40007fff 64bit] (PCI address [0x40000000-0x40007fff]
        pci 0002:00:00.0: PCI bridge to [bus 02-02]
        pci 0002:00:00.0: bridge window [io disabled]
        pci 0002:00:00.0: bridge window [mem 0x40000000-0x400fffff]
        pci 0002:00:00.0: bridge window [mem pref disabled]
        PCIE3 link=0
        VFS: Disk quotas dquot_6.5.2
        Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
        squashfs: version 4.0 (2009/01/31) Phillip Lougher
        fuse init (API version 7.15)
        msgmni has been set to 499
        io scheduler noop registered (default)
        io scheduler deadline registered
        io scheduler cfq registered
        Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
        serial8250.0: ttyS0 at MMIO 0x18000300 (irq = 117) is a 16550
        console [ttyS0] enabled, bootconsole disabled
        serial8250.0: ttyS1 at MMIO 0x18000400 (irq = 117) is a 16550
        brd: module loaded
        loop: module loaded
        pflash: found no supported devices
        bcmsflash: found no supported devices
        Boot partition size = 524288(0x80000)
        lookup_nflash_rootfs_offset: offset = 0x200000
        nflash: squash filesystem with lzma found at block 28
        Creating 4 MTD partitions on "nflash":
        0x000000000000-0x000000080000 : "boot"
        0x000000080000-0x000000200000 : "nvram"
        0x000000200000-0x000004000000 : "linux"
        0x00000039a2dc-0x000004000000 : "rootfs"
        PPP generic driver version 2.4.2
        PPP MPPE Compression module registered
        NET: Registered protocol family 24
        PPTP driver version 0.8.5
        === PPTP init ===
        u32 classifier
        Actions configured
        Netfilter messages via NETLINK v0.30.
        nf_conntrack version 0.5.0 (3992 buckets, 15968 max)
        xt_time: kernel timezone is -0000
        ip_tables: (C) 2000-2006 Netfilter Core Team
        TCP cubic registered
        NET: Registered protocol family 10
        ip6_tables: (C) 2000-2006 Netfilter Core Team
        NET: Registered protocol family 17
        L2TP core driver, V2.0
        PPPoL2TP kernel driver, V2.0
        802.1Q VLAN Support v1.8 Ben Greear
        All bugs added by David S. Miller
        Registering the dns_resolver key type
        Northstar brcmnand NAND Flash Controller driver, Version 0.1 (c) Broadcom Inc. 2012
        NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (AMD NAND 128MiB 3,3V 8-bit)
        Spare area=64 eccbytes 56, ecc bytes located at:
        2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 19 20 21 22 23 24 25 26 27 28 29 30 31 34 35 36 37 38 39 40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57 58 59 60 61 62 63
        Available 7 bytes at (off,len):
        (1,1) (16,2) (32,2) (48,2) (0,0) (0,0) (0,0) (0,0)
        Scanning device for bad blocks
        Options: NO_AUTOINCR,NO_READRDY,BBT_SCAN2NDPAGE,
        Creating 2 MTD partitions on "brcmnand":
        0x000004000000-0x000007ec0000 : "brcmnand"
        0x000007ec0000-0x000008000000 : "asus"
        VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
        devtmpfs: mounted
        Freeing init memory: 212K
        cfe_commit: do nothing
        ctf: module license 'Proprietary' taints kernel.
        Disabling lock debugging due to kernel taint
        et_module_init: passivemode set to 0x0
        et_module_init: txworkq set to 0x1
        et_module_init: et_txq_thresh set to 0x400
        eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.37.14.86 (r456083)
        wl_module_init: passivemode set to 0x0
        wl_module_init: txworkq set to 0x1
        eth1: Broadcom BCM4360 802.11 Wireless Controller 6.37.14.86 (r456083)
        eth2: Broadcom BCM4360 802.11 Wireless Controller 6.37.14.86 (r456083)
        JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
        usbcore: registered new interface driver usbfs
        usbcore: registered new interface driver hub
        usbcore: registered new device driver usb
        SCSI subsystem initialized
        csw_retry 100
        Initializing USB Mass Storage driver...
        usbcore: registered new interface driver usb-storage
        USB Mass Storage support registered.
        Tuxera FAT 12/16/32 driver version 3014.7.30 [Flags: R/W MODULE].
        Tuxera NTFS driver 3014.7.29 [Flags: R/W MODULE].
        Tuxera HFS+ driver 3014.7.28
        xhci_hcd 0000:00:0c.0: xHCI Host Controller
        xhci_hcd 0000:00:0c.0: new USB bus registered, assigned bus number 1
        xhci_hcd 0000:00:0c.0: irq 112, io mem 0x18023000
        xhci_hcd 0000:00:0c.0: Failed to enable MSI-X
        xhci_hcd 0000:00:0c.0: failed to allocate MSI entry
        usb usb1: No SuperSpeed endpoint companion for config 1 interface 0 altsetting 0 ep 129: using minimum values
        xHCI xhci_add_endpoint called for root hub
        xHCI xhci_check_bandwidth called for root hub
        hub 1-0:1.0: USB hub found
        hub 1-0:1.0: 1 port detected
        [xhci-hub] usb2mode:[0]
        ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
        ehci_hcd 0000:00:0b.1: EHCI Host Controller
        ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 2
        ehci_hcd 0000:00:0b.1: irq 111, io mem 0x18021000
        ehci_hcd 0000:00:0b.1: USB 0.0 started, EHCI 1.00
        hub 2-0:1.0: USB hub found
        hub 2-0:1.0: 2 ports detected
        ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
        ohci_hcd 0000:00:0b.0: OHCI Host Controller
        ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 3
        ohci_hcd 0000:00:0b.0: irq 111, io mem 0x18022000
        hub 3-0:1.0: USB hub found
        hub 3-0:1.0: 2 ports detected
        usbcore: registered new interface driver usblp
        usbcore: registered new interface driver asix
        usbcore: registered new interface driver cdc_ether
        usbcore: registered new interface driver rndis_host
        cdc_ncm: 14-Mar-2012
        usbcore: registered new interface driver cdc_ncm
        usbcore: registered new interface driver cdc_wdm
        usb 2-1: new high speed USB device using ehci_hcd and address 2
        usbcore: registered new interface driver qmi_wwan
        cdc_mbim: loaded
        usbcore: registered new interface driver cdc_mbim
        scsi0 : usb-storage 2-1:1.0
        usb 3-2: new full speed USB device using ohci_hcd and address 2
        scsi 0:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 4
        sd 0:0:0:0: Attached scsi generic sg0 type 0
        sd 0:0:0:0: [sda] 3891200 512-byte logical blocks: (1.99 GB/1.85 GiB)
        sd 0:0:0:0: [sda] Write Protect is off
        sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
        sd 0:0:0:0: [sda] Assuming drive cache: write through
        sd 0:0:0:0: [sda] Assuming drive cache: write through
        sda: sda1
        sd 0:0:0:0: [sda] Assuming drive cache: write through
        sd 0:0:0:0: [sda] Attached SCSI removable disk
        EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: user_xattr
        device vlan1 entered promiscuous mode
        device eth0 entered promiscuous mode
        device eth1 entered promiscuous mode
        device eth2 entered promiscuous mode
        br0: topology change detected, propagating
        br0: port 3(eth2) entering forwarding state
        br0: port 3(eth2) entering forwarding state
        br0: topology change detected, propagating
        br0: port 2(eth1) entering forwarding state
        br0: port 2(eth1) entering forwarding state
        br0: topology change detected, propagating
        br0: port 1(vlan1) entering forwarding state
        br0: port 1(vlan1) entering forwarding state
        usbcore: registered new interface driver usbserial
        USB Serial support registered for generic
        usbcore: registered new interface driver usbserial_generic
        usbserial: USB Serial Driver core
        USB Serial support registered for GSM modem (1-port)
        option 3-2:1.0: GSM modem (1-port) converter detected
        usb 3-2: GSM modem (1-port) converter now attached to ttyUSB0
        usbcore: registered new interface driver option
        option: v0.7.2:USB Driver for GSM modems

        gro enabled with interval 2
        Attempt to kill tasklet from interrupt
        device eth0 left promiscuous mode
        br0: port 1(vlan1) entering forwarding state
        device eth0 entered promiscuous mode
        br0: topology change detected, propagating
        br0: port 1(vlan1) entering forwarding state
        br0: port 1(vlan1) entering forwarding state
        nf_conntrack_rtsp v0.6.21 loading
        nf_nat_rtsp v0.6.21 loading
        br0: received packet on eth1 with own address as source address
        Adding 523920k swap on /opt/swap. Priority:-1 extents:91 across:845816k
        Linux video capture interface: v2.00
        usbcore: registered new interface driver uvcvideo
        USB Video Class driver (v0.1.0)
        gspca: main v2.10.0 registered
        usbcore: registered new interface driver pac207
        pac207: registered
        usbcore: registered new interface driver spca561
        spca561: registered

        gro disabled

        gro enabled with interval 2

        gro disabled

        gro enabled with interval 2

        lsmod:
        Module Size Used by Tainted: P
        gspca_spca561 7770 0
        gspca_pac207 5330 0
        gspca_main 21154 2 gspca_spca561,gspca_pac207
        uvcvideo 56654 0
        v4l2_common 3741 0
        v4l2_int_device 2055 0
        videodev 58285 3 gspca_main,uvcvideo,v4l2_common
        input_core 21561 2 gspca_main,uvcvideo
        nf_nat_sip 5586 0
        nf_conntrack_sip 16679 1 nf_nat_sip
        nf_nat_h323 5137 0
        nf_conntrack_h323 34844 1 nf_nat_h323
        nf_nat_rtsp 3400 0
        nf_conntrack_rtsp 4268 1 nf_nat_rtsp
        nf_nat_ftp 1314 0
        nf_conntrack_ftp 5131 1 nf_nat_ftp
        ip6table_mangle 1093 0
        option 15412 0
        usb_wwan 6296 1 option
        usbserial 25385 2 option,usb_wwan
        ip6t_LOG 4705 0
        ip6table_filter 893 1
        sr_mod 11507 0
        cdrom 33318 1 sr_mod
        cdc_mbim 3313 0
        qmi_wwan 5948 0
        cdc_wdm 7856 2 cdc_mbim,qmi_wwan
        cdc_ncm 9210 1 cdc_mbim
        rndis_host 5209 0
        cdc_ether 3456 1 rndis_host
        asix 11741 0
        usbnet 11691 6 cdc_mbim,qmi_wwan,cdc_ncm,rndis_host,cdc_ether,asix
        mii 3484 2 asix,usbnet
        usblp 11162 0
        ohci_hcd 19288 0
        ehci_hcd 34220 0
        xhci_hcd 54334 0
        thfsplus 82205 0
        tntfs 446031 0
        tfat 179421 0
        ext2 55581 0
        ext4 234233 1
        jbd2 52386 1 ext4
        crc16 1081 1 ext4
        ext3 113117 0
        jbd 45524 1 ext3
        mbcache 5156 3 ext2,ext4,ext3
        usb_storage 35499 1
        sg 21138 0
        sd_mod 23159 2
        scsi_wait_scan 502 0
        scsi_mod 114857 4 sr_mod,usb_storage,sg,sd_mod
        usbcore 108358 21 gspca_spca561,gspca_pac207,gspca_main,uvcvideo,option,usb_wwan,usbserial,cdc_mbim,qmi_wwan,cdc_wdm,cdc_ncm,rndis_host,cdc_ether,asix,usbnet,usblp,ohci_hcd,ehci_hcd,xhci_hcd,usb_storage
        jffs2 94871 1
        zlib_deflate 19990 1 jffs2
        nf_nat_pptp 1796 0
        nf_conntrack_pptp 3739 1 nf_nat_pptp
        nf_nat_proto_gre 1047 1 nf_nat_pptp
        nf_conntrack_proto_gre 3599 1 nf_conntrack_pptp
        wl 4008462 0
        igs 12935 1 wl
        emf 16346 2 wl,igs
        et 64092 0
        ctf 18051 0

      • All modules are loaded :)
        Post output:
        ls -l /dev

      • deyanimay

        The out put is as follows, I do not see video0 or video1 which I'm assuming you are looking for.

        crw-r--r-- 1 deyanima root 189, 129 Nov 30 19:00 2-1

        crw-r--r-- 1 deyanima root 189, 257 Nov 30 19:00 3-2

        drwxr-xr-x 3 deyanima root 60 Nov 30 19:00 bus

        crw------- 1 deyanima root 5, 1 Feb 4 14:56 console

        crw------- 1 deyanima root 10, 63 Dec 31 1969 cpu_dma_latency

        brw-rw---- 1 deyanima root 90, 0 Dec 31 1969 device

        crw-rw-rw- 1 deyanima root 1, 7 Dec 31 1969 full

        crw------- 1 deyanima root 10, 229 Dec 31 1969 fuse

        crw-rw---- 1 deyanima root 254, 0 Dec 31 1969 gpio

        crw------- 1 deyanima root 1, 11 Dec 31 1969 kmsg

        srw-rw-rw- 1 deyanima root 0 Feb 4 12:27 log

        brw------- 1 deyanima root 7, 0 Dec 31 1969 loop0

        brw------- 1 deyanima root 7, 1 Dec 31 1969 loop1

        brw------- 1 deyanima root 7, 2 Dec 31 1969 loop2

        brw------- 1 deyanima root 7, 3 Dec 31 1969 loop3

        brw------- 1 deyanima root 7, 4 Dec 31 1969 loop4

        brw------- 1 deyanima root 7, 5 Dec 31 1969 loop5

        brw------- 1 deyanima root 7, 6 Dec 31 1969 loop6

        brw------- 1 deyanima root 7, 7 Dec 31 1969 loop7

        crw------- 1 deyanima root 1, 1 Dec 31 1969 mem

        crw------- 1 deyanima root 90, 0 Dec 31 1969 mtd0

        crw------- 1 deyanima root 90, 1 Dec 31 1969 mtd0ro

        crw------- 1 deyanima root 90, 2 Dec 31 1969 mtd1

        crw------- 1 deyanima root 90, 3 Dec 31 1969 mtd1ro

        crw------- 1 deyanima root 90, 4 Dec 31 1969 mtd2

        crw------- 1 deyanima root 90, 5 Dec 31 1969 mtd2ro

        crw------- 1 deyanima root 90, 6 Dec 31 1969 mtd3

        crw------- 1 deyanima root 90, 7 Dec 31 1969 mtd3ro

        crw------- 1 deyanima root 90, 8 Dec 31 1969 mtd4

        crw------- 1 deyanima root 90, 9 Dec 31 1969 mtd4ro

        crw------- 1 deyanima root 90, 10 Dec 31 1969 mtd5

        crw------- 1 deyanima root 90, 11 Dec 31 1969 mtd5ro

        brw------- 1 deyanima root 31, 0 Dec 31 1969 mtdblock0

        brw------- 1 deyanima root 31, 1 Dec 31 1969 mtdblock1

        brw------- 1 deyanima root 31, 2 Dec 31 1969 mtdblock2

        brw------- 1 deyanima root 31, 3 Dec 31 1969 mtdblock3

        brw------- 1 deyanima root 31, 4 Dec 31 1969 mtdblock4

        brw------- 1 deyanima root 31, 5 Dec 31 1969 mtdblock5

        crw------- 1 deyanima root 10, 62 Dec 31 1969 network_latency

        crw------- 1 deyanima root 10, 61 Dec 31 1969 network_throughput

        crw-rw-rw- 1 deyanima root 1, 3 Dec 31 1969 null

        crw-rw-rw- 1 deyanima root 253, 0 Dec 31 1969 nvram

        crw------- 1 deyanima root 1, 4 Dec 31 1969 port

        crw------- 1 deyanima root 108, 0 Dec 31 1969 ppp

        lrwxrwxrwx 1 deyanima root 8 Nov 30 19:00 printers -> /dev/usb

        crw-rw-rw- 1 deyanima root 5, 2 Feb 4 14:57 ptmx

        drwxr-xr-x 2 deyanima root 0 Dec 31 1969 pts

        brw------- 1 deyanima root 1, 0 Dec 31 1969 ram0

        brw------- 1 deyanima root 1, 1 Dec 31 1969 ram1

        brw------- 1 deyanima root 1, 10 Dec 31 1969 ram10

        brw------- 1 deyanima root 1, 11 Dec 31 1969 ram11

        brw------- 1 deyanima root 1, 12 Dec 31 1969 ram12

        brw------- 1 deyanima root 1, 13 Dec 31 1969 ram13

        brw------- 1 deyanima root 1, 14 Dec 31 1969 ram14

        brw------- 1 deyanima root 1, 15 Dec 31 1969 ram15

        brw------- 1 deyanima root 1, 2 Dec 31 1969 ram2

        brw------- 1 deyanima root 1, 3 Dec 31 1969 ram3

        brw------- 1 deyanima root 1, 4 Dec 31 1969 ram4

        brw------- 1 deyanima root 1, 5 Dec 31 1969 ram5

        brw------- 1 deyanima root 1, 6 Dec 31 1969 ram6

        brw------- 1 deyanima root 1, 7 Dec 31 1969 ram7

        brw------- 1 deyanima root 1, 8 Dec 31 1969 ram8

        brw------- 1 deyanima root 1, 9 Dec 31 1969 ram9

        crw-rw-rw- 1 deyanima root 1, 8 Dec 31 1969 random

        lrwxrwxrwx 1 deyanima root 9 Dec 31 1969 root -> mtdblock3

        brw-r--r-- 1 deyanima root 8, 0 Nov 30 19:00 sda

        brw-r--r-- 1 deyanima root 8, 1 Nov 30 19:00 sda1

        crw-r--r-- 1 deyanima root 21, 0 Nov 30 19:00 sg0

        drwxr-xr-x 2 deyanima root 40 Dec 31 1969 shm

        crw-rw-rw- 1 deyanima root 5, 0 Dec 31 1969 tty

        crw------- 1 deyanima root 4, 64 Dec 31 1969 ttyS0

        crw------- 1 deyanima root 4, 65 Dec 31 1969 ttyS1

        crw-r--r-- 1 deyanima root 188, 0 Nov 30 19:00 ttyUSB0

        crw-rw-rw- 1 deyanima root 1, 9 Dec 31 1969 urandom

        crw-r--r-- 1 deyanima root 189, 0 Nov 30 19:00 usb1

        crw-r--r-- 1 deyanima root 189, 128 Nov 30 19:00 usb2

        crw-r--r-- 1 deyanima root 189, 256 Nov 30 19:00 usb3

        crw-r--r-- 1 deyanima root 189, 0 Nov 30 19:00 usbdev1.1

        crw-r--r-- 1 deyanima root 189, 128 Nov 30 19:00 usbdev2.1

        crw-r--r-- 1 deyanima root 189, 129 Nov 30 19:00 usbdev2.2

        crw-r--r-- 1 deyanima root 189, 256 Nov 30 19:00 usbdev3.1

        crw-r--r-- 1 deyanima root 189, 257 Nov 30 19:00 usbdev3.2

        crw-rw-rw- 1 deyanima root 1, 5 Dec 31 1969 zero

      • I hope you are not using an usb hub.
        Did you reboot the router?

      • deyanimay

        I'm not using a hub, the webcam is plugged into the usb2.0 port directly and rebooting did not make a difference. When I go to http://192.168.1.1:3000/stream_simple.html shouldn't I at least see a blank page even if the camera is not working?

      • deyanimay

        So I unplugged and replugged in the camera and when I enter the command ls -ltr /dev/video* I get: crw-r--r-- 1 root root 81, 0 Feb 5 00:23 /dev/video0
        So now it shows up, but running doff and then don results in the same log message and the webpage still does't work. Here is the full router log:
        Feb 5 00:27:16 MJPG-streamer [2030]: starting application
        Feb 5 00:27:16 MJPG-streamer [2030]: enabling daemon mode
        Feb 5 00:27:16 MJPG-streamer [2032]: MJPG Streamer Version: svn rev: 3:182M
        Feb 5 00:27:16 MJPG-streamer [2032]: Using V4L2 device.: /dev/video0
        Feb 5 00:27:16 MJPG-streamer [2032]: Desired Resolution: 640 x 480
        Feb 5 00:27:16 MJPG-streamer [2032]: Frames Per Second.: not limited
        Feb 5 00:27:16 MJPG-streamer [2032]: Format............: JPEG
        Feb 5 00:27:16 MJPG-streamer [2032]: TV-Norm...........: DEFAULT
        Feb 5 00:27:16 MJPG-streamer [2032]: init_VideoIn failed
        Feb 5 00:27:18 MJPG-streamer [2037]: starting application
        Feb 5 00:27:18 MJPG-streamer [2037]: enabling daemon mode
        Feb 5 00:27:18 MJPG-streamer [2039]: MJPG Streamer Version: svn rev: 3:182M
        Feb 5 00:27:18 MJPG-streamer [2039]: Using V4L2 device.: /dev/video0
        Feb 5 00:27:18 MJPG-streamer [2039]: Desired Resolution: 640 x 480
        Feb 5 00:27:18 MJPG-streamer [2039]: Frames Per Second.: not limited
        Feb 5 00:27:18 MJPG-streamer [2039]: Format............: JPEG
        Feb 5 00:27:18 MJPG-streamer [2039]: TV-Norm...........: DEFAULT
        Feb 5 00:27:18 MJPG-streamer [2039]: init_VideoIn failed

      • deyanimay

        I just tried the other camera (gspca_spca561) and it gives me the same problem unless I limit the resolution to 320x240 in which case it seem to work and the webpage is present and asks for login credentials however no image is shown.

      • deyanimay

        If i preload "v412convert.so" I can succesfully take a picture using the command "LD_PRELOAD=/usr/lib/arm-linux-gnueabi/libv4l/v4l2convert.so fswebcam -r 352x288 -v ./test.jpg" and if I preload the same thing and use the command "LD_PRELOAD=/usr/lib/arm-linux-gnueabi/libv4l/v4l2convert.so /etc/init.d/S99mjpg-streamer-debian start" I can get everything to start fine and show up as working in the log, but I still can't get the page to load.

        I got the converter by installing the camorama package and I had to manual set the resolution to 352x288 in the S99mjpg-streamer-debian file. So conversion seems to work for still images but not streamed video. I may need to settle for just using motion.

        Info taken from: http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=15722

      • Your cameras are very old, anyway you are on the right way :)

      • 1 - Plug in your camera, both supported :)
        1b - Install debian and flash 378.50_beta2 firmware (won't work with 376.49_5)

        2 - Input in terminal
        rm /opt/etc/videomod.sh
        rm -r /opt/lib/modules
        wget -c -O /opt/etc/videomod.sh http://goo.gl/Qlo02W
        chmod a+rx /opt/etc/videomod.sh
        wget -c -O /opt/tmp/uvc_modules_2.6.36brcmarm-376.50b2-gspca-arm.tgz http://goo.gl/wbO7QN
        cd /
        tar -zxvf /opt/tmp/uvc_modules_2.6.36brcmarm-376.50b2-gspca-arm.tgz
        /opt/etc/videomod.sh load

        3 - Continue from point 3 https://www.hqt.ro/webcam-video-surveillance-via-mjpg-streamer-debian-arm

      • deyanimay

        Also is it possible to install gspca webcam drivers to support other webcams?

  • Welcome, just let me know which webcam do you use.

  • podgy

    TNX VERY MUCH

SoftEther VPN Running on AsusWRT Routers
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Nginx Web Server with PHP Support through Optware-NG
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Spreed WebRTC server and web client
Asterisk VoIP Server running on AsusWRT Routers
SoftEther VPN Running on AsusWRT Routers
NZBGet through Entware
Minidlna UPnP Media Server through Debian Jessie Arm
NetData System Monitor Entware

SUBSCRIBE

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...