This is only a preview of the March 2015 issue of Silicon Chip. You can view 36 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Articles in this series:
Items relevant to "Spark Energy Meter For Ignition Checks, Pt.2":
Items relevant to "6-Digit Retro Nixie Clock Mk.2, Pt.2":
Items relevant to "Modifying the Currawong Amplifier: Is It Worthwhile?":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Setting
Up An IP
Camera
For WiFi &
Internet
Access
By Nicholas Vinen & Greg Swain
Setting up an IP camera for WiFi is usually pretty straightforward.
Often, it’s just a matter of plugging it into a router via a Cat5 cable,
figuring out its IP address, then logging into the camera’s web
interface and entering the details for your WiFi network (SSID &
password). It’s not always plain sailing though, especially if you
want to access your camera on a PC, tablet or smartphone via the
internet.
A
S STATED in our feature article
this month on IP cameras, it’s
invariably necessary to set up a camera
using a wired (Cat5) connection before
it can be used on a wireless network.
That’s because certain information
is required for the camera to be able
to “join” your wireless network and
accessing the camera via a cable allows
you to enter this information.
Wireless networks are identified
by their “SSID” name so you’ll need
to know the name of your network.
If in doubt, check the settings of a
device already connected to it, eg,
a smartphone. There will almost
always be an accompanying password
required to gain access to your WiFi
22 Silicon Chip
network. The security protocol should
be either WPA or WPA2 but you can
only choose the latter if all other WiFi
devices on the network support it.
Once you have these details, it’s
just a matter of logging into the
camera’s web interface and entering
the necessary details to enable it to
join the WiFi network. That’s typically
done by typing its IP address into a web
browser and going to the relevant setup menu. After that, you can unplug
the Cat5 cable and continue to access
the camera over the wireless network.
By the way, if you don’t have a
password for your WiFi network, set
one up now! An open network is an
invitation to get viruses, have your
personal files accessed or have random
strangers use your internet connection
(possibly for illegal purposes!).
What’s the camera’s IP?
The first step in the setting-up
procedure is to connect the camera to
a spare port on your router. Assuming
that your router has DHCP enabled
(usually the default setting), it will
automatically allocate an IP address
to the camera (just as it does for other
devices on the network, such as PCs,
laptops and smartphones).
For the uninitiated, an IP address is
a unique set of numbers allocated to
each device on your private network
to identify it. It usually contains four
siliconchip.com.au
numbers separated by dots, starting
with either “192.168.” (eg, 192.168.0.5)
or “10.” (eg, 10.0.0.1). Each device
on your network ends in a different
number, so that each device has its
own unique number.
There’s one small detail though –
how do you know which IP address
has been “handed out” to the camera,
so that you can log into and set it up
for WiFi and to change other settings?
Basically, you need to figure out which
address the camera has been allocated
and if you have multiple cameras, they
will have different addresses.
By default, the addresses are
allocated by your modem/router to
ensure there are no “collisions” (ie,
devices with the same address). It
will also often be configured to “hand
out” addresses in a specific range. For
example, if the router itself has an
internal IP address of 192.168.1.1, then
it may be configured to hand out IP
addresses in the range from 192.168.1.2
to 192.168.1.20.
Some cameras, such as the TechView
QC-3834 (and the QC-3832) are
supplied with utility software which
will tell you their IP address once
you’ve connected them to your
network. If so, use this as it’s probably
the easiest method.
In the case of the TechView cameras,
this utility is called “IP Camera Tool”.
It’s simply a matter of installing it on
your PC and running it. The utility
will then show the camera’s IP and its
port number. If there is more than one
TechView camera on the network, it
too will be listed.
Fig.1 shows a typical example. In
this case, a camera has been detected
on 192.168.1.5 and port 80. Doubleclicking on the listing will then bring
up the camera’s web interface and you
can then log into it by entering in the
user name and password (the default
user name is usually “admin”, while
the default password is usually just left
blank or can also be “admin”).
Typically, an IP camera will have a
default port number of 80 or 81. Note
that each camera must have a unique
port number, so if you are setting up
two or more cameras be sure to change
the port numbers to avoid conflicts (eg,
to 8888, 8080, etc).
Making a guess
Another method of determining
the camera’s IP is to simply make an
educated guess. That’s done by first
siliconchip.com.au
Fig.1: TechView’s “IP
Camera Tool” app
shows the camera’s
IP and port number.
You can then log
into the camera by
double-clicking the
listing.
Fig.2: typing “ipconfig” in the Command Prompt dialog gives you the PC’s IP
address (in this case 192.168.1.2) and the router’s IP (192.168.1.1). You can then
make an educated guess as to what your camera’s IP might be after allowing for
other devices (eg, smartphones) on the network.
checking the address allocated to your
PC or phone. For example, in Windows
you can determine your PC’s IP address
by pressing the Windows Key + R,
typing “cmd” and pressing Enter, then
typing “ipconfig” and pressing Enter.
The display will be similar to that
shown in Fig.2.
Here we can see that the computer’s
IP address is 192.168.1.2 and this has
been allocated by the router (also
acting as the Default Gateway) which
is at 192.168.1.1. The camera might
therefore be 192.168.1.3 or 192.168.1.4
or something similar – unless these
addresses have already been used by
other devices such as smartphones or
smart TVs.
Anyway, chances are that the
number allocated to the camera will
not be too different from that of your
PC so it should not take long to find.
To test an address, type both it and
the camera’s port number (the two
separated by a colon) into the address
bar of a web browser. If it’s the right
one, the camera’s web interface will
quickly come up.
How do you know the port number?
Well, the camera will be allocated a
default number and this will be listed
in the instructions supplied with the
camera or printed on the camera body.
For example, if the default port number
is 80 and you want to test an IP address
of 192.168.0.7, it’s just a matter of typing
192.168.0.7:80 into your browser’s
address bar and pressing Enter.
Get it from the router
Yet another method for determining
the camera’s IP is to login to your
router’s web management interface
The EasyN S9014 720p scanning camera
from Altronics has its own set-up utility
but can also be configured as described
in the article. Its default port is 81.
March 2015 23
Many IP cameras come with a DDNS
hostname (see text) on a label attached to
the base. This lets you access the camera
via the internet without having to know
your public IP. Once set-up as in Fig.7,
you just type the address into a browser
and substitute the camera’s port number
for “xxx”.
IP address and possibly the name of
each device on your network.
It’s then just a matter of finding the
camera’s listing. If you just set it up, it
will probably be at the bottom of the
list – see Fig.3.
Getting the WiFi working
Fig.3: logging into your router will show you which IPs have been handed out to
devices on the network. If you’ve just installed your camera, it will probably be
the last one in the list (some routers even list the device name).
Fig.4: once you’ve logged into the camera’s web interface, you can change the
port number if necessary (eg, to 8888) to prevent conflicts with other cameras.
(assuming you know the login details).
You should then be able to find a page
called “Attached Devices” or “DHCP
24 Silicon Chip
Client Table” or “LAN IP” or similar
(typically somewhere under the Status
or Advanced menu). This will list the
Once you’ve determined the correct
IP, you can then use this interface to get
the camera on the WiFi network. Note
that it will be assigned a different IP
address on the wireless network than
the one allocated on the wired network,
so once you unplug the fixed cable, you
will have to figure out its new wireless
IP (using the same procedure as before).
If you can then access its web interface
with the Cat5 cable unplugged, you
know it has successfully joined your
wireless network.
If you’re sure that you’ve correctly
enter
ed the WiFi settings into your
camera (and rebooted it, if necessary)
but you still can’t access it via the
wireless network, you may have a
security feature called “MAC Address
Filtering” enabled in your router. You
will have to log into its web interface
and either disable this feature or add
the camera’s unique MAC (Media
Access Control) address to the list of
allowed addresses.
Most routers make adding a MAC to
the list quite easy; once you’ve found
the right menu and chosen to add a new
address, it will normally give you a list
of discovered devices to add, possibly
with names alongside. It’s then just a
matter of choosing the right one (ie,
your camera’s MAC), adding it and
saving the changes.
You may also find the MAC address
printed on the camera. If so, it will be in
the form of six pairs of letters/numbers
siliconchip.com.au
separated by colons or dashes. For
example, “12-34-56-78-9A-BC”.
Security
Before going any further, make sure
you have set your own user name and
access password for the camera via
its web interface. And don’t make it
too easy – “password” and “12345”
are terrible passwords, as are single
dictionary words or a person’s first
name. These are the first things any
potential hacker would try if they want
to access your camera.
It’s especially critical to set a good
password for indoor cameras, unless
you like the idea of strangers watching
you! There are internet databases
of many thousands of unsecured
webcams which can be found with a
simple web search – don’t find yourself
among them. If you can change the
user name, you should do that too as it
makes it that much harder for someone
to guess the login details.
Once you have everything set up,
you can view the camera’s video on the
local network simply by entering its
IP address and port number into your
browser and logging on. Of course, if
the router is switched off, then it might
allocate a different IP to the camera
when it is switched back on again. The
same applies if the camera is switched
off and on again.
One way around this is to allocate a
static IP address to the camera but make
sure that this is outside the router’s
DHCP range. However, there are other
methods which don’t require a static
IP, as we shall see later.
Viewing via the internet
In most cases, a WiFi camera will
come with a unique DDNS hostname
to enable you to view it from a remote
location. DDNS stands for “Dynamic
Domain Name Server” and it allows
you to log on to your home network
without knowing your home network’s
public (or WAN) IP.
It can be as simple as setting the
camera up, as described above, then
typing in the website address printed
on the bottom of the camera (or
scanning a barcode which takes you
straight to that address) and away you
go. As before, you have to include the
port number at the end of this address.
If it works, then your modem/router
has automatic port forwarding (more
on this shortly) and you don’t have to
do anything else. In some cases though,
siliconchip.com.au
Fig.5: here’s where you set up wireless networking for the TechView cameras (the
interface for the EasyN cameras is similar). It’s just a matter of adding the SSID
(network name), encryption protocol & password (share key).
Fig.6: if your router doesn’t support automatic UPnP port forwarding (see text),
then it may be necessary to manually assign a static IP to each camera so that
you can manually enter the port forwarding details into the router (see Fig.9).
Fig.7: this is the TechView’s DDNS service set-up dialog. Entering in these details
lets you log-in to the camera via the internet without knowing your public IP.
March 2015 25
Fig.8: if your router supports UPnP port forwarding, make sure it’s enabled if you
want to access the camera via the internet. The router will then automatically
port forward any UPnP devices (such as IP cameras).
Fig.9: alternatively, if your router doesn’t support UPnP port forwarding, it will
be necessary to manually add port forwarding for each device. Here, two IPs
have been port forwarded: 192.168.1.5 on port 8888 and 192.168.6 on port 8080.
you will need to manually set up the
port forwarding on your modem/router
to allow you to make a connection from
the public internet to your camera
which is on your private network.
Basically, a software “firewall” is
built into the modem/router, designed
to prevent worms, viruses and hackers
from accessing your PC or other
26 Silicon Chip
equipment on your network. In order
to make a connection to the camera,
you have to open up the relevant “port”
in this firewall so that data can pass
through. We’ll look at this shortly but
first, let’s take a look at dynamic DNS.
Dynamic DNS
If your camera does not offer an easy
way to connect remotely, the first thing
you will need to do is figure out your
public internet IP (or WAN) address
as this will be required to make a
connection from another location. It’s
akin to your home address (basically,
it’s your address on the internet) and as
with a private IP address, it’s typically
four numbers separated by dots.
How do you determine your public
IP adddress? Easy – just type what is
my ip into the Google search engine
and press Enter.
Once you have your IP, try typing it
into a web browser followed by a colon
and then the camera’s port number.
Provided port forwarding has been set
up correctly (see later), you should be
able to log onto the camera.
Unfortunately, in many cases, your
WAN IP isn’t a fixed address. Provided
you leave the router on, it may stay the
same for days, weeks or even months
but unless you have been allocated
a static IP address by your internet
service provider, power cycling your
modem may well result in it obtaining
a new address. And if that happens
while you’re away (eg, due to a power
failure) you will then be unable to view
your camera feeds.
The first step here is to determine
whether or not you have a static IP. You
may need to ask your internet service
provider (ISP) to find out. Alternatively,
a quick Google search will confirm
whether they offer this service and
whether it’s an extra-cost option. In
some cases, you may get a static IP if
you’re on a long-term contract.
If it turns out you do have a static
IP, then you’re in business. Otherwise,
you will probably need to set up DDNS
(Dynamic DNS) yourself. This is a
scheme whereby your computer or
router contacts a fixed server on the
internet each time your IP address
changes and informs it of the new
address. This static server can then
send you to the right place.
Just about all routers have support
for DDNS built-in. If yours doesn’t,
you will need to leave a PC or laptop
powered on and active at all times in
order to provide this service. However,
a better solution is to upgrade to a
router which does have DDNS support
– it will almost certainly consume less
power for a start.
You will also need to sign up for a
DDNS provider. There are several free
ones such as www.noip.com/free and
www.dnsdynamic.org Once you have
siliconchip.com.au
signed up via their website, the DDNS
provider will then give you an address
such as www.myip.noip.com/ or myip.
dnsdynamic.org (where “myip” is
a name you have chosen) and you
then use this to connect to your home
network from anywhere in the world.
Note, however, that you also need to
program the DDNS log-in information
into your DDNS client (ie, via the
router’s web interface) for this to work.
Alarm, Email & FTP Services
UPnP & Port forwarding
Now that you have your home IP
or DDNS address, try accessing your
camera by typing that address into
a web browser, followed by a colon
and then the camera’s port number. If
it works, then your router has inbuilt
support for automatic port forwarding
via UPnP (Universal Plug and Play) and
that’s the end of the story. Of course,
your WiFi camera must have inbuilt
UPnP support but most do.
If it doesn’t work, log in to your
router’s web interface and check to
see if it has a set-up menu for UPnP.
If it does, it might be disabled. If so,
enable it and try connecting to your
camera again.
Unfortunately, not all routers
with UPnP support automatic port
forwarding, so it may still not work
even after UPnP has been enabled. And
if your camera doesn’t support UPnP,
then it won’t work in any case. Either
way, you will have to manually set up
port forwarding on the router in order
to gain remote access via the internet.
In greater detail, “ports” are part
of the Internet Protocol, along with
the IP addresses mentioned earlier.
Each IP address has 65,536 different
port numbers associated with it. This
allows a given computer on the internet
to host many different services such as
web (HTTP), file transfer (FTP), chat,
camera streams and so on.
By the way, when you have a home
router with multiple computers on the
home network, these ports are also used
as a way to share your single public IP
address among the various computers.
Each connection made from a computer
on your private network to the internet
is associated with a specific port, so
that when the router gets a response
it knows which computer or device
on the LAN (local area network, ie,
private network) it is intended for.
This is known as “Network Address
Translation” or NAT.
Similarly, the router needs to know
siliconchip.com.au
Fig.10: checking the “Motion Detect Armed” box triggers the unit if the video
image suddenly changes (eg, if there’s an intruder). You can also set the
alarm sensitivity and send alarm notifications (with pictures) by email.
Fig.11: the TechView camera’s Mail Service Settings dialog. The “Sender”
is usually your current email address and the unit can email up to four
recipients if the alarm is triggered.
Apart from their basic video functions, many WiFi cameras (including the TechView
QC-3834 and the EasyN S9014) also feature an alarm function plus in-built email
and FTP servers.
The alarm function on the TechView QC-3834 is activated using the menu
dialog shown in Fig.10. Its just a matter of “ticking” the Alarm box and selecting
the sensitivity level. The unit will then trigger whenever it detects a rapid change
in the video image.
Provided you’ve also entered your email details into the menu dialog shown in
Fig.11, the unit will then send an email to warn you that the alarm has triggered.
It will also send several (usually up to six) photographs, so that you can see what
it was that triggered the alarm. You can also set the unit up to upload an image to
an FTP site and even set up scheduling for the alarm (eg, to prevent it triggering
during office hours on weekdays).
Another feature of both the TechView QC-3834 and the EasyN S9014 units is a
4-pin I/O connector for an external alarm. Two of these pins are used as an input
pair for an external sensor (eg, a PIR sensor), while the other two pins are the
output pair (eg, to trigger a house alarm or an external powered siren).
March 2015 27
Viewing On A Smartphone
Want to monitor your camera using
a smartphone? – just install the
relevant app. The photo at right
shows TechView’s “IP Cam” running
on an iPhone 5 while the photo
above shows the set-up dialog.
which device a connection should be
routed to when you connect to your
public IP on the camera-specific port.
This is especially important if you
have two or more cameras; they must
be assigned different port numbers,
otherwise the router will not know
which camera you are trying to view
from your remote location.
Manual port forwarding
Just how you go about setting up
port forwarding depends on the router
you’re using.
Most routers only do port forwarding
to a specific LAN IP address rather
than a specific device. As mentioned
earlier, by default, LAN IP addresses
are handed out by the router using
DHCP (Dynamic Host Configuration
Protocol). The key word here is
“dynamic” – it’s liable to change over
time. Again, this commonly happens
when there’s a power outage but a
DHCP-assigned address may change
for other reasons, too.
If you have this type of router, you’ll
have to assign each camera a static (ie,
fixed) internal address. You will then
need to set up the port forwarding entry
to the camera’s new fixed IP address.
There are two ways to assign a
fixed IP address to a device and again
it depends on your router. If your
router has the ability to assign fixed IP
addresses using DHCP then this is the
28 Silicon Chip
some modem/routers let you set up IP
address/port pairs. To forward a port,
two IP address/port pairs are required
– the original address/port and the
forwarded destination address/port.
In this case, the original address is
your public internet address which
the router already knows, so you only
need to provide the port for the router
to “listen” on for its public address
(ie, the “external port”), the IP address
to forward the connections to (ie, the
camera’s address) and the camera port
to which the connection should be
routed (ie, the “internal port”).
Once the port forwarding settings
have been saved, you should then be
able to connect from a remote location
by entering your public IP address and
the camera’s port number into a web
browser. Alternatively, you should
be able to connect by entering in the
DDNS hostname printed on the bottom
of the camera.
No dice?
best method. This may be listed under
a heading such as “DHCP Reserved
Addresses”, probably under a menu
titled “LAN Settings”.
Assuming your router has it and
you’ve found it, enter the camera’s
MAC address and its current IP address
(which may already be filled in for
you), then save the change. Its address
will always be the same from then on.
Fig.9 shows the port forwarding
set-up for two cameras on a Netgear
WND3700 router. The external port
number should be between 1024 and
65535 and as stated earlier, 8080 or
8888 are commonly used. Or you could
use say 8000 for one camera, 8001 for
another etc. Note that the start and
end port numbers should be the same,
since each camera device only uses a
single port.
On the other hand, some routers
allow you to only forward a specific
external port number to one device on
your LAN as determined by its DHCPprovided name (ie, the name in the list
of attached devices). If that’s the case,
all you need to do is find the router’s
port forwarding settings page, then
set up a port forward from a number
of your choosing which is associated
with the camera device, selected from
the list of attached devices.
IP address/port pairs
There’s one further wrinkle here –
What if your router is unable to
assign a static IP to a device based on
its MAC number? In that case, you will
need to use the camera’s web interface
to assign it a fixed IP address outside
the range of addresses your DHCP
server is configured to hand out. This is
important since otherwise, you could
easily end up with an address collision,
rendering both the camera and the
other device temporarily unusable.
This isn’t too hard to do. First, via
the router’s web interface, determine
the range of addresses it is configured
to supply for DHCP. This will normally
be found in the “Basic Setup” or “LAN
Settings” menu, under a heading
titled “Network Address Server
Settings (DHCP)” or similar. For
example, the router may be configured
to hand out IP addresses ranging from
192.168.1.2 to 192.168.1.20.
In this case, any static address you
assign to the camera should be no lower
than 192.168.1.21. The last number
in the address can go as high as 254,
eg, 192.168.1.200 would be OK but
192.168.1.255 is invalid. Be sure to use
a unique IP for each device.
Once you’ve assigned this address to
the camera and checked that you can
access it locally, set up the router’s port
forwarding to go to this new IP address.
As before, make sure you pick a unique
(and memorable) external port and that
the internal port is set to that which is
SC
required by the specific camera.
siliconchip.com.au
|