This document1) briefly describes how I made an embedded network enabled Digital Photo Frame, using a Startech USB2VGA2) connected to a Linksys NSLU2 embedded Linux computer.
For an explanation on the slug, and for links to further material, please see slug.
4 port unpowered USB 2 hub. I have concers over power consumption when hanging all these devices off my slug, so I may convert this hub to be powered (after a fasion). Bought it due to its minute size.
Difficult to get going, dispite the driver being included in the more recent offical kernels.
Built driver from source, works well. Quality mediocre. uDev makes it accessible via as /dev/video0.
Appears as a USB HID input device.
Standard CMedia usb sound card, drivers included with recent kernels. Madplay works well.
The main storage for the NSLU2 during its operation is a 40Gb laptop hard drive in an IBM branded USB2 enclose (bus powered) which cost about 10GBP, plus a HDD salvaged from a fried MP3 player, and hooked up to the first USB port on the back of the NSLU2.
Complete Debian Etch installation, including X components (though never to run X in anger, many things come with X that are useful, such as fonts).
Using vgrabbj, available for arm via apt, to grab frames, in between 5 and 30 second intervals (depending on if im working on it remotely). Semi live images could be available here: http://1dc.getthekettleon.co.uk/webcam/webcam.html if the thing is on, and hooked up to the net.
Used generiv init scripts and rc-update to make vgrabbj run on start up, with the deamonise option set.
Need to make it start/stop and be generally more intelligent, depending on wether the device is actually present. Perhaps an exists check on the /dev/video0 filesystem.
Tests with madplay have proved mp3 playback to be viable. Not had time to try using this and the video output at the same time. Will probably have to nice the processess controlling the display of images, lest the sound get choppy or something.
Driver does not seem to provide viable framebuffer device (or uDev is getting it wrong). Perhaps I should write one. Oddly enough X11 works (albeit at a snails pace), using the following in xorg.conf Found out that someone else has discovered the driver by Thomas Winishhofer that is available both with the normal kernel packages, and as compiled from the source from his site, does not provide a framebuffer device under kernel version 2.6. No idea why, perhaps i'll take a look at the source from the kernel and figure it out. Useful link regarding framebuffer driver programming: http://www.linux-fbdev.org/HOWTO/4.html.
Driver "sisusb"
First attempts at proof-of-concept rotating gallery scripts.
showjpeg.sh
echo Working on $1 scale $2 jpegtopnm $1 | pnmscale $2 --nomix > outpic.ppm sisbit outpic.ppm
Using –nomix on pnmscale makes it about 95% faster on the slug, presumably due to the lack of floating point hardware. I plan to write a suitable integer scaler of some description if necessary, or alternatively, have my remote hosts3) scale the image via gd and imagepng() it back, as a sort of primitive webservice.
showjpegslideshow.sh
echo JPEG slideshow while true do for fle in ./*JPG do time ./showjpeg.sh "$fle" .3 # time convert "$fle" -scale 1280x1024 outpic.ppm ./showppm.sh outpic.ppm done done exit 0
While I work on sisiframe (when I have hours to dedicate to it), a second task is the conception and creation of a system to allow the digiframe to both interact with users, and to operate in an automated fashion. See presentiframe.
# uptime && cat /proc/cpuinfo 14:29:51 up 18:43, 1 user, load average: 2.53, 2.69, 2.09 Processor : XScale-IXP42x Family rev 1 (v5l) BogoMIPS : 266.24 Features : swp half fastmult edsp CPU implementer : 0x69 CPU architecture: 5TE CPU variant : 0x0 CPU part : 0x41f CPU revision : 1 Cache type : undefined 5 Cache clean : undefined 5 Cache lockdown : undefined 5 Cache format : Harvard I size : 32768 I assoc : 32 I line length : 32 I sets : 32 D size : 32768 D assoc : 32 D line length : 32 D sets : 32 Hardware : Linksys NSLU2 Revision : 0000 Serial : 0000000000000000
# hdparm -t /dev/sda1 /dev/sda1: Timing buffered disk reads: 12 MB in 3.25 seconds = 3.70 MB/sec