Posts Tagged ‘firmware’

Ultimate Baby Monitor (for geeks)

datePosted 8:09 PM, May 20th, 2011 by MarkleB

This blog is not dead. A very specific issue has made it more difficult to update, but hopefully I can turn that to a positive in a (fingers crossed) soon-to-follow entry. Hint: It involves a lot of soda. A soda can, a soda bottle, and soda glass tubing.

Anyway, for now, I unearth my Ultimate Baby Monitor. (Disclaimer: I’m a bit of a geek. “Ultimate” by my standards may not be ultimate by yours. It’s more likely that “ultimate” by my standards is mostly unusable by normal standards and a little pathetic to boot. And in cases of food, it actually just means I added cheese to it.)

As it is certainly not All Things To All Parents, I’ll highlight the quick pros and cons:

Pros:

  • Video monitoring
  • Audio monitoring
  • Infrared night vision
  • Wired or wireless (except power)
  • Pan & tilt camera movement remotely
  • 2-way audio (currently unimplemented, only under very specific circumstances, and I can not for the life of me figure out why you’d want to talk to your baby through your baby monitor)
  • Viewing available through smartphone anywhere you have data signal or WiFi access
  • Can record (again, under certain circumstances)
  • Motion detection alerts
  • And, of course price: $60. That’s pretty close to as cheap as you’ll find a video baby monitor

Cons:

  • Audio sucks
  • Slight delay, about 1 1/2 seconds over LAN
  • That $60 only covers the camera, for a receiver you have to use a computer, tablet or smartphone
  • Audio REALLY sucks
  • Not battery operated, will require power cord
  • Okay, so the audio sucks so much that my wife actually still uses the audio baby monitor we had before
  • To get audio on smartphone, you’ll probably have to pay for an app, and I haven’t tested that

So what’s the big secret to it? The camera.

First, a few things about the specific camera I linked to.

  1. That’s not the same exact camera I bought. I bought an even Brand X-ier camera. Like, it doesn’t just not list a manufacturer, but nobody on the Internet seems to be able to track it down. Worse, people don’t seem to care. It’s like a mystery so ancient that people refuse to look lest their faces melt off and Harrison Ford is forced to turn it over to the government.
  2. The one I’ve linked to is a generically packaged version of a Foscam camera. It is compatible with Foscam firmwares, so you can update it as new firmwares come out. (This is important as it has an internal web server for its user interface that’s based on its firmware.) For my camera, it won’t accept the Foscam firmware, I can’t find new firmware from the manufacturer (apparently an ancient and vengeful pharaoh), and I’m stuck with it. FOR LIFE. (It’s a B-series, for whatever that means.)
  3. Mine cost $4 less on eBay. Who’s laughing now?
  4. It ships from Hong Kong, so allow enough time for your baby to graduate college for it to arrive.

The same camera is about $100 on Amazon with faster shipping, and the price goes up from there.

I’ll stick with the $60, because it’s more fun to complain about waiting than … Well, just about anything.

Wait a few years, get the camera, unwrap it and … Well, good luck. Most of the different re-branders include installation CDs (with .DOC documents and what equate to Power Point Presentations), but they’re nearly as good as the ones that come with no documentation at all. If you’re used to configuring network-attached devices through web interfaces without instructions, this’ll be right up your alley. The default IP address of it is 192.168.0.178 (though some are on 192.168.1.178) on port 80, with the user name of admin and the password of 123456. (I have actually randomly found some of these on the Internet that still use this user name and password. Sadly, they’re mostly demo cameras and are invariably set up to watch a couch in Singapore 24/7. Possibly the same couch.) So if you’re using a different internal network than 192.168.0/24, you’ll have to change your computer’s IP address to find and talk to it. Potentially the “Camera Search” software that comes with it will find it for you, but I’m more likely to stick with changing the address.

Bizarre bonus configuration tip: Some of these come with Dynamic DNS pre-configured. There’s a sticker on the bottom that has the URL for your camera that it will automatically bind itself to. Plug the camera directly into your broadband modem, and configure it from a friend’s house or your smartphone using that address.

Configure it to an address that’s actually in your LAN’s network range, configure your router to forward a port to it, and you’re mostly done.

At that point, you could kick off Internet Explorer, install the ActiveX plugins, and watch and listen to the camera. And if you enjoy Internet Explorer … That’s probably all you need to do.

(Quick note: Internet Explorer with those ActiveX controls is the only way to get all functionality of the camera via a web page. This includes using the microphone on your computer to talk to people in range of the camera if you’ve connected external speakers, and recording video files off the camera. There are some stand-alone programs that come on the CD and others you can purchase that will also include this functionality.)

With the current firmware, the audio portion is (mostly) only available using the IE ActiveX controls. There are two work-arounds to this: You could use a Firefox plugin that displays Internet Explorer through a Firefox tab (which defeats the point of not using Internet Explorer anyway and isn’t possible in Linux), or you can use VLC Player.

The camera has a lot of hidden functions built into it. Most are accessed through hitting URLs in it and kicking off some CGI magic. I found out about these while working on my own Ultimate Baby Monitor project, and found somebody else’s.

