diy digital picture frame

for christmas '06, i decided to build a couple of digital picture frames - one for my brother and his wife and one for my parents. my requirements were :

  • at least 10 inch screen
  • wireless networking
  • able to store thousands of pictures

i wasn't too worried about the software, but all of the hardware solutions that i had seen on the web described how people would take apart old laptops and mount the screens to a frame and put the keyboard/motherboard on the back. it seemed to involve alot of work and looked like it would be easy to screw up and toast the laptop. so, i decided to go a slightly different route and i used a tablet pc. by doing this, i eliminated the need to take anything apart. the frame would be on 24/7, so for the software i decided to use Damn Small Linux (DSL). in the next few sections, i will describe the hardware and software setup in detail.

also, before i continue, i should note that i used this very informative diy picture frame post for inspiration :

http://www.thewares.net/item/33  

hardware

i found a couple of tablets on eBay for a great price - they had broken digitizers, which i didn't need, so i bought them. they were Fujitsu 3400S tablets. they had 6GB hard drives, 128MB RAM, P3-400MHz, USB and a PCMCIA port. this seemed like everything i would need for the frame - a big hard drive, USB for the keyboard and mouse to set it up and a PCMCIA for the wireless card. in fact, the hardest part about the whole project was finding a wireless card that worked in DSL. below is a picture of the tablet next to my thinkpad.

 

 

software

the OS seemed like an easy choice - definitely linux. i had never used DSL before, but i had always wanted to try it out. the hard part was getting DSL onto the tablet. i didn't have a floppy, cd-rom or network port. so, i had two options - i could use Grub for DOS and boot a USB floppy disk image and then boot DSL off of a USB memory stick or i could transplant the hard disk into another computer to install DSL and then put it back in the tablet. i ended up trying both of these - the easiest and most straightforward seemed to be the hard disk transplant. of course, this requires you to have another laptop that can boot off cd-rom or an adapter for your desktop.

my tablet came with Win2K on it. i used the following steps to install DSL onto the tablet. this describes using Grub for DOS so that you will not have to transplant the hard disk. if you decide to transplant the hard disk to another laptop with a hard drive or floppy drive (this tablet has one, but it costs alot of money on eBay), then you can skip all of the steps to install grub and boot onto the DSL pen drive.

  • download Grub for DOS.
  • copy grldr and menu.lst files from Grub for DOS onto the C: drive. then, you must edit boot.ini. to do this, type attrib c:\boot.ini -s -h -r into the command line.
  • open up boot.ini in a text editor. change the boot timeout to 5 seconds or something that will give you a reasonable amount of time to pick the boot image. also, add the following line to the bottom of the boot.ini file - c:\grldr="Start GRUB"
  • now, save the file and then type the following into the command line - attrib c:\boot.ini +s +h +r
  • download the bootfloppy-usb.img from the DSL website and put it onto the C: drive.
  • now, edit menu.lst and make a boot option that points to the bootfloppy-usb.img file. there should be an example at the bottom of the menu.lst file
  • i downloaded the DSL iso image and burned it onto a cd. then, i booted it from my other pc and used it to create a pen drive image of DSL. you will use this to boot the tablet into DSL using the bootfloppy-usb.img
  • now, you can put the DSL pen drive into the USB port on the tablet and reboot it. then, select the bootfloppy-usb image to boot the pen drive.
  • DSL should start up from the pen drive and go to its desktop.
  • the laptop only had one partition originally, but i su'ed root anyway using sudo su and then ran cfdisk /dev/hda. i then wiped out the original partition and created a new partition, made it primary and bootable and then wrote the partition table and exited.
  • now, issue this command mke2fs /dev/hda1 to format the hard drive with ext2.
  • now, right-click to pull up the DSL menu and click on Apps / Tools / Install to Hard Drive
  • choose hda1 as the target partition, no multi-user logins and you can choose to use ext3 or not (i didn't). now, DSL should format the partition and put DSL onto it. after it has copied all of the system files, it will install the boot loader - i used grub.
  • now, it will ask you to reboot and hopefully it will boot into DSL.

by now, you should have a tablet with DSL on it. now, you can configure it for the picture frame. basically, what i did was to create a folder for pictures to go into and shared it via samba. then, i configured a picture viewer called feh to run in slideshow mode and to look in that folder for pictures. then, i created a couple of scripts which blank/unblank the screen and restart feh so that i could shut down the display on the frame at a certain time and bring it up at another. the following steps describe how to configure the software on the frame :

  • unfortunately, DSL did not recognize my mouse in X upon boot. i had to Control-Option-F1 and press Control-C to get a command line. then, i had to edit .xserverrc in my home directory and change /dev/psaux to /dev/input/mice. i also edited the resolution to be 800x600x24 and then saved and rebooted.
  • now, enable apt by going to Apps / Tools / Enable Apt
  • install 'unclutter' by su'ing root and typing apt-get install unclutter. this is used to hide the mouse in X.
  • after that, install feh by typing apt-get install feh
  • now, install cron and samba the same way by using apt-get.
  • i needed vbetool to control teh blanking of the screen. i had to manually download an older version to get it to install correctly. i used version 0.2-1. after downloading it to the tablet, i installed it using dpkg --install --force-all vbetool_0.2-1_i386.deb
  • edit the menu.lst file under /boot/grub and put in a new entry like this : title DSL frame kernel /boot/linux24 root=/dev/hda1 quiet vga=788 nofstab dma
  • then, change the file so that this new entry is the default entry and change the timeout from 15 to something quicker like 5.
  • as root, i created folder /mnt/photos and granted all permissions with chmod 777 /mnt/photos
  • under /etc/rc5.d create a symbolic link over to the ssh and samba scripts that are located in /etc/initd so that they will start on boot. i did this with ln -s /etc/init.d/samba.dpkg-new S30samba and ln -s /etc/init.d/ssh S31ssh
  • now, edit the smb.conf file in /etc to grant guest read/write access to the /mnt/photos directory. this will require some knowledge of samba.
  • you should also edit crontab so that it will run the custom start/stop scripts at the right times - i stopped feh and turned off the display at 11pm and turned back on the display and started feh at 8 am. (note: i had to make samba encrypt passwords to allow file sharing between samba and Mac OSX)

alright, now you should have DSL installed and your software configured. if you'd like to see all of the files i modified and also my custom scripts for starting/stopping feh and turning on/off the screen, then you can download them here.

unfortunately, getting wireless networking to work in DSL is beyond the scope of this document. i eventually ended up with a D-Link card and an SMC card. i had to buy both off of eBay as DSL didn't seem to support much current stuff. hopefully you'll have better luck than me.

i bought the frame at Hobby Lobby and i mounted it by making some brackets out of metal that hold the computer into the frame. then, i made a shortcut to the shared photos folder on the desktop of my parents computer and whenever they have new photos, they can drag them into it. below are some pictures of the finished products :

future improvements

when i build my own frame, i'd like to add some improvements :

  • the screen on this tablet was limited to 800x600. therefore, it would have been nice to automatically resize all pictures to 800x600 to save space on the hard drive. but, on the other hand, it's nice having a complete backup of all the pictures as well.
  • a web interface to control things like slideshow timeout, slideshow start/stop time and making a specific playlist of pictures (say for christmas time, etc.)
  • grabbing pictures over the net from a flickr account or ftp site - this way many people can share pictures and new pictures would show up periodically with no user intervention. i would have done this for my parents, but they don't have broadband.