BananaPI + Raspbian + fhem + 7″ Touch panel

Last week i installed fhem and the 7″ Touch panel from on my BananaPI running the Beta 1 Raspbian with Kernel.

Here’s the setup:

First you have to put the Raspbian Image (downloaded from the Raspbian beta 1 with Kernel 3.19-rc5) on your 8GB SD card (recommended, 4GB also works). You can do this with the Win32DiskImager.

After that, prepare your BananaPi, plug in the hdmi cable and prepare the touchpanel for the first run like in this youtube video.

Start the BananaPI and it should display some startup-code out-of-the-box.

I modified the the config.txt (/boot/config.txt) like this:


hdmi_cvt=1024 600 60 3 0 0 0


Like described here and in this video. But in fact, that did not work, because the gpu does not provide this resolution. It will remain on 1360×768

Install the touch feature:

Here is the original How-To:

sudo apt-get update
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev
tar -zxf xinput_calibrator-0.7.5.tar.gz
cd xinput_calibrator-0.7.5
sudo make install

call the configuration software


The touchpanel is now calibrated but it won’t keep the settings across the reboot. Here is how to fix it :
The software should indicate you some details in the console window. You should see a part like this one :

Section "InputClass"
     Identifier    "calibration"
     MatchProduct    "eGalax Inc. USB TouchController"
     Option    "Calibration"    "121 1917 317 1741"

Create a 01-input.conf file :

sudo nano /usr/share/X11/xorg.conf.d/01-input.conf

Copy paste the previous settings in the file, save and exit.
Your panel should remain calibrated across reboots.
Touch panel only has a single click (obviously), so we have to emulate the right click with a long pressure.
Open the previously created file and copy paste these settings somewhere between Section „InputClass“ and EndSection :

sudo nano /usr/share/X11/xorg.conf.d/01-input.conf
#copy the following text:
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "750"
Option "EmulateThirdButtonThreshold" "30"

Modify parameters as desired.

Virtual Keyboard

There are a few Virtual keyboard software projects, you are free to test a different one.

sudo apt-get install florence
# use german country code:
setxkbmap de

Install fhem


Import repository gpg key:

sudo apt-get install apt-transport-https
wget -qO - | apt-key add -
#If line above does not work (certificate or gpg error), try this:
wget --no-check-certificate -qO - | apt-key add -
#If it stil not works, execute this line before line above again
echo ' "false";' > /etc/apt/apt.conf.d/30nohttps

No you can access fhem via your browser:
Web: :8083
WebPhone: 8084
WebTablet: 8085

BananaPi 7″ Touchdisplay direct connect

Some hints how to connect a 7″ Touch display (the LS-7T from to the lvds connector of the BananaPi

Modify script.bin

Connect Display:

Did not work under Raspbian, because it did not contain a script.bin in the /boot folder

Did not work under Debian. Replaces 50kb script.bin with the ~5mb script.bin…black display, did not work.

Remote desktop on BananaPI

Tested on Lubuntu 3.1

apt-get install vino lxde xrdp
#After installation type the following and do your settings:

Edit  /etc/xrdp/ (i use nano) and change settings:


if [ -r /etc/default/locale ]; then
. /etc/default/locale

#. /etc/X11/Xsession    <----- Type a "#" and insert
. /usr/bin/startlxde

BananaPI route audio over HDMI

Default, audio comes over audio jack, but i wanted to route over hdmi, because i have an AV-Receiver with a high-quality audio engine which should do the transfer from digital to analog signal.
Successfully tested it with Lubuntu 3.1.1 and Bananian.

First, install pulseaudio
apt-get install pulseaudio

Configure your /etc/pulse/ Add the following line at the end:
load-module module-hal-detect
It enables pulseaudio to route sound to hdmi.

At the end, edit your /boot/uEnv.txt and switch from 0 to 1:
How to get there?

#if /mnt doesn't exist, create it by
mkdir /mnt
#type the following, to see, where boot partition is mounted:
#you should see something like /dev/mmcblk0p1. Now mount it:
mount /dev/mmcblk0p1 /mnt
#now you can edit uEnv.txt by
gedit /mnt/uEnv.txt

Compile kernel on BananaPI

Requires SD Card with >=4GB:

    apt-get install git build-essential libncurses5-dev u-boot-tools uboot-mkimage
    cd ~
    git clone --depth 1
    cd linux-bananapi
    make sun7i_defconfig
    make menuconfig
    make -j2 uImage modules
    make modules_install
    mount /dev/mmcblk0p1 /boot
    cp arch/arm/boot/uImage /boot