naiboo´s blog

my blog about it and sports

Category Archives: Wansview NC541W

Online Demos of Wansview Webcams


Wansview released an online demo page of its current products!

Check out this list of webcams and enter the webinterface with the corresponding user name and password.

Model Product pictures Demo User name Password

Wansview

IP Camera

NCB-540W

 

DEMO 1

user

user

Wansview

IP Camera

NCB-541W

 

DEMO 1

admin

123456

Wansview

IP Camera

NCB-543W

 

DEMO 1

user

user

Wansview

IP Camera

NCB-545W

 

DEMO 1

user

user

Wansview

IP Camera

NCB-546W

 

DEMO 1

user

user

Wansview

IP Camera

NCH-530W

 

DEMO 1

admin

123456

Wansview

IP Camera

NCH-531MW

 

DEMO 1

admin

123456

Wansview

IP Camera

NCH-532W

 

DEMO 1

user

user

Wansview

IP Camera

NCH-536MW

 

DEMO 1

admin

123456

Wansview

IP Camera

NCB-532MW

 

DEMO 1

user

user

 

Link to wansview.com

Setup of email notification on NC541W


In this post i´ll show some information on email notification from Wansview NC541W webcam. Email can be triggered by the camera sensor when an image was taken or by the alarm server.

GMX

Login the webcams webinterface -> alarm -> e-mail settings:

i´m sending from my email account to myself an email. Important is the smtp server which is the server of gmx for sending emails, port is by default 25 for smtp protocol. Authentication is done with my username and password.

You can test your settings by pressing test button.Email setup web interface nc541w GMX

GMAIL and HOTMAIL/LIVE

Gmail is somehow special. Gmail uses SLL/TLS3 encryption for smtp access. I´ve tried port 587 and 465 for smtp authentication but i get the error that the webcam doesn´t support this kind of encryption! Maybe a firmware update will solve this issue sometime!

The same happens when using hotmail/live from microsoft. They force to authenticate with starttls!

webcam interface email notification GMAIL

Setup of Wansview NC541W – tutorial – portforwarding – PART2!!


In the last months i´ve received lots entries by blog readers which reported troubles with port forwarding.

In the following blog i will describe and show my setup and how portforwarding is done.

My setup:

Router WRT54GL with Tomato 1.25 firmware

Wansview NC541W with firmware  21.22.2.19

First of all, make sure your webcam is connected wired or wireless with your router.

Router webinterface

I´ve logged into the router with web interface where you can find very useful information which we will need later on.

In section WAN you can find the external IP adress (i´ve anonymized my ip adress), which you will need later on. If you don´t see it in your router firmware, just go to http://whatismyipaddress.com/ and find out yourself.

In section LAN you can see your internal network range, in my case 192.168.0.100  to 149 which DHCP gives your connected devices.

In section wireless you see your WLAN settings. I´m using WPA2 encrytion with TKIP.

Router Startpage

Router webinterface – DHCP setup

If you use DHCP (router gives your devices automatically IP adresses) then you should make sure you either use static DHCP or give the device a manual IP adress. If we do portforwarding, having a fixed IP adress is very important! Next i´ll explain the two ways to achieve a fixed IP adress on the webcam.

static DHCP is done in the router interface, which binds an IP adress to a MAC adress. In the router´s device list you can see that i´ve connected the webcam with wireless lan. The webcam uses the internal adress 192.168.1.111.

Router Devicelist

Now we have to tell the router that 192.168.1.111 should always be give to the webcams MAC adress. (click on static or similar on your router)Router Static DHCP

Webcam webinterface – fixed IP setup

The second way to achieve a fixed IP adress is in the webcam interface itself. Just give in network the ip adress you want. By default the webcams port is 80, you can keep it.

Try to access your webcam in the browser, in this case http://192.168.1.111:80. You can also drop :80 because http uses port 80 by default! By now you only can access the webcam inside your lan!

Webcam Webinterface fixed ip

Router webinterface – setup port forwarding

To access the webcam from the internet you need to setup portforwarding in the router. As you can see i forward the port 80 (int port) from 192.168.1.111 (int address) to external port 8080 (ext ports). The transport protcol is UDP and TCP (both).

router webinterface - portforwarding

After using the save button you can try with a test tool like http://www.yougetsignal.com/tools/open-ports/ if you´ve done everything correctly. In the following screenshot that i´ve done the portforwarding correctly, a connection to port 8080 is possible!

portforwarding check

Try the connection

Try to access your webcam from internet, maybe not from your own internet connection ;), from work or a friends house! http://external-ip:8080 and login with our user and password.

webcam internet access

Congratulations, you did it!

Wansview NC541W – cgi calls over web interface


I´ve found a nice ressource where all available .cgi calls are lined up. Maybe this can be pretty useful for some of you which want to get out more of the camera than the stock interface!

cgi in camera file cgi used in webui
backup_params.cgi
camera_control.cgi camera_control.cgi
check_user2.cgi
check_user.cgi check_user.cgi
comm_write.cgi
decoder_control.cgi decoder_control.cgi
erase_allparams.cgi
get_camera_params.cgi get_camera_params.cgi
get_factory_ddns.cgi
get_forbidden.cgi
get_log.cgi get_log.cgi
get_misc.cgi get_misc.cgi
get_p2p.cgi
get_params.cgi get_params.cgi
get_realip.cgi get_realip.cgi
get_smarteye.cgi get_smarteye.cgi
get_status.cgi get_status.cgi
get_wifi_scan_result.cgi get_wifi_scan_result.cgi
reboot.cgi reboot.cgi
restore_factory.cgi restore_factory.cgi
restore_factory_ddns.cgi
restore_params.cgi
set_alarm.cgi
set_alias.cgi
set_datetime.cgi set_datetime.cgi
set_ddns.cgi set_ddns.cgi
set_decoder.cgi set_decoder.cgi
set_devices.cgi set_devices.cgi
set_factory_ddns.cgi
set_forbidden.cgi
set_ftp.cgi set_ftp.cgi
set_mac.cgi
set_mail.cgi set_mail.cgi
set_misc.cgi set_misc.cgi
set_msn.cgi
set_network.cgi set_network.cgi
set_p2p.cgi
set_pppoe.cgi set_pppoe.cgi
set_smarteye.cgi set_smarteye.cgi
set_smarteye_factory_params.cgi set_smarteye_factory_params.cgi
set_upnp.cgi set_upnp.cgi
set_users.cgi set_users.cgi
set_wifi.cgi set_wifi.cgi
snapshot.cgi snapshot.cgi
test_ftp.cgi test_ftp.cgi
test_mail.cgi test_mail.cgi
upgrade_firmware.cgi upgrade_firmware.cgi
upgrade_htmls.cgi upgrade_htmls.cgi
video.cgi
videostream.cgi videostream.cgi
wifi_scan.cgi wifi_scan.cgi

Link to cgi calls

Wansview NC541W – Disassembling


I´ve found a pretty nice picture gallery which shows disassembling a Wansview NC541W webcam.  The high quality pictures give a lot of information about the electronic parts inside the webcam, the optics and LED.

Wansview NC541W Disassembly

 

Wansview NC541W – cron job rename script – free cron job


My website hoster doesn´t offer scheduled cron jobs so i needed a work-around for my rename script (can be found in an earlier post). My goal was to automatically process my uploaded pictures of my webcam.

A solution for this problem is a free cron job hoster which starts my script in a predefined cycle.

I´m using http://cronjob.de/ which starts my php5 script every 15 minutes. The free service gives you the possibility to start a script every 5 minutes at a minimum time interval.  I´ve tried http://www.mywebcron.com/ which offers minutely cron jobs but they never were on time. I guess the servers are pretty loaded and in average my script was executed every two minutes although i setup every one minute.

Wansview NC541W – nightvision and infrared shots


The webcam Wansview NC541W is equipped with ten infrared leds which gives even it the darkest night a few meters view.

The camera is approximately 1,20m above the cage installed and the resulting screenshot can be seen below.

Wansview NC541W – FTP file rename script in php


I´ve written a small php script which renames the uploaded images from my webcam (Wansview NC541W).

My upload directory upload/ and the new images are saved into pictures/

Due to some errors in php4 with gd library and “corrupt” jpgs (at least gd library tought they were corrupt, in image viewers they were viewable) i used php5 extension.

Sample images

upload/00B800003AFC(002bhdp)_0_20110609111559_1280.jpg

is beeing saved to pictures/zoe-20110609-11:15.jpg and the date and time is painted into the image