He has the same Super-Brand-X-est camera that he maintains he discovered to be a Netwave IP camera while avoiding the fate of Nazi relic hunters. He found a PDF that contains some of these functions here.

The videostream.asf address will serve up both the video and the audio in a format that VLC Player (and mplayer) will accept. (It deceptively looks like Windows Media Player will accept it, but this is a trap. It is conniving and spiteful.)

There are a few other commands that I’ve found to be useful, too. By using videostream.asf and these other commands, you can build your own web page that will display video, play audio, and control the camera’s movement, and it will work in Internet Explorer, Firefox or Chrome, and will work in Windows or Linux.  You have to install VLC Player and its Mozilla plugin for this to work.

The idea for this page is that you embed the VLC Player into a web page, then include hyperlinks which send commands to move the camera up, down, left and right.

The page I’ve built for that does JUST these five things: Embed the player (once for IE, once for Firefox/Chrome) and move each of the four directions. You can easily pretty it up with buttons and backgrounds, and sparklies and flashies and super emo art and heavy music like your defunct Myspace page you haven’t looked at since you met your child’s co-parent.

Okay, it does one more thing, it embeds your user name and password in each of these things so that you don’t have to type it in. Obviously, you probably don’t want to actually publish the page to the Internet this way, just drop it on your desktop.

Without further ado, here’s the HTML for it:

<html>
 <header>
 </header>
 <body>
   <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="640" height="480" id="vlc" events="True">
     <param name="Src" value="http://YOURADDRESS:YOURPORTNUMBER/videostream.asf?user=YOURUSERNAME&pwd=YOURPASSWORD" />
     <embed type="application/x-vlc-plugin" name="VLC" autoplay="yes" loop="no" volume="100" width="640" height="480" target="http://YOURADDRESS:YOURPORTNUMBER/videostream.asf?user=YOURUSERNAME&pwd=YOURPASSWORD">
     </embed>
   </object>
   <p />
   <a target="camcontrol" href="http://YOURADDRESS:YOURPORTNUMBER/decoder_control.cgi?user=YOURUSERNAME&pwd=YOURPASSWORD&command=2&onestep=1">Up</link>&nbsp;
   <a target="camcontrol" href="http://YOURADDRESS:YOURPORTNUMBER/decoder_control.cgi?user=YOURUSERNAME&pwd=YOURPASSWORD&command=0&onestep=1">Down</link>&nbsp;
   <a target="camcontrol" href="http://YOURADDRESS:YOURPORTNUMBER/decoder_control.cgi?user=YOURUSERNAME&pwd=YOURPASSWORD&command=6&onestep=1">Left</link>&nbsp;
   <a target="camcontrol" href="http://YOURADDRESS:YOURPORTNUMBER/decoder_control.cgi?user=YOURUSERNAME&pwd=YOURPASSWORD&command=4&onestep=1">Right</link>&nbsp;
   <p />
   <iframe src="#" style="display:none" name="camcontrol"</iframe>
 </body>
</html>

Yup. Just HTML (almost). I’m old school like that.

Also: This is for my Brand-X Cam of the Covenant. For the Foscam and Foscam unbranded, you’ll want to switch up & down, and left & right. The controls are reversed between the two cameras.

Finally, there’s smartphones. The camera I got came with an Android app on the CD. It’s usable, but it’s tiny, doesn’t rotate … It’s not a very good app.

Instead, I’ve installed Tiny Cam Monitor Free, and am using the Foscam profile for it. It’s great, but again the movement controls are reversed. I’d consider paying for the audio version, but the sound really isn’t great anyway.  There are similar apps all over the place for the iPhone.  And if all else fails, the default built-in web page interface includes a Mobile style sheet that’s quite usable from the phone.

And that’s it. My wife enjoys firing up the smartphone app when she hears him stirring, and wants to see if he’s distressed enough to get out of bed. (Or if he’s standing in the crib, or even yanking on and chewing the power cord as she witnessed him do the first night before I’d thought better of it.)  I enjoy full-screening it on my second monitor so I can watch him sleep while I’m working from home.  One of the best parts is that it’s not wasted money. After he (and any yet-to-be-conceived siblings) outgrow the need for monitors, it’ll be a great component of a home security system. You can even set it to send e-mail to your text alerts gateway based on camera movement. Which might not work so great if you have a dog.  Oh, well. Still cool.

 

Rambling, confusing entry about my home network

datePosted 10:49 PM, July 1st, 2010 by MarkleB

Rather than a new project, I’m going to post on a past project that mostly failed. Hopefully somebody else can learn something.

A couple of months ago, I decided to give my home network some structure. I put a manual IP Address Management list into place (since I have nowhere near enough devices to need an actual IP Address Management solution), re-IPed all of my servers, and eventually put a new third-party firmware on my home router.  Well, and even more third-party firmware than was already there. More on that in a bit, since that was the bit that failed.

Here’s my network as it existed before the re-structure:

Home network as it existed prior to May 7, 2010

It should mostly make sense if you look at the Network Key.  The smaller servers on the blue box are virtual servers running on Impulse, my physical server.  If you’re not yet familiar with virtual servers / virtual machines, think of them as many different computers running as software on one computer.  Because that’s what they are.

The two things I most wanted to fix was to use anything other than the 192.168.1.0/24 network (which I didn’t really fix very well, but technically am avoiding) and to use DHCP reservations instead of static IPs for my servers.

Why do I prefer DHCP reservations?  First, it puts my fake IP Management into the DHCP server, rather than on a .PNG graphic of a Visio document.  Most importantly, though, it centralizes the configuration of my IP addresses.

Moving from static to reserved DHCP addresses (which was the first step of my network re-design), it took me a little under an hour to pre-configure the DHCP server for each MAC address, log into each one of the servers, change the IP address assignment to Dynamic, get the new address, check the DHCP server, etc.  When it was time for me to actually switch to the new IP addresses, though, it took about 8 minutes.  I prepared a few days ahead of time by lowering my DHCP lease time from 1 day to 5 minutes.  Then I changed the IP address reservations, waited for the leases to expire and re-grab the new address, and then set the DHCP lease time back up to 1 day.  I’m never going back to static on anything that will DHCP.

Home network as it ... isn't quite now. But mostly.

So here’s mostly how the network looks now. It’s sadly already outdated, with new virtual servers and a netbook that my wife bought our unborn son as a baby-monitor / digital mobile / grandparental (not a word) spying device.  As you can see by the new IP Address Management section, I left 30 spaces open for static IPs, but in a home network there are very few cases where that’s going to be necessary to use.

The other week was when I “upgraded” to the third-party firmware for the router, DD-WRT.  DD-WRT is a pretty popular firmware that can open up a lot of power and control for your router. It’s just a tiny Linux that runs on your router, has drivers for the wired and wireless communications ports (and USB ports for those that have one), a lot of networking daemons / services running on it, and a web-based configuration page.  I’d planned on loading this firmware on my router a year ago when I got it, but they didn’t have drivers supporting the Trendnet TEW-652BRP until a few weeks ago.

Instead, I had loaded the DLink DIR-615 (Rev C1) firmware onto it.  The Trendnet 652 has identical hardware to the DLink 615 (at least these revisions), so the firmware is interchangeable.  The DLink firmware is FANTASTIC.  It has great control over port forwarding, port aliasing, port triggering, QoS, access control, filtering, basic routing … It filled ALMOST all my needs.  There are two things that I needed it to do that it couldn’t.  First, I wanted it to be my DNS server so I wouldn’t have to build a virtual server just to do that (which is still on my To Do pile).  Second, it wouldn’t recognize MAC addresses if the first two digits weren’t 00.  Many new NICs have MAC addresses that begin with 40 or 4Something, and since they weren’t recognized, I couldn’t set up DHCP reservations for them.

So I installed the DD-WRT firmware.  What does it do?  Well, it does everything listed above, plus a lot more.  For example, out of the box, you can configure it to work as a public WiFi hotspot, and even allows you to generate revenue within a couple of minutes of turning it on this way. It does a fair job of logging, too, but I far prefer Tomato (another third-party router firmware) for logging.  Since it’s running Linux, you can do most anything with it that you do with Linux.  For the short time I had it running, I really loved using it as an SSH server open in my home network that wasn’t dependent on my internal network functioning.  I especially love that you’re not bound by the short-comings of the web interface, and can manually edit config files.  It puts consumer routers a step closer to professional routers.

Unfortunately, it had issues.  About once a day, it would shut off all Internet-side communications. Some research indicated this happened if there were a LOT of open Internet connections, like I’m apt to have while doing BitTorrent transfers.  My BitTorrent is up pretty much 24/7 (I think we calculated that I’m uploading about 200 GB/month, throttling down to 80 KB/s), so this is an issue for me.

I found some configuration work-arounds, and plugged them in.  No sooner had I done this when I noticed that my Internet speed dropped drastically.  It’s normally around 20 Gb/s, and it was instead around 1 Gb/s.  I took the changes out, rebooted the router, and the speed tests were still the same.

Out of desperation, I decided that between the initial locking problem and then the speed problems, the firmware was more bother than it was worth, and I re-loaded the DLink firmware.  (Actually, a new version of the DLink firmware. I’d checked over and over from the web interface to download an updated firmware, but it never found one. You apparently have to download it and put it onto the router manually.)

This still didn’t fix the speed issue.  In the meantime, though, I’d scrapped all of my router configurations.  I had backed up the configuration for the DLink firmware, but the updated version didn’t like the old configurations.  I had to enter it all by hand, all from memory.  It took a couple of hours.

The problem?  Time Warner Cable/Road Runner was having a problem.  A massive problem, where they had to rent bandwidth from a competitor to get any connectivity at all to their SoCal customers.  I’d done all that for nothing.

So I’m still on the updated DLink firmware, even though I suspect DD-WRT would work fine for me now.  Just haven’t put aside time to have my network down for that long.  The new firmware recognizes newer MAC addresses without a problem, so I’m just out my DNS server.  I have to decide if it’ll be easier to build my own, or go back to DD-WRT firmware.