By Philip Munts, February 2007
I recently spent two weeks using OpenBSD in a jungle village in Guatemala. I came with a group of 52 to help finish building a new Church of the Nazarene in La Esperanza Chilatz, few miles outside of Coban. We also planned to operate medical and dental clinics, and teach a number of workshops on various topics ranging from small engine repair to puppetry. I didn't have any specific assignment before our arrival, other than to help our group leader with projection equipment.
As an avid amateur photographer with quite a bit of world travel under my belt, I brought a camera backpack stuffed to the gills with a digital SLR, and all the odds and ends for it. Not knowing exactly what I would do, I also brought tools for both electrical wiring and electronic repairs, tasks I carried out on a previous trip to Guatemala. This being the digital age, I decided to bring a computer as well. I have two notebook computers, a newish Dell 15" with Windows XP on it, and a very old IBM ThinkPad 600. Since the ThinkPad only has a 300 MHz Pentium II, I've always run OpenBSD on it instead of Windows.
I decided to bring the ThinkPad because it is smaller, lighter, and consumes much less power. It is also less valuable. My camera backpack has a slot for a notebook computer, so I was able to keep all my electronics in one place, on my person, during our travels. I also carried down three other new and used notebook computers and a video projector, to be left with various people in Guatemala.
I would up being the resident IT department. Other than carrying fill dirt on my back up a mountain one day, soldering diodes on a monster three phase generator another, and installing electrical outlets on a third, I spent my time either out photographing the local people, or in the "Computer Room". My duties included capturing my own and other team members' photo files, making backups, printing workshop diplomas and other material, and preparing daily Power Point slide shows of photos of the project and villagers. It proved to be a full time job, dawn to dark almost every day.
Our greatest challenge was stable electrical power. Since La Experanza Chilatz is off the grid, all of our power came from generators of uncertain ancestry and dubious maintenance. (One of our most popular workshops was small engine repair, with most of the small engines brought in being generators). The first few days we were repeatedly hammered by power dropouts, surges, and brownouts. Sometimes I measured 136V at my power strip. Other days it was down to 100V. Since all of my equipment was rated for 100-240V the voltage did not present a problem. Surges did knock out my computer a couple of times, without any permanent damage. Each time OpenBSD recovered nicely.
OpenBSD's power management doesn't work quite right on my ThinkPad. It will sleep after inactivity when disconnected from AC power, but it won't wake back up. Numerous times I left to do photography and returned to a sleeping computer that refused to wake back up after a generator failure. Each time I power cycled it and OpenBSD recovered without incident.
Finally, after a couple of days, we had had enough and sent somebody to town to buy a car battery and a charger. One of our team had a 400W inverter and we started running the computers from it. We also eventually captured a generator with a built-in inverter which delivered very clean power.
Printing proved to be an enormous challenge at first. Our team leader brought an HP Deskjet 320 battery powered ink jet printer, thinking it would be a perfect field printer. Unfortunately, its pickup mechanism is not very robust. The high humidity from rain and jungle rendered any exposed paper as limp as silk in just a few minutes, and the Deskjet 320 just would not feed it.
Our Guatemalan coordinator then borrowed an HP PSC1209 multifunction printer, which we found handy for photocopying handwritten notes and schedules as well as printing. It came without software, though, and none of the Windows machines around had drivers for it. My ThinkPad, with the hpisj package installed, was the only machine that could print to the PSC1209. I use an output filter program I've written myself called lpfilter, that works in conjunction with LPRng and ghostscript to make manual printer setup very easy on OpenBSD. After installing LPRng from a CD, installing lpfilter, and editing /etc/printcap, I was printing to the PSC1209 with ease. The PSC1209 fed even our moist paper with only an occasional jam.
Most of our documents were authored on various Windows computers. They all needed to be copied to my ThinkPad via a thumb drive for printing. I soon found this tedious, especially since my ThinkPad only has a single USB port.
I decided to try a little experiment, and after reading man pages and a very little bit of fiddling:
ifconfig wi0 chan 1 media DS11 mediaopts hostap nwid GUATEMALA
10.0.0.1 netmask 255.255.255.0
We now had our very own wireless network in the jungle. After adding an Apple Laserwriter 1200/PS printer to Windows, printing to LPR port 10.0.0.1 printer lp, I was able to print directly from Windows despite lacking a driver for the PSC1209.
I captured about 16 GB of image and audio files from a dozen or so cameras. Since my ThinkPad only has a 6 GB hard drive, this presented a problem.
I brought an old Image Tank portable hard drive in my camera bag. This is essentially a USB hard drive with a battery and memory card slots. The idea is to insert a memory card into one of the slots and push a button on the drive housing to copy it onto the hard drive. My Image Tank came with a 20 GB drive, and since that seemed marginal I replaced it with a 60 GB drive just before leaving home. The Image Tank works perfectly with OpenBSD as a USB mass storage device.
Prior to this trip, I've only used the Image Tank as an auxiliary backup device, with the master copies of photos kept on the hard drive of my computer. This trip I decided to keep the master copies on the Image Tank and use it as an extension of my computer's storage rather than as a self contained unit. This proved highly unsatisfactory, as both the Image Tank and my ThinkPad are only USB 1.1. Copying photo files to and from the Image Tank proved unbearably slow. I only did it that way because I had no alternative. Never again will I do this without a computer with a big internal drive and USB 2.0.
I captured photo and audio files from memory cards with PCMCIA card adapters, shell scripts and a program I've written, called photoslurp. My program will scan /etc/fstab for removable devices, mount each device, and read photo files from it, skipping duplicates to save time. It also populates a database with information about each file captured, such as time of exposure and MD5 checksum.
I also wrote a number of small shell scripts on the spot to handle various special cases, such as encoding WAV files from one of our cameras directly to MP3 format. These scripts let me automate as much as possible, which highly beneficial since other members of our team started feeding me memory cards for backup and inclusion of their photos in the nightly slide show. The sheer number of photo files was amazing, and OpenBSD handled it all with ease, which the exception of the very slow interface to the Image Tank.
I wound up doing a surprising amount of photo editing during my time in Guatemala. I created "mug shots" of team member, with their name inserted into the image. I also did some small editing for prints and for the nightly slide show. One of the most unusual requests was for draft prints of a couple of local personages. An artist on our team had been asked to do charcoal portraits of these men, and needed prints to work from.
I used the OpenBSD gthumb package to organize and catalog photo files, gimp for all image editing, and occasionally the jhead package to examine metadata. I also used shell scripts and ImageMagick utilities to do all sorts of bulk resizing, file moving, and the like. The capabilities of OpenBSD allowed me to deal with hundreds of images with ease.
At the end of the trip, I burned CD's with cdrecord for each of the team members whose photo files I had collected. I also spent an entire day, morning to evening, copying about 12 GB of data from the Image Tank to a Windows notebook to burn DVD backups of our photo files. (My ThinkPad doesn't have a DVD writer, and probably wouldn't be fast enough to burn DVD's anyway.)
Again, the slow USB 1.1 interface of the Image Tank proved to be a terrible hindrance. Despite that, I was able to use mkisofs and cdrecord to burn photo backup CD's for various people whose cards I had read.
Our group leader found on previous trips that the people of rural Guatemala are extremely fascinated with seeing themselves on a big screen. One of my jobs was to collect photo files from various members of the team each day for a slide show during the evening. I accomplished this in the past with Power Point XP, but found it extremely tedious, as each photo has to be manually placed in a blank slide. I have also used the ImgPPT Windows utility, but still found the overall procedure too tedious.
Fortunately, OpenOffice has available a "Create Album" add-on that will read a directory of photo files and insert each photo, scaled perfectly, into an Impress document. Each day I collected photo files, picked 50-200 using gthumb, resized them, and inserted them all into an OpenOffice Impress slide show. After saving the slide show in Microsoft Power Point format, I simply gave it to our team leader on a thumb drive for the evening show, which he projected onto a large sheet of white cloth on back wall of the church. It worked perfectly.
I used a shell script to resize the selected photo files with the ImageMagick convert utility to a horizontal dimension of 800 pixels before inserting them into the Impress document. This reduces the size of the final slide show document and speeds up the whole process considerably, an important consideration for a 300 MHz machine.
I used OpenOffice 2.0.4 for Linux repackaged by myself into an OpenBSD package. In the past I have had trouble with OpenOffice locking up OpenBSD machines, so I was a little hesitant to do very much authoring with it, especially with very long photo captures or backups running in the background. On this trip I didn't have any problems with OpenOffice.
One of our cameras, the Canon S3IS, has an audio recording capability. It saves stereo recordings to the memory card in WAV format. I wrote a shell script to copy these WAV files and convert them to MP3 using lame. I invoked both photo capture and audio scripts from a master shell script call ingest, for one step capture of everything interesting from the camera memory cards.
After I returned home, I modified photoslurp to ingest and encode audio files, rendering the shell script described above unnecessary.
I didn't do any audio editing in the field. We played a few of our recordings with mpg123 and mplayer.
Many of the cameras our team brought have video capabilities. My program photoslurp, described above, already treats video files exactly like photo files.
As with the audio, I didn't attempt to do any video editing in the field. My ThinkPad is far too slow for video editing or even satisfactory playback. I used mplayer to view a few of the video recordings.
There wasn't any. With no power or landline phone service, the only networking we did was my amusing little wireless network described above. The only time I took my ThinkPad to Coban, we couldn't get it to connect at the Internet cafe, more due to the language barrier and time constraints than any technical reason.
Lack of Internet turned out to be a surprising hardship. We are used to downloading a driver here, looking up a fact there, sending and receive email. Next time I would seriously consider renting an Iridium satellite phone for the trip.
After returning home, I replaced the 6 GB hard drive in my ThinkPad with a 40 GB drive, and obtained a CardBus USB 2.0 interface card. I also replaced the Image Tank, which began failing intermittently in Guatemala (the drive inside was fine, so no data was lost), with a similar but newer device with more card slots, a 60 GB hard drive, and USB 2.0 interface.
With these upgrades, all of which I should have done before the trip, I would not hesitate to do it again with my ThinkPad 600 and OpenBSD.