LAN/WLAN Interface for Digital Cameras

Helmut Dersch
January 2005


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 other 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 interface.

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 80 EUR/$.

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 some files.

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 is the gphoto program.  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. The 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.

Installation of software
For novices to the NSLU2 I suggest the following procedure:
User Interface
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:
The following open source packages have been compiled and assembled for this system:
The patches together with build instructions are contained in the directory src 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 distribution for details.

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 gphoto-web.cgi 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):
/opt/gphoto/bin/gphoto2 --list-files
This should display all image files in your camera. If this does not work, your camera might not be supported, please check the gphoto homepage.

Feedback and suggestions for improvements are welcome.

Helmut Dersch
Copyright C 2005