Whether your device is a Network Access Storage (NAS) or a media player with network capabilities, you may consider adding P2P to allow downloads of files as you would do on your computer.
Two of the most used P2P protocols are BitTorrent and eMule, but most of the client have a UI designed for Linux or Windows and may not be easily ported to an embedded system. So what we need to look for here are command line based clients or daemons that can be compiled and run in an embedded platform.
After some research, here are the 2 programs we’ll use:
Today, I’ll show how to use aMule 2.2.6 in Sigma Designs SMP863X target, for example in Popcorn Hour A-100. But a similar method (just a different compiler mips-linux-gnu-gcc and setting Little endian (-EL)) could also be used for SMP864x/SMP865x devices such as Popcorn Hour A-200 Networked Media Tankand other mips/arm based systems.
Building aMule 2.2.6 daemon and webserver
tar xjvf ../Downloads/aMule-2.2.6.tar.bz2
tar xzvf ../Downloads/zlib-1.2.5.tar.gz
tar xzvf ../Downloads/libpng-1.4.5.tar.gz
tar xzvf ../Downloads/wxWidgets-2.8.11.tar.gz
mkdir crypto++5.6.1 & unzip ../../Download/cryptopp5.6.1.zip
tar xzvf ../Downloads/
Build zlib 1.2.5:
AR=mipsel-linux-ar CC=mipsel-linux-gcc ./configure –prefix=/home/jaufranc/edev/libs
Build libpng 1.4.5:
./configure –target=mipsel-linux –host=mipsel-linux –prefix=/home/jaufranc/edev/libs CFLAGS=-I/home/jaufranc/edev/zlib-1.2.5/ LDFLAGS=”-L/home/jaufranc/edev/libs/lib”
Build wxWidgets without GUI support and with Unicode support:
./configure –host=mipsel-linux –target=mipsel-linux –disable-gui –prefix=/home/jaufranc/edev/libs
Build Crypt++ 5.6.1
AR=mipsel-linux-gcc CXX=mipsel-linux-g++ make
Build libintl (in gettext)
./configure –host=mipsel-linux –target=mipsel-linux –prefix=/home/jaufranc/edev/libs
./configure –target=mipsel-linux –host=mipsel-linux –disable-monolithic –enable-amule-daemon –enable-webserver –disable-ed2k –with-zlib=/home/jaufranc/edev/libs –with-wx-prefix=/home/jaufranc/edev/libs –with-crypto-prefix=/home/jaufranc/edev/crypto++5.6.1 –with-libintl-prefix=/home/jaufranc/edev/libs –with-libpng-prefix=/home/jaufranc/edev/libs –prefix=/home/jaufranc/edev/amule
That’s it you now have amuled (the daemon) and amuleweb (the web server) in the prefix directory.
Installing and running amuled and amuleweb in the target board
Once you have all files installed in the prefix directory (/home/jaufranc/edev/amule in our example), you’ll need to copy those files to the target board (skip man directory) and the dynamic libraries for libintl, zlib, libpng and wxWidgets to /lib inside the root file system (rootFS).
To use aMule, simply use the instructions at http://wiki.amule.org/index.php/HowTo_get_aMule_web_interface then with a web browser in your PC, tablet or smartphone, you’ll be able to access amule web configuration page on your board as follows:
to add ed2k links and monitor the download status.
In part 2, I explain how to build, install and run Transmission BT daemon in an embedded system.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.