Update: With the OS2008 update, the hacks I applied to the zebra 0.2
source no longer work. Fortunately, the zebra 0.3, when compiled under
scratchbox seems to work with the provided scripts. However, it does not have
the mirror functionality, so images will appear flipped when the n800 camera
is rotated to face away from the user. I've updated the instructions for
zebra 0.3.
I have not tested the zebra 0.4 version.
The metazine uses the n800 handheld internet tablet running ash shell scripts that wrap the zebracam program, from the zebra barcode library, to scan for barcodes in a tagged paper magazine and play, via mplayer, a corresponding video clip.
The easiest way to compile the zebra libraries for the n800 is to use the Maemo developer environment. Qemu and Vmware virtual machine images are available here, which makes setting up maemo easy.
Once you have the Maemo SDK running, download zebra 0.3 from sourceforge.
Extract the tar file in the maemo user's home directory, and run the configure script. You can disable the use of imagemagick with configure script arguments so that you don't need to install the imagemagick libraries in your Maemo SDK image. We're only interested in building the zebracam binary and the required library, libzebra.so.3.0.0.
Flash your n800 to OS2008, enter red pill mode, and use the application manager to set up the following repositories (not all are necessary for the metazine, but these will be useful to have for other hacking). This is actually the contents of /etc/apt/sources.list.d/hildon-application-manager.list once the repositories have been set up through application manager.
deb http://catalogue.tableteer.nokia.com/certified/ chinook user
deb http://catalogue.tableteer.nokia.com/non-certified/ chinook user
deb http://catalogue.tableteer.nokia.com/updates/chinook/ ./
deb http://repository.maemo.org/extras/ chinook free non-free
deb http://catalogue.tableteer.nokia.com/certified/ chinook user
deb http://repository.maemo.org/ chinook free non-free
deb http://maemo-hackers.org/apt chinook main
deb http://repostory.maemo.org/ chinook free non-free
Use the application manager to install openssh, or use apt-get from an X-terminal, by typing apt-get install openssh.
Use the application manager to install mplayer, or use apt-get from an X-terminal, by typing apt-get install mplayer.
Use scp to copy your compiled zebracam and libzebra.so.3.0.0 to the n800. These files get created in hidden directories under the zebra-0.3 directory. The zebracam executable is found in zebracam/.libs/zebracam. The libzebra.so.3.0.0 library is found in zebra/.libs/libzebra.so.3.0.0. You may need to create a link from libzebra.so.3.0.0 to libzebra.so.3.
Use your favorite text editor to create (on the n800) the following scripts in the directory where your zebracam executable and libzebra.so.3.0.0 libraries are located:
#!/bin/ash
repeat=1
mplayer="/usr/bin/mplayer -msglevel all=0"
scanner=zebracam
while [ $repeat -gt 0 ] ; do
read input
echo launcher got $input
case $input in
"EAN-13: 164626565111")
killall $scanner
$mplayer 164626565111.avi > /dev/null 2>&1
repeat=0
;;
"CODE-128: 3")
killall $scanner
$mplayer 3.avi > /dev/null 2>&1
repeat=0
;;
*)
ps -ef | grep $scanner | grep -v grep > /dev/null
if [ $? -ne 0 ] ; then
exit
fi
echo What can I do with $input\?
echo
repeat=1
;;
esac
done
Change the arguments of the case statements to reflect the codes you've created in your magazine and the names of the videos you've created.
#!/bin/ash
export LD_LIBRARY_PATH=.
scanner="./zebracam"
launcher="./launcher.sh"
while [ 1 ] ; do
echo launching scanner
$scanner 2>>zout.log | $launcher
done
I put this background on the device so that people have something to look
at while the videos are being shuffled around.
Congratulations! You've just built the magazine of the future out of spit and bailing wire.
Last updated on June 05, 2008.
Please send comments to
mhirsch [at] media [dot] mit [dot] edu.
Style by Tom Baran of DSPG.