The source code of the php5 script

<?php
# Work with uploaded files: scanning directory for images, rename then and push them into a different directory. Furthermore im adding the date+time of the image into the image.
# Writen by naiboo

# path of uploaded pictures
$Pics = './upload';
$laengePics = strlen($Pics);
$laengePics = $laengePics+1;

$exts = array('jpg', 'png', 'jpeg', 'gif');
if ($glob = glob_ext_i($exts, $Pics)) {
    foreach ($glob as $file) {

    # Use regex to get date and time
    preg_match_all('/_0_\d*/', $file, $matches);

    # calculations and cuting of strings
    $laengefile = strlen($file);
    $laengefile = $laengefile - $laengePics;
    $datum= substr($matches[0][0], 3, -6);
    $zeit1= substr($matches[0][0], 11, -4);
    $zeit2= substr($matches[0][0], 13, -2);
    $filename = substr($file, $laengePics, $laengefile);

    # Due to some JPEG errors with GD library i ignore warnings
    error_reporting(E_ALL);
    ini_set('gd.jpeg_ignore_warning', 1);

    # create get the uploaded images
    $img = ImageCreateFromJPEG("./upload/". $filename);
    # color of the date im inserting to the image
    $tcol = ImageColorAllocate($img, 244, 22, 22);
    # write the textstring into the image
    ImageTTFText($img, 20, 0, 425, 460, $tcol, "monof55.ttf", "". $datum ."-". $zeit1 .":". $zeit2 ."");
    #save the new image in easier readable format
    ImageJPEG($img, "./pictures/zoe-". $datum ."-". $zeit1 .":". $zeit2 .".jpg");
    ImageDestroy($img);
    # delete uploaded file
    unlink("./upload/". $filename);
    echo "Manipulation von ". $file ." auf zoe-". $datum ."-". $zeit1 .":". $zeit2 .".jpg ok!" ;
    }
}
function glob_ext_i($exts, $dir = './')
{
    if (substr($dir, -1) != '/') {
        $dir .= '/';
    }
    $glob_str = $dir . '*.{';
    foreach ($exts as $ext) {
        $glob_str .= strtolower($ext) . ',' . strtoupper($ext) . ',';
    }
    $glob_str = rtrim($glob_str, ',') . '}';
    return glob($glob_str, GLOB_BRACE);
}
?>

Wansview NC541W – FTP upload and file notation


As described before i´m using FTP upload to my webserver. I´m sending a snapshot of the webcam every minute.

The files are stored in the format: 00B800003AFC(002bhdp)_0_20110609104603_1250.jpg

The format of the file consists of

  • MAC adress of the webcam interface 00B800003AFC
  • Device ID of the webcam in round brackets 002bhdp
  • I´m not sure about the third parameter but i guess it is the camera number. I can´t check this because i only have one camera. Camera 1 has got 0, camera 2 1 and so on. 0
  • Upload date in format YYYYMMDD 20110609
  • Upload time in format HHMMSS 104603
  • Running number for uploads 1250
  • Image format is jpg .jpg

Setup of Wansview NC541W – tutorial – portforwarding


I will briefly explain how portforwarding is done. This is only needed if you want to access your webcam from anywhere in the internet.

My router is a Linksys WRT54GL with Tomato firmware running. I´ve adressed the webcam an fixed IP adress which is quite handy if you want to have your portforwarding working!

I´ve got a static IP from my ISP. If your ISP has dynamic IPs you should setup a DYNDNS account which automatically refreshes your IP. You can access the router then via url. I won´t go deep into DYNDNS, there are tons of tutorials online or checkout http://www.dyndns.com

I use inside my lan port 80 and outside 8080. So i had to setup portforwarding from internalip:80 to externalip:8080. The setup of portforwarding is done on the router itself and is different in each type. A good way to find help is to google your router model and port forwarding.

A handy site for getting your external ip adress and test port forwarding is http://www.yougetsignal.com/tools/open-ports/

Once you´ve setup port forwarding you should be able to access your webcam from outside your lan!

I´ve done a more detailed description, check out my second blog entry on portforwarding: http://naiboo.wordpress.com/2012/06/27/setup-of-wansview-nc541w-tutorial-portforwarding-part2/

Follow

Get every new post delivered to your Inbox.