- An always-on Internet connection (such as DSL or cable Internet).
- A Wi-Fi router (either connected to the DSL/Cable modem or integrated with the modem)
- Admin access to the router
- Basic knowledge on IP networking is a plus. But don't let this discourage you.
Note: the detailed steps in this guide is specific to the Wi-Fi router I have, which is TP-Link TL-MR3420. In general the process should be the same for any home router. You may need to consult the user manual for detailed instructions.
I. Assign static IP to your smartphone
Typically you don't need to concern about the IP address assigned to your devices by the Wi-Fi router. However, in this case the smartphone will be acting as a streaming server. So having a static IP address will make it easier to access the device.
- First, lookup the current IP address assigned to the smartphone.
Go to Android settings -> Wi-Fi settings. Tap on your home network (the one your device connected into), you should then see your current IP address. Take note of it. - Open your router's Administration Web GUI in the browser (from your PC/laptop connected to your home network). For home router, usually the default URL is http://192.168.0.1. For TP-Link, the default username/password is admin/admin.
- Go to DHCP -> DHCP Client List. Find the entry that has the IP address noted in previous step. Copy the the MAC address for that device.
- Go to DHCP -> Address reservation. Add a new entry that maps the MAC address you noted earlier to a particular IP address. Just make sure the IP is outside the DHCP range. In my case I assign IP address 192.168.0.91 to my old Samsung. Let's assume you also use this IP address.
- You may need to reboot the router.
- After the router rebooted, check the Wi-Fi settings in the smartphone. It should be using the new IP address now (192.168.0.91).
II. Install IP Webcam App in your device
There are several apps that provides surveillance camera function. But this is the first one I found and tried. The GUI is not fancy but it works fine.
- Search and install IP Webcam app by Pavel Khlebovich via Google Play Store.
- Open the app. Adjust the video preferences as you see fit. For me, I'd rather have relatively low resolution (eg. 640x480) and low bitrate(eg. 700 kbps) so it won't take too much space.
- Don't forget to set login/password in the Local Broadcasting section. You don't want to let everybody be able to watch your video stream. Unless of course that is exactly what you want.
- Start the server (This option is at the bottom). You can now close the app by pressing the home button. The app will still run in the background.
- You can access the surveilance cam using web browser (from your PC/laptop connected to your home network) in this URL: http://192.168.0.91:8080. Select "Browser" as the video renderer.
So now you can access the surveillance cam from other devices/computer. But you have to be connected in your home network to do so. Not very useful.
Thus, the next thing you want to do is to access the web cam over the Internet.
III. Access the surveillance camera over the Internet.
- Access your router's Administration Web GUI again (http://192.168.0.1).
- Go to Forwarding --> Virtual Server section. Create a new entry with the following parameter:
Service Port: 8080
Internal Port: 8080
IP Address: 192.168.0.91
This basically tells your router that any incoming request (from the Internet) to port 8080 must be forwarded to a particular address/port in your home network (192.168.0.91:8080) - Check you home network's public IP address. Just google "my ip". Google will tell you your public IP address. Take note of this.
- Now you can access your web cam over the Internet in this URL http://[my-public-IP]
:8080
IV. Configure Dynamic DNS for your home network
- Register to www.noip.com. Setup your username and domain name. For free service your domain name is limited to [my-domain]
.ddns.net - Activate your account by following the confirmation link sent to your email.
- Access your router's Administration Web GUI again (http://192.168.0.1).
- The nice thing about TP-Link router is that it has built in support for some dynamic DNS services.
Go to Dynamic DNS section, then enter your No-IP username, password, and domain. - Now you can access your web cam in this URL http://[my-domain]
.ddns.net:8080.
Next you may want to explore the functionalities of IP Webcam app. For example you can record the video continuously in circular mode. So older videos will be purged automatically when storage is low. Note that the video files are stored in the smartphone. So you might want to put large capacity memory card in the device.
Also note that NoIP site says that free domain name expires every 30 days. I'm not sure if it means we can still extend it every 30 days and stay free, or we have to upgrade to paid service. Oh well, we'll see in 30 days.
Of course, using smartphone as a surveillance camera has some drawbacks. First, if it is placed somewhere very accessible, it could be the very first item that gets stolen. Secondly, in the approach above, the video is recorded the device's internal memory. Thus, it if gets stolen, the recordings are lost too. A better approach would be to store the recordings in an external server. That's a project for another weekend.
No comments:
Post a Comment