Hyperion (Ambilight) on BananaPi (Raspbian v1412) with external

share by xefil

Hello to all,

After following some hints and guides on the net, I would like to post my experience and how-to I’ve setup Hyperion on BananaPi (OS: Raspbian) to work as server with an external XBMC. Yes, XBMC is installed as separate server on a differrent mini-pc. Actually I’ve not definetly moved XBMC on BananaPi. Let’s start!

Hardware: BananaPi Led: WS2801 led pixel strip with CIP model 5050 Power Supply: 5V - 10A external power adapter. Do not power the leds with the B-Pi!

First some informations on how connect the LED strip. It’s the same as posted on a R-Pi guide, so I’ll post the same image, a little modified:

Due these leds are SPI, it’s important that the strip starts with the connection to the Power Supply and ends with BananaPi as terminator!

Back to software. I’ve updated the system and installed the needed packages

apt-get update
apt-get install git cmake build-essential libprotobuf-dev libQt4-dev libusb-1.0-0-dev protobuf-compiler python-dev

Then installed g++ 4.7 due compilation errors using the default one.

apt-get install g++-4.7
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20
update-alternatives --config gcc
update-alternatives --config g++

After, cloned the hyperion repo (remember to set recursion or not the whole project would be downloaded)

export HYPERION_DIR="hyperion"
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
mkdir hyperion/build
cd hyperion/build

Create some directories and copy the files to the final place:

mkdir /opt
tar -C /opt -xzf ../deploy/hyperion.tar.gz
ln -fs /opt/hyperion/config/hyperion.config.json /etc/hyperion.config.json

Remove the Raspberry-Pi files and copy the compiled ones:

rm /opt/hyperion/bin/*
cp ./bin/hyperion-remote /usr/bin/
cp ./bin/hyperiond /usr/bin/

Now we need to load the SPI device:

modprobe spi-sun7i

Add ‘spi-sun7i’ as new line to ‘/etc/modules’ to load it on every boot.

Using HyperCon we can easly setup the LED strip:

wget https://raw.github.com/tvdzwan/hypercon/master/deploy/HyperCon.jar
java -jar HyperCon.jar

Set up the led numbers (horizontal, vertical and direction) and save the file to -> /opt/hyperion/config/hyperion.config.json

We can add now the service at boot:

ln -fs /opt/hyperion/init.d/hyperion.init.sh /etc/init.d/hyperion
chmod +x /opt/hyperion/init.d/hyperion.init.sh
update-rc.d hyperion defaults 98 02

And start the service:

service hyperion start

A ranbow effect should be shown for some seconds.

We can now test hyperion from a console executing:

hyperion-remote -e "Blue mood blobs"

On the XBMC server I’ve installed this plugin and pointed to the BananaPi/Hyperion server IP address: https://github.com/tvdzwan/hyperion/wiki/XBMC-addon-(not-for-RPi)

And, if you want, you can control the Hyperion server from your iPhone with this app. It works great!

App for Android available as well. :wink:

Here the steps I’ve followed to create a little wooden frame where I’ve attached the LEDS:

And here a video result:

link: http://www.lemaker.org/thread-15257-1-1.html

Hi, i try to compile on banana pi m2 berry with raspbian image: Linux version 3.10.107-BPI-M2U-Kernel but i get some linker errors:

    [ 39%] Linking CXX executable ../../../../bin/protoc
/usr/bin/ld: ../../../../lib/libprotobuf.a(common.cc.o): undefined reference to symbol 'fflush@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libc.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
dependencies/external/protobuf/src/CMakeFiles/protoc_compiler.dir/build.make:97: recipe for target 'bin/protoc' failed
make[2]: *** [bin/protoc] Error 1
CMakeFiles/Makefile2:561: recipe for target 'dependencies/external/protobuf/src/CMakeFiles/protoc_compiler.dir/all' failed
make[1]: *** [dependencies/external/protobuf/src/CMakeFiles/protoc_compiler.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

what can i do to solve this? i read that i have to set the follow linker flags: -ldl -lutil but i dont know how , can somebody help me? i try all compilers g+±4.7 ,g+±4.8 ,g+±4.9 thanks!