Craig Ulmer

Camera Phone Blog

2003-08-10 web code bestof

Back in 2003 I noticed that cell phones were beginning to include digital cameras that allowed you to take pictures and email them to others. The cameras and software were awful, but it occurred to me that posting cell phone pictures of what I was doing would be a lot easier than all the writing I was doing for my homemade blog. I bought a phone and service, and then put together some scripts to make my own camera phone blog. A decade later this would all just be "what phones do", but at the time it felt wildly inventive and a major step forward in connecting with my friends and family.

Old School Blogging

I've been interested in using the web as a way to share info with my friends for a while. In 1998 when I spent a Summer in France, I decided to post our misadventures on a web page instead of just emailing me because I didn't want to have to go back and retell the same stories to people that I forgot to cc. After enjoying my friend Kelly's Kellegous blog, I decided it'd be fun to start my own blog which I called Rather than use one of the pre-made blog engines, I cobbled together my own set of Perl scripts to convert my text entries into static web pages. I learned a lot along the way, from CGI handling to html quirks, as well as the wild west of dealing with hosting companies (the first one I used went out of business and left me hanging).

The problem with the blogging was that even simple posts took a long time for me to do. In addition to having to manually resize pictures and upload the static pages whenever content changed, I am a very slow writer. I'd start out with a little idea that I thought I could get done in just a few minutes and then it'd snowball into a major chunk of time. I liked sharing info and love having a history of what I've been up to, but blogging as I was doing it is just too time consuming.

Cell Phones and a Cross Country Trip

I took some time off after graduating in 2002 to decompress and do a thorough job search. In the end I decided to take a job in California, which meant we'd have to relocate from Atlanta to Livermore, CA. A moving company took care of shipping all of our things, but we decided to take a week and make the cross-country drive ourselves. It seemed like the kind of trip I should be documenting in full on AngryNoodle, but I knew I wouldn't be able to get them written and posted while the driving was still happening (hotel internet was still pretty haphazard back then).

Since it was going to be a long drive and I was worried about the car having problems, I decided it was time to upgrade my cell phone and splurge on a better plan. Looking around at all the options I noticed a couple of the new cell phones had a "camera option" that they said would enable you to take pictures with the phone and send them to others. It seemed like a great opportunity to modernize my blog and do status updates from the road. I signed up for service from TMobile and bought a brand new Sony Ericcson T300 with a camera attachment.

The T300 Hardware

Just one look at the T300 and you can really tell how primitive cell phone cameras were at the time. The phone didn't have a built-in camera- it had an external camera module that plugged into the charger port of the phone. The module was an extra $50 on its own (though free with a plan). Its resolution was a whopping 640x480, and there was only enough flash on the module to store about five pictures at that resolution. It had an "optical viewfinder", but all this was was a glass window through the device. The phone was able to display a lowres pictures while you were aiming, but only at a few frames per second.

Using the T300 as a camera phone was an adventure. Every time you wanted to take some pictures you had to plug the module in and wait for the hardware to figure itself out. Sometimes it didn't and you had to unplug the module or power cycle your phone. After a few months of use the connector loosened up, and if you didn't hold it right while taking pictures, the phone would lose the connection to the camera and you'd have to reinitialize the unit. Another problem was that picture uploads were sent using GPRS, which was very slow (definitely less than 32Kbps) and error prone. Quire often you'd send a message, watch a slow progress bar for 30 seconds, and then get an error message about a communication failure. Even with all these problems, it was still very exciting to be able to send pictures while out in the field.

Data Transfer Software

The T300 provided minimal apps for doing things with the phone. They wanted you to use MMS to send pictures to other phones, but they also had an option to email pictures. The pictures were simply mime encoded and tacked on to the end of an email. I realized that if I wanted to make a camera phone blog, I needed to create some kind of handler on my server that would look for incoming emails with mime attachments and then extract the pictures to a webserver directory. I hadn't scripted much with emails so I enlisted the help of John Lockhart and Kelly Norton. John and Kelly gave me tips on how to parse email folders on a server, and provided me with an example of how to extract mime data in Perl. Initially it seemed like procmail would be a nice way to automatically parse emails when they arrived. However, there were some issues with using procmail on my ISP, so I needed to find an alternate method. I decided to just go with a cron script that checked the email file every 10 minutes. My Perl script parsed the email file manually, validated the sender address was my phone, extracted pictures to a web server directory, and then made backups of the data in case something went wrong. Using cron meant the photos weren't instantaneous. However, it was good enough that my friends could check in during the trip and see what was doing on as the stories unfolded.

Web Page

The last thing to do was build a simple web page that let you scroll through the list of pictures. I wrote a plain old Perl CGI script to dynamically create the pages as people asked for them. Initially I just displayed the pictures with their dates, but later I added a comment system where anyone could write some thoughts. Unfortunately, some SEO spammer found my pages and filled the comment section up with spam. I manually wiped the comments and added a simple posting password. The password worked pretty well- people who knew me could easily fill in the blank of a specific phrase. The comments also let me explain what was going on when I got back to a place where I could type.

Camera Phone Blog Use

I was able to get the whole system working before we started our long drive to California. It was great to be able to take pictures and share them as they happened instead of waiting until the next hotel. It was cool to get emails from friends saying they had checked on us and were wondering where we'd taken that day's picture. The camera phone also helped keep our sanity on the long drive. I think we were more willing to stop and look at things because it was fun to post goofy pictures.

Pictures from the drive cross country:

Pictures from our initial adjustment period to California:

Pictures from our "people in California go to Hawaii for Christmas" realization.

I continued to use the camera phone blog long after the drive. I periodically had to make changes to the scripts when either TMobile or the ISP messed things up. My ISP eventually switched to a more elaborate mail caching system that made the email parser impractical. At the same time, phone cameras and social media rose up and provided a more convenient outlet for sharing pictures. In retrospect, I probably should have been more enterprising and found a company that also saw the power of putting cameras in everyone's cell phones. I think the bigger point here though is, don't listen to anyone that says they "invented" some new idea. When new technologies become available, many clever people will think of the same ways to use the technology.


I don't expect anyone to use it, but I've checked the code into github.