The Network Camera Quest |
|
A Preface To The Tables Of Content
Before This is a casual discussion of the essential equipment and basics as they are discovered and understood. It is one man's story that incorporates all of the frustrations, confusions and disillusionments that the most masochistic heart could desire - but slowly leads to the Oh's and the Ah-hah's and the Yes!'s that bring that wonderful sense of satisfaction and quiet excitement.During The behind-the-scenes story, primarily in the form of emails that traveled back and forth between the author who seeks to understand and the various professionals who patiently seek to make him understand. It is within these communications that many of the real solutions are uncovered and clarified.After This section is an expansion of the Before section but oriented towards events that occurred after seeing the camera system really work from afar. It describes special circumstances, refinements and fixes, including a little known LAN fix in IE that made a big difference. The underlying theme is that the self-fulfilling crises and hidden complexities that one knows will overwhelm him do gradually fall away to leave the essence of simplicity; the uncomplicated simply waiting to be noticed. Well, sort of.Then in 2012 Another story; other cameras, in another place, in another time ... |
12/14/05
|
During:
The Email Trail, Part One: Buying The Camera And The SD CardThe Email Trail, Part Two: The Camera And Router Hand-Shake |
This is a never-ending story of my ongoing attempts to connect a network camera to the internet.
It is a story that began with 'Oh Wow' excitement as I viewed our
driveway on my computer screen for the very first time. It then tumbled
gradually into occasional hair-pulling despair and frustration as I
fought the small army of interrelated but separate forces that conspire
to freeze the live image and thumb its nose at my forays into getting
it online. In fact it is still partially within that latter realm as I write this [a long time ago; it gets better; read on], though certainly not as much as it was.
Hopefully by the time you reach the end of this story, it will be one of success and serenity. I began working with computers in 1969 as a programmer which included writing machine language code for a primitive and slow form of networking. It would even dial a local phone number to tap into a network at another location and read various sensors. For that matter, you could say I began networking "wirelessly" in 1964 as a Radio Relay technician in the US Marines where we would capture a line-of-site signal from one hill or tree top, strengthen it and relay it to radios on another hill or tree top. Of course, if any of us got shot or if a radio died, then the whole line would be out of commission where the officers at either end were concerned. Now we have a new kind of network called the "internet" where if one path doesn't work, another will. About a dozen years ago, I began tutoring computers on a one to one basis, diagnosing problems and installing systems including wireless networks. I have helped hundreds of individuals and small businesses overcome the strange complexities of this electronic realm and have almost always left them happy, or at least better off then they were. This is my first camera installation and thank God it is my own or I would be highly embarrassed. Well, I am still embarrassed but at least nobody is paying me for services I am not rendering. At this point, the camera works locally, increasingly so as I figure things out. I can see my driveway live from my notebook, wirelessly within my local area network, and it really looks good. I can even recognize people that traverse the driveway and if a visitor parks just right, I can make out the license plate. I bought this particular camera because one guy in one forum somewhere said he could recognize faces where with other cameras in this price range he could not. However, I cannot see it from the internet and that is where my primary frustration lies. I have a plethora of security measures in my computer to protect it from just about all possible forms of malware. I suppose it is possible that one of those might be interfering, but I doubt it because the problem lies in the path between the camera, the router, the modem and the internet. The computer is not in that loop. Here the computer is simply a device used to go online and view the end result, just as it can look at any other live camera out there that has been made available to the internet. A modern cell phone or PDA could be used instead of the computer. The computer can also wirelessly connect to the camera locally and adjust the camera settings but that has nothing to do with viewing the camera online. For that matter, I should be able to go online and adjust the camera from out there also. Another purpose of this essay is to pull all I have learned together in hopes that in that very process something will synergistically gel into the answers I am looking for. There is plenty of excellent information available in various aspects of networking, but nothing that has helped me definitively resolve this situation with this camera. |
07/26/05 8:34 AM A Radio Relay network node The Falmouth Enterprise online |
Internal or Local: anything on your side of the router (including half the router), such as your camera and computer (aka: LAN). External: anything on the other side of your router, such as the internet (aka: WAN). Camera: in this document it of course refers to a Network Camera. However, it is effectively the same thing as the digital video camera that we walk around with making home movies - which effectively is the same thing as the digital camera that we walk around with taking pictures. Firmware: software that has been firmly imprinted on a device's circuitry. This could be the router or the camera or anything else on the network. To adjust it, you log into the device from your computer, make your changes, Save the settings, and then log out (Exit). Server: here and there you will see mention of a server. In the old days, they had cameras and they had a server that the cameras plugged into. The server would then talk to the computer and/or the internet. Now the camera has its own server built in; you don't need a "server". Image: pretty much interchangeable with video frame, photo, picture and shot. |
Here are the main components of my current setup (2005):
Both the computer and the camera are communicating through the router, with each other and/or with the internet. I also have a Packet8 VOIP box in this wireless hardware loop, itself communicating through the router to Packet8's computer (server) on the internet. Other then having to share bandwidth, it should have no affect on the camera. If you don't have the exact same equipment, the same general rules will usually apply. Just follow along and substitute where necessary. If you are not wireless, then you will probably find everything easier and faster. Try to purchase the most optimal equipment that you can afford. If you cannot afford the minimum, then wait until you can. Otherwise you may end up throwing it out the window and/or paying for therapy instead. |
UPS/surge protectors:
These power strips should come with 6 or more outlets, half of the outlets backed
by an internal battery (Uninterruptable Power Supply) and all protected
from power surges, also with connectors for cable and phone. Make sure
each key device (computer, router, modem, camera) is plugged into the
battery backed UPS outlets, with the less urgent
devices (printer, 2nd monitor, etc.) plugged into the surge only
outlets so that they won't waste the battery when the power goes out.
These strips are relatively inexpensive and yet important enough to buy
one for each device if they are too far apart for the cords to reach.
Make sure the outlets are oriented sideways and that some are
spaced far enough apart to fit adapters (the black blocks) side by side. I usually purchase these for clients (when they need it right away) at the local Staples for $60 (6 outlet) to $90 (8 outlet) currently. However, I see that they have the APC 350VA 6 outlet UPS online for $42 with free shipping. The UPS strip pictured to the right, also an APC 350VA 6 outlet, I purchased 2 months ago online through Amazon.com from J & R Music for $40, plus $15 shipping, though they are now selling a similar one for $35. The street power to most homes is erratic; it fluctuates up and down constantly though you generally won't notice this except during extreme situations such as brown and black outs. The UPS absorbs this erratic input into its battery and then feeds a nice smooth flow of power out to the devices that are plugged into it. It gives you some time to wrap things up and shut them down. How much time depends on the capacity of the battery and on the amount of current the devices pull out of it. If the camera has its own UPS and the router and modem have their own UPS, then the camera could keep on working and transmitting long after the computer has depleted its own UPS and shut down (hopefully by you, though the more expensive UPS's include software that can do this for you). The power strip wears out instead of the equipment. Replace the power strip every few years. Put them on your fridge and media center while you are at it. I've even been wondering about adding one to the circuitry of the furnace, if that can be done. Plug a low wattage lamp into a UPS outlet on each strip so that you can see what your are doing when the power goes out. |
Smooth power to the camera. This initial setup in an upper barn window was too bump prone. The camera is high enough to take in most of the driveway. |
The camera: After deciding on this one, I ran a Google search for "Toshiba IK-WB11A" to find the best deal. That led me to
Amazon.com and a purchase from
WebCamProShop.com for $549 plus $8 shipping on 7/9/05. It was shipped 2 days later and arrived in
excellent shape. Three weeks later I also purchased a Kingston 512MB SD memory card from eCost.com for $40, shipping included. The SD card allows the camera to store past images (frames) for instant playback or for FTP uploads of before and after shots. The card is not set up for quick removal as in a digital camera unless you don't mind climbing a ladder to remove 4 bolts without dropping anything and balancing the camera as you nimbly extract the card. You will not want to do that anyhow. After you anchor the camera into place, you will probably spend a fair amount of time defining the motion sensitive areas to ignore - from all angles. Fooling with the camera after that will throw your settings off because getting it back into the exact same position and angle as before is very unlikely. As to defining the motion areas, be sure to return to that screen on a windy day and desensitize the areas that nearby branches unexpectedly whip into. On downpour days, turn the motion sensor off, or at least stop the FTP uploads. It sees the pouring rain as one big endless movement including drips from the camera's hood. You can end up with thousands of images filling your storage folder before you catch it. If they were FTP'd to an online folder, they can take forever to delete. The firmware cannot record images to a folder on your harddrive and upload (FTP) them to a folder online at the same time; you get one or the other. The Administrative Controller (see thumbnail below right) has three tabs: Preset, Alarm, Record. The latter are two methods of recording; recordings triggered by motion and recordings in general. These will list all recordings that are on the SD card that you plugged into the camera. They can be played back in the adjacent viewer. If you have set the camera to FTP motions or recordings online, then the Alarm and Record tabs and functions are disabled. You may choose to simply record everything to your harddrive and then manually upload (FTP) the results later. However, that is labor intensive and my objective is to make everything as automatic as possible, so I have chosen to simply FTP everything and delete any excess on my web site later. This does mean that at some point I will have to ask for more space from my web host, Lunarpages.com (who are generous to begin with). The camera firmware has various adjustments for Sensitivity and Size. I ran tests of each setting (actually I walked them). In each test, I strolled casually towards the camera from the street 121 feet away, down the drive to the camera and past it. I walked in the morning shadow of the house, much like a thief might be inclined to do, but on a bright and still day, a still day so that I would be the only thing to trigger the motion sensor. BTW, There is no real sensor, as in infrared or whatever, though you can buy those and plug them into the camera. This setup simply evaluates the difference between one frame (image) and the next. Initially, I was walking entirely in the shadow of the house and the Sensitivity and Size settings did not make a lot of difference, but I did find that the High:Large settings caught me a foot or two sooner then the High:Medium and High:Small. That is, on the firmware's Camera Settings/Alarm page, the Sensitivity remained High while the Size was adjusted. The Large Size seems to work the best. Reducing the Sensitivity to Middle delayed the Alarm trigger. Setting it to Low got nothing; the Alarm did not trigger at all. So High:Large seems to be the best combination. It appears that a Sensitivity & Size settings of High & Small on a bright sunny breezy day creates a mad rush of motion alarms reacting to the contrast of branch shadows swaying over bright sunny pavement. Also, in the Camera Settings/General page, turning the Auto Sensitivity Boost Off seems to help trigger the sensor a bit sooner. Also, with that Off, there seems to be fewer nighttime Alarms triggered by headlights passing by on the street. If you turn Auto Slow Shutter On, that will generate an enormous barrage of nighttime shots and you don't need a bright light for that. It also seems to blur people moving in the daylight. It can really be difficult to be absolutely sure about the affects of any particular setting primarily because each setting relates one way or another to other settings. On the Network Settings/FTP Recording page, under Image Recording by FTP, with Motion Detection On, it also allows you to turn Image Accumulation to the SD card On. It says "When the image cannot be recorded to an FTP server, the camera can save the images to the SD memory card.". I am beginning to get the impression that this works too well; it swallows the images when the FTP transmission is less then ideal. But that's it; I cannot find any way to get at those saved images short of physically pulling the card from the camera and plugging it into a reader, which I would need a ladder and a screwdriver to do. Also my experience suggests that if an FTP transmission doesn't succeed, it will usually try again - unless it diverts to the SD card. I know the images were being shot because I also have set the camera to send me an email with every alarm. This was a flaky connection day; it was alternately weak and strong as CuteFTP was loosing its cool repeatedly. At around 5:07 PM the last image showed up at my online folder, but the emails continued to arrive in my Inbox up until 11:48 PM. For each email there should be a corresponding image or two uploaded by FTP to the website folder. The only thing I can figure is that the SD card swallowed them. I have turned the feature off. According to the camera's log: 100705 122712 3000211 FTP settings were updated. 100705 123451 2041001 FTP couldn't connect to server. That is when I turned Image Accumulation On - the 7th. Now: 100905 004109 3000211 FTP settings were updated. I turned it off and Saved the change. Immediately, two images arrived online: MD20051009 0041100 02D13B.JPG and MD20051009 004112 000D13C.JPG. The camera's file name structure is: MDyyyymmdd HHMMSS ***N--A .JPG. Those images were sent 1 and 2 seconds after the Save. Then I remotely pointed the camera down so that it would stop reacting to the distant headlights. Try not to have any moving branches, flags, dangling signs, bright lights, etc. within the near field of view. Choose the camera position carefully in that regard, but also allow for a few other things such as getting it as near to line-of-site as you can relative to the router. My camera's wi-fi signal has to pass through (bounce around?) the two walls of a corner of the house, cross more open space and then through a window to the twin antennas of my router, traversing maybe 70 feet. It seems to have no problem with this. It should be high and aimed downward so that its default center view at power-on includes no sky since the bright sky will affect the brightness compensation and no street since headlights will record useless motion. But, not too high. You want it to be low enough to recognize faces and read license plates. To make the camera point downward, I shimmed behind the top two screws of the three that attach it to the wall. I also made sure the 3" decking screws hit solid wood inside the wall. Remember, no matter how sporadic or flaky your computer connection seems to be, the camera is always on and recording 24/7 if it has been set up properly - and it is transmitting if the router is working. I have caught myself blaming the camera and/or its firmware when the image gets stuck or a significant motion does not get recorded, when in fact the problem was in the viewing software and/or my selections. I think it is safe to say that the camera is very reliable. If it is working properly, it will continue to do so; if it is not, it will continue to not do so. It does what its firmware tells it to do and that depends on the selections we make in the firmware. |
The modem and the router The memory for past images The Camera General options. The Camera Alarm settings. The Network FTP settings The FTP Alarm preferences Preset views for Auto Patrol. Testing motion Alarm. Tilting camera view down. Adjustable left-right scan. |
Firewall settings: I use a top rated firewall,
Zonealarm Pro,
running 24/7 on my computer. Hackers cannot snoop into my machine and
adware or hackerware cannot call out, unless I grant them permission.
However, at the firewall's maximum setting, the wireless network might
not function. Setting the firewall to medium seems to resolve this; it
will still protect you. Alternatively, you can tell it to allow the
camera's static IP address if you know how. This includes protection
from potential wi-fi snooping by neighbors and passersby. They may be
able to connect through your router, but Zonealarm will keep them out of
your machine. The free version is excellent; the Pro version gives you
more control and useful information. There are other firewalls in the loop. If you have Zonealarm, turn the others off. They are not as effective and they may just get in the way. There is one that comes with Windows XP, SP2, and it is said to be rather lame. There is another in the router.* Finally, your ISP, cable or DSL provider probably does some filtering of their own. Make sure they don't block your camera, nor your attempts to manipulate the camera from an external computer. Adelphia tells me they only filter signals destined for port 80. I think that would mean having to set your camera to use another port. More on that at How To Forward a Port. I did in fact change mine to 800, and then later to 8000. * Correction a few weeks later: you do need the router's Firewall after all. It is in there that you actually tell the router what Port leads to the camera. That is, when some device on the internet arrives at the external address of http://69.164.92.51:8000 (my router & port) to view the camera, the router routes the visitor to http://192.168.2.1:8000 on my local network. It does that because I went into the Firewall section of the router's firmware and told it to do so. I think that is what they call "Port Forwarding". IP Addresses: You can access the router controls from your browser (likewise the camera, VOIP phone, etc.). Putting the IP address 192.168.2.1 in my browser's address box gets me the local setup page for my Belkin router. If that doesn't work for you, try replacing the 2 with a 1 or 0. Otherwise, go to http://www.hostedvideo.com/help/default.view (Nope: Gone.) and click on Router Help. Your setup probably comes with a dynamic IP configuration meaning the router assigns an IP address on-the-fly to each device on your network using what they call the DHCP server. The better alternative is for you to assign a static IP address to each device so that their addresses will not change after you set other things up to reference them. If the DHCP dynamically changes those numbers, your online setups will stop working. Keep in mind though that we are talking about the local IP addresses here. The external IP(s) are another matter. My router's local IP is http://192.168.2.1/, but it also has an external IP of http://69.164.92.51/. My computer can access the router setup directly with the local IP address. Using the external IP, it has to travel out to the internet and then back in to the external address. From either direction, you end up with the same setup page except that the external entry will ask for a password. If you had previously designated a password, then you type it in. If you did not, then leave the box empty and hit the Submit button (meaning, I think, that anybody can adjust your router from anywhere). I suspect that this may be where my problem lies; I just don't have it all figured out yet. For instance, Adelphia says "Static IP addresses are only available to High-Speed Internet Small Business Plus customers". Mine is the basic Residential High-Speed Internet and that is expensive enough. Perhaps that is why camera calls from the internet don't work. However, http://69.164.92.51/ gets me my router every time and that looks pretty static to me. Adding the port number of the camera: http://69.164.92.51:800 does not work; I get the web's default "The page cannot be displayed" error page. I am missing something here. If I get the router's page then I should be able to reach anything beyond that. MAC addresses play into this too. The MAC address is also known as a hardware or physical address effectively burned into a device by the manufacturer. Most explanations I have found require a degree in engineering to understand but a pretty good definition can be found at watchguard.com. Yes, each device has two addresses, the MAC address and the IP address. Then there is the DNS: the Domain Name System specifies the address of your ISP (like the IP address of www.Adelphia.com), I think. I'll explore this in depth later. |
Signal strength: Establishing optimal
conditions between the camera and the router should be the priority.
Make sure the router is about as perfect as you can get it. For
instance, if you can do without the security settings or don't
care if others snoop, then turn the WEP encryption or whatever off; it
does weaken the signal. However, do be sure you have a good firewall in place, such as
Zonealarm Pro. The strength and speed of the wireless connection and the proximity of the router seem to make all the difference in the world. There should be a small connection icon in the task bar tray (aka: notification area) near the PC clock, usually bottom right. If not, then find the setting and make it so. A right-click on that icon and then a Repair selection will almost always make things better. The closer you can get your camera to the router, the better. Line-of-site through a window is ideal. Fewer walls between the two does wonders. Keep all that in mind when you are deciding exactly where to hang the camera. This also applies to your computer's proximity to the same wireless router, but if you have to choose, favor the camera. Keeping logs: A note about setting up the camera "properly": I am forever tweaking the camera (and the router, and the computer, and anything else I can get into, but lets stick to the camera for now). This is actually a necessity when it is not functioning as it should - one tweak could be the silver bullet that suddenly makes everything right - well, that has not happened yet. A tweak can also do what a real bullet does - destroy the half-baked settings you've already got. I did that one morning, though of course I did not know it at the time. One frustrating aspect of tweaking the camera is that if your settings are not optimal, then the tweak doesn't necessarily take hold until later, perhaps never. You don't really know if what you did helped or hindered. One additional problem is my lousy memory - I can forget what I tweaked. Hence, when something goes wrong (or right), I don't necessarily know why - except for a nagging suspicion in the back of my mind that I did something, but what? Anyhow, the camera suddenly stopped emailing me pictures of what tripped the camera's motion sensor. I let it go thinking that of course the camera was in a temporary discombobulation, or whatever. Besides, Active Webcam was sending its own images to me, even if they were of what it saw after the motion occurred, not during. I did reboot the computer occasionally since that often tends to fix all ailments. No luck; still no emailed attachments. Oh! Of course! The local utility's power went out that morning for a couple of hours, so the camera must not have rebooted properly (even though I have it plugged into a dedicated UPS). So I manually unplugged the camera for a moment and then plugged it back in. I had actually thought of this yesterday but I wanted to try everything else first - that is, making adjustments from my computer. In a couple of months, we plan to head out to our trailer in California and to remain there until the East coast winter has come and gone. I won't be able to replug the camera from there. Hopefully, before we leave here, I will have figured out how to manipulate the camera from the internet. Didn't help; still no emails. Then I remembered that the camera actually keeps a Log. I went into its setup program and took a look. Amongst a few thousand other entries, I found the following: (Date) (Time) (Log-ID) (Messages)Interesting; It says that at 1:13 a.m., I changed the DNS settings and then at various times throughout the day I tweaked the Alarm settings attempting to make the thing work. I still am not clear at this moment on how the DNS settings relate to everything else, exactly. However I will research this and at some point in the future I will type something that sounds like I know what I'm talking about. Anyhow, the DNS setting had been 192.168.2.1, which is the router's IP address. I thought I read somewhere that it should contain the camera's IP address so I changed it to 192.168.2.4, which points to the camera. I guess I misunderstood something. I changed it back. It works; I'm getting pictures emailed to me again. Of course, I should make a note of every change I make to anything. Sometimes I actually do that but usually I'm in way too much of a hurry to get back to whatever else I was doing. Thank God (or the Programmers) for logs. I turn them on wherever I find them. Then all I have to do is remember to check the log now and then. Otherwise it can continue to grow in size without my knowing until I find myself searching 6 months later to find out why the free space on the hard drive is getting dangerously small. It pays to do a search for *.log occasionally for that reason (the asterisk is a wildcard for 'any filename'). Or, send a shortcut from the log to your desktop so you will be reminded now and then. Of course all that doesn't help much here since this Log is in the camera; not the computer. |
Streaming? video: I don't seem to get real streaming video from my camera; I get a
stop-frame type action maybe 1 or 2 frames a second. This may
be relative to one or more settings that I selected. However, if it were not for
that stop-frame action, everything that moves would be an unrecognizable
blur. In fact, it seems that even then, the movement is very slightly
blurred at a distance and a bit more so the closer the movement is to the
camera likewise as dusk progresses and especially under an outdoor incandescent flood lamp. There a blurred person looks more like a ghostly wisp. It seems as though streaming video from www.camerawebpage.com in a browser and Active Webcam in its own framework cannot co-exist smoothly. When one is frozen, the other streams faster or both run in a slower stop-frame type action. It does not seem to matter whether I am using Netscape or the Internet Explorer to run CWP; both slow down when AW is running. I guess this would be a bandwidth issue. Other bandwidth intensive operations such as uploads, downloads and web videos seem to affect the AW stream also. In fact, as I type this it becomes increasingly obvious that I should stop running both at the same time. I have been using both with the idea that at least one would be working when the other is not. I have just closed the CWP browser version. AW is now on its own and seems to be clipping along very nicely. I need AW running anyhow because it is recording everything to an external Maxtor harddrive that I purchased for that reason. Note that external drives are notorious for self-destruction, so copy its contents to CDs or DVDs often and store them off-site. Humidity seems to affect the stream also; it seems harder to even have a steady open active connection on a hot muggy day, whereas on a crisp clear cool day everything seems to stay up and running without a hitch. |
Streaming email:
Getting this camera's network to actually work involved communicating
with a number of individuals on various levels of expertise. They were
my teachers; from them I learned the techniques, tips and tweaks that
lead to a successful conclusion(?). What they had to say or in some cases,
what they did not say, nudged me in the directions that got one aspect
working, and then another. In the following pages you will be able to follow the (sometimes) fascinating story as it developed. In the beginning you may notice a number of misconceptions of even the basic concepts that contributed to serious confusion and frustration. In the end, you will hopefully notice an inclination towards the opposite. And now ... |