LAN/WLAN Interface for Digital
Remote control of almost any digital camera can be accomplished by
connecting the camera via USB to a computer system which is connected
to a network. This article describes the setup, installation and
operation of a system consisting of a battery powered single board
computer with wlan adapter. It runs embedded
Linux and adapted versions of
open source software. No special skills beyond plugging in cables and
basic computer experience are required. Total
system cost is well below 150 EUR/$. A simple webinterface has been
developed which enables wireless remote operation of this setup by
computers connected to the network. Systems ranging from Windows PCs to
Palm PDAs are feasible as long as they are capable of running a
HTML-browser. Download the software package from here.
The current project is similar to a webcam which is used to
publish life images on the WWW. However, the focus is on the remote
control capability. We want to provide an easy to setup and operate
small, standalone, possibly battery powered solution for
Most digital cameras can be remotely controlled using USB or serial
connections, and many software packages have been developed to provide
this functionality. It is now a matter of selecting suitable hard- and
software, connecting and installing everything, and providing a user
- wireless remote control for taking images and occasional
- automatic operation of the digital camera, e.g. for
periodic image capture.
The controlling computer has to provide USB-host support to connect to
the camera; the days of RS 232 are definitely over. This excludes the
otherwise perfect Palm computers or other PDAs which only support
USB-device protocol. A full size labtop works, but is quite large and
too expensive for this task. Of the many embedded systems available
today one is particularily well suited for connecting USB devices: the Linksys
NSLU2 network storage link. It has 2 fast USB ports, it runs
Linux, its processor is reasonably fast (250MHz) and, most important,
it is one of the cheapest computers of its kind selling for less than
Problem is that the NSLU2 is not meant to be a general purpose computer
but a device to connect to USB-harddiscs turning them into network
drives. The potential of this device is far beyond this task. Many
users have realized that, and there is a growing number of developers
liberating the firmware and open the way for new applications. There is
now a replacement
firmware available for download which turns the device into an
almost standard Linux computer while preserving the original
functionality. All this is well
explained, quite simple to install, and
does not require specific Linux knowledge. Basic computer experience is
helpful since setting up the device requires logging into the Linux
system using telnet, issuing a couple of shell commands and copying
Many camera manufacturers provide excellent and powerful remote control
programs for their products. However, these usually do not work under
Linux, and support only specific models. Several open source packages
exist, and the one supporting the largest number of camera models
Unfortunately, it has only very limited remote control
capabilities utilizing not much more than taking images and previews,
and downloading them. No exposure adjustments or manual controls are
possible. Nevertheless, gphoto was
the only program which supports my own camera model so I had to choose
it. Users with cameras supporting ptp
have more options, e.g. the program capture or ptpcanon.
The image below shows the setup.
It consists of the following components:
All components except the camera are packed into a watertight box for
outdoor applications. The battery pack lasts about 60 min. The NSLU2
alone runs several hours from it, but the wlan adapter is very hungry.
battery in my camera lasts approximately the same time. Power saving on
the camera should be turned off to avoid automatic shut-down after
periods of inactivity. Of course, if longer operating
periods are required, larger batteries should be used.
- Linksys Network Storage Link NSLU2.
- Asus Wireless Access Point WL-330. Any
Wlan adapter should work,
or the device may be operated by wire (Ethernet port).
- Lexar Compact Flash USB Adapter with CF Card 64 MByte. This is
optional. Any mass storage device (USB-drive, USB-stick, Flash-cards
with USB-adapter, or none(!)) can be attached.
- Pack of rechargeable batteries (Size AA, 4xNiMH, 2300mAh), or any
other 5V source.
- USB controllable camera.
Installation of software
For novices to the NSLU2 I suggest the following procedure:
Userinteraction is accomplished by the webinterface Remote Camera. This
is a plain HTML-document using forms to call a shell-script on the
NSLU2 which in turn issues the required gphoto2 commands.
Each action requires parsing the script, scanning the USB-bus and
connecting to the camera resulting in response times > 10s. The
following actions are accessible:
- Preview -
Takes a preview image and displays it on the Remote
Camera-page. If the image does not show up, reload the page. If
this happens frequently, adjust the line sleep 5 of the
cgi-script and choose a longer delay time.
- Capture -
Captures an image leaving it on the camera.
- Load - Loads an
image from the camera to the client computer. No space on the NSLU2 is
occupied for this operation. You have to supply directory name and
image number, which can both be determined by using the Execute command
below. Please note that the image number refers to the number within the choosen directory, not
the global number displayed
when issuing --list-files.
- Execute -
execute any gphoto2
command. There are countless options which can be
studying the attached man-page. An often required command
which supplies a directory listing of all images on the
camera. The response of the gphoto2
appears in a new HTML-page. This is quite useful for debugging.
The following open source packages have been compiled and assembled for
The patches together with build instructions are contained in the
in the gphoto
package. If you plan to rebuild the
application you have to download the openembedded environment and
follow the instructions provided at the NSLU2-Linux
homepage. Then, apply the patches to the mentioned source files and
rebuild the three packages. Please see the Readme file in the
- a client program for libgphoto
- the library providing access to digital cameras.
Patches have been applied to change hardcoded search paths.
- the library providing access to the USB-ports. A patch
has been applied to get this library working on the NSLU2.
The web-interface uses basic HTML-technology and the user interface is
realized entirely with forms. The CGI-script is a plain shell
script and requires only basic unix core utilities like sed and cut. It
is therefor highly portable and could be used with minor adjustment on
any unix-like system. On the client side, any HTML editor
supporting forms should work. I have successfully tested Internet
Explorer and Netscape Navigator on Windows, and Mozilla, Firefox,
Konqueror and Lynx on Linux. I suggest to read the shell script
and the HTML source index.html
to study details of the
mechanism and add your own modifications.
There are many things which can go wrong. Before troubleshooting the
camera setup please
make sure that
Now test your camera setup and type (your camera needs to be
connected now and turned on):
This should display all image files in your camera. If this does not
work, your camera might not be supported, please check the gphoto
Feedback and suggestions for improvements are welcome.
Copyright C 2005