A while back, Axis Communications announced
the availability of the Axis Network Camera
2100, billed as the "Linux-powered camera." We're not normally inclined to
turn down chances to play with fun new toys that run Linux,
so when the folks at Axis asked if we would like
to borrow a 2100 to review, we didn't have to think to long before answering in
the affirmative. Not much real work got done the day the UPS truck dropped off
the demo unit...
The Axis 2100 is exactly what it claims to be - a network camera. It's shaped
like a flat tube, with a lens on one end, and a twisted-pair ethernet connector
on the other. It runs its own web server internally - you can point a web
browser directly at the camera and see what it's looking at. You can get either
still images, or streaming video at a rate of 3-10 frames/second, depending on
the image resolution and compression that you use. It can take pictures at
either 640x480 or 320x240 pixels.
If you don't want to direct viewers to the camera directly, the 2100 can also
be configured to automatically upload images via FTP to a remote server every so
often.
For the curious, the lowest price we found for this unit (after not a huge
amount of research) was $469 from
CDW.
Setting it up. Getting the Axis 2100 on the net took all of about five
minutes - though somebody who was not familiar with system and network
administration might have a bit of a harder time. The camera may run
Linux, but the
people who buy it are clearly expected to be running Windows. Once you have
gotten an IP address for the camera, you need only run the installer application
provided with the camera, and it will be up and running.
Or so they say. I run Linux, and there's no installer program for Linux.
Instead, you have to configure your system to give an IP address to the camera
via either ARP or BOOTP. ARP is the simpler solution, since you don't have to
mess with any running daemons. Just get the MAC address for the camera (handily
printed on the bottom of the case) and run a command like:
arp -s camera mac-address pub
where "camera" is the hostname assigned to the camera in DNS and
"mac-address" is the MAC address. Then ping the camera to make it take note of
the IP address and get going. The instruction book with the camera tells how to
do this, but gives an incorrect ARP command (at least for Linux systems - it
would work on Solaris). For a permanent installation, the BOOTP alternative is
probably preferable.
Administration of the camera is all done through a series of web pages.
Whoever writes HTML for Axis suffers from that terrible disease that makes
people want to use microscopic fonts that us folks who are no
longer in our twenties have to squint at to read, but everything else is
straightforward. You can create accounts on the camera, with varying levels of
privilege. You can also restrict access as need be.
Anyway, as I said, five minutes later I could connect to the camera, and
realize that I was now making an intimate view of my office available to the net
as a whole. Not being interested in running the "Jonnicam", I pointed it out the
window instead.
What's inside. The camera runs a special-purpose processor called the
"Etrax100," which is produced by Axis. They have ported Linux to this chip. There is no obvious way to log into the camera, but it is running an
FTP daemon which, among other things, lets you dig around in /proc. We
saved a few /proc files for your reading
pleasure.
From /proc we learn that the camera is running a 2.0.33 kernel; it
has 5.6MB of memory available, but isn't using all of it. The ethernet
controller appears to be built into the CPU itself; it also has two serial ports
(one of which is available on the back and can drive a modem). It's a 99.58
bogomips system.
On using Linux in a network camera. Bjorn Wesen of Axis was kind
enough to answer some of our questions regarding this device. The choice of
Linux came about partly because it had already been ported to the Etrax
processor (which is available as a product in its own right). They had
considered several alternatives, but it came down to Linux because it was
available, and "a desire to focus the development efforts of the camera team
to what they were best at - imaging HW/SW and picture transfer - instead of the
developers having to learn or build a new OS."
The developers at Axis are pleased with the choice. The availability of
source and ability to make quick fixes is crucial when designing a product of
this type. Since the engineers also run Linux on their desktops, they can do
much of their development in that environment, where it is easier. Only
occasionally do they need to cross-compile code and download it into a real
camera.
Axis ended up rolling its own distribution for the camera. Since it uses
their own processor, there are no prepackaged distributions available for their
use. And, in any case, they had to be extremely selective about what actually
went into the device. Only crucial daemons - and trimmed-down ones at that - can
fit, and libc had to be thinned as well.
The camera also uses Axis's Journaling Flash File
System, which allows the device to run out of flash memory. It's a live
filesystem, in that you can go in and change things. But when you pull the plug,
everything is still there - no need to wait while the camera runs fsck
the next time you turn it on. Embedded systems, of course, need this sort of
"instant on" functionality. Axis has made JFFS available under the GPL - but it
currently only works with the 2.0 kernel.
But the real question that comes to mind is this: given that the camera is
running Linux, is it possible to write specialized code to run inside the camera
itself? Axis makes available everything that is needed to do this: versions of
the compiler and libraries are available on the Axis developer site. It's mostly a matter
of cross-compiling the code and FTPing it into the camera.
Axis does not officially support tweaking the camera's code in this way -
yet. "We get requests every day from people who want to add their own changes
to the 2100 - ranging from customized picture transfer protocols, to new picture
encodings or just changing the HTML." With an upcoming firmware upgrade,
however, support for uploading code into the camera will be official. There
might just even be some documentation on how to do it as well. Then another
advantage of using Linux becomes clear: "Fortunately, we can then just tell
the customers that 'It's Linux, go buy a Linux book and roll your own!' instead
of having to teach them an entire proprietary operating-system."
Conclusion. As a gadget, the 2100 scores well. It makes it easy to set
up a camera anywhere that you have networking available. The Axis 2100 is also a
nice example of what can be done with embedded Linux - you really can cram it
into a tiny box and make it do cool things. The real value of Linux in this
application, however, may well be that it allows the customer to reprogram the
device as needed. Wouldn't it be nice if more of our devices were open in this
manner?