Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parserutils.php on line 208

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parserutils.php on line 211

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parserutils.php on line 421

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parserutils.php on line 594

Deprecated: Function split() is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/auth.php on line 154

Warning: Cannot modify header information - headers already sent by (output started at /var/hosting/darkhalf/public_html/wiki/inc/parserutils.php:208) in /var/hosting/darkhalf/public_html/wiki/inc/auth.php on line 245

Warning: Cannot modify header information - headers already sent by (output started at /var/hosting/darkhalf/public_html/wiki/inc/parserutils.php:208) in /var/hosting/darkhalf/public_html/wiki/inc/actions.php on line 141
slug:digiframeslug [Get the kettle on Projects Wiki]
 

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/parser.php on line 66

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/lexer.php on line 299

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 24

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 51

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 215

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 243

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 305

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 338

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/handler.php on line 585

Deprecated: Function split() is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/metadata.php on line 296

Deprecated: Function split() is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/metadata.php on line 296

Deprecated: Function split() is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/metadata.php on line 296

Deprecated: Function split() is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/metadata.php on line 296

Deprecated: Function split() is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/metadata.php on line 296

Deprecated: Assigning the return value of new by reference is deprecated in /var/hosting/darkhalf/public_html/wiki/inc/parser/xhtml.php on line 918

DigiFrameSlug V1

Introduction

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.

The Team

  • Doug Barry
    • Everything really.

Hardware

Linksys NSLU2

For an explanation on the slug, and for links to further material, please see slug.

Figure 2: Linksys NSLU2.
Image Copyright Linksys.


Sweex MicroHub

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.

20070426084841.jpg

USB2VGA Adpator

Difficult to get going, dispite the driver being included in the more recent offical kernels.

usb2vga.alarge.jpg

Logitech QuickCam Express

Built driver from source, works well. Quality mediocre. uDev makes it accessible via as /dev/video0.

Creative MediaSource USB IR Remote

Appears as a USB HID input device.

Terratec USB 5.1 Audio

Standard CMedia usb sound card, drivers included with recent kernels. Madplay works well.

Building it

The Slug

  • Stage 1: Storage

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.

  • Stage 2: Operating System

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).

  • Stage 3: Webcam set up

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.

  • Stage 4: Daemonise…

Used generiv init scripts and rc-update to make vgrabbj run on start up, with the deamonise option set.
FIXME 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.

  • Stage 5: Sound?

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.

  • Stage 6: USB2VGA

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"
  • Stage 7: Image manipulation and display programs
    • imagemagijk
    • gd
    • netpbd suite
    • feh
    • fbida
    • sisbit
    • sisiframe - Software I am working on, utilitise some code from sisbit. ← I am rubbish at c so this is on hold for the moment. However presentiframe metioned below is doing quite well.
 
  • Stage 8: A script here, a script there…

First attempts at proof-of-concept rotating gallery scripts.

Figure x: Processor usage during a slideshow, with low quality pnmscale running.

Video of demo slideshow here: http://getthekettleon.co.uk/videos/slug-usbvga-slideshow-demo1.avi

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
  • Stage 9: Control and Presentation programming


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.

  • presentiframe can currently:
    • Queue slide items
    • load slides from remote sources, with local cache. Sources include:
      • My gallery with remote scaling (to save the slugs cpu cycles)
      • Penny Arcade Comics, with support for most recent, or any of the back catalog
      • xkcd Comics, with support for most recent, or any of the back catalog.
      • Dynamically generated analog or digital clocks.
    • Advance through queue automatically
    • supports multiple queue styles (loop, random, once)
    • run for 30hours+ (tested) without any ill affects!
  • Current code will soon be semi-available on the presentiframe page.



  • Stage X: The future

Additional Info:

Example console output:

  • uptime and cat /proc/cpuinfo
# 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
# hdparm -t /dev/sda1
/dev/sda1:
 Timing buffered disk reads:   12 MB in  3.25 seconds =   3.70 MB/sec

Using it

In picutres

1) All HTML and programatical content copyright Doug Barry, 2007-2009. Any referenced material is copyright its indicated owner.
2) SiS Chipset over USB
 
slug/digiframeslug.txt · Last modified: 2008/12/21 22:54 by dougbarry
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki