Tag Archives: Raspberry PI

Raspberry PI: EIB/KNX IP Gateway and Router

Hi,

this Post is a tutorial to build an IP EIB/KNX Gateway based on a Raspberry Pi completely from the scratch. The core components are the eib daemon from the bcusdk in conjunction with the TPUART EIB Bustranceiver module.

The Hardware

3 components are needed:

  • A Raspberry PI
  • A EIB Buscoupling Unit
  • Adapter Board to connecting both

You can use A or the B Model of Raspberry Pi. The eibd daemon has minimal hardware requirements.

There are two possibilities for connecting a computer to the EIB/KNX Bus over a RS232 serial interface. Both are supported by eibd.

  • Buscoupler 2 with FT12 protocol
  • TPUART module

Continue reading Raspberry PI: EIB/KNX IP Gateway and Router

Advertisment to support michlstechblog.info

Raspberry PI: Connecting a HD44780 Display over I2C Bus

Hi everybody,

some application, i.e. XBMC can show informations on a display by using LCDproc as driver.

This post describes a way to connect a HD44780 display to a Raspberry PI  by i2c bus.

Let’s start with the physical layer. This is the overview schematic on how to connect the display to a Raspberry PI.

Connecting a hd44780 Display with Raspberry PI
Connecting a hd44780 Display with Raspberry PI

Based on these I developed small board with a 6 Pin header which is Pin compatible to the Raspberry PI. So a simple 6 pole ribbon cable can be used to connect the HD44780 Display to the fruit.
Here is my PCB. First the schematic.

Board schematic
Board schematic

and my board layout. Unfortunately there are a lot HD44780 models available and the location and the direction of the pins are different, so you have to adapt the layout to the specification of your display.
Continue reading Raspberry PI: Connecting a HD44780 Display over I2C Bus

EIB/KNX: Upstart startup script for eibd

Hi,

as a follow up of the 2 previous posts(compiling eibd and SysV startup script) here is a sample Upstart script for the eibd daemon. Some Ubuntu based distributions uses the upstart start mechanism.

Login as root at your machine where eibd is installed and add a user under  which the eibd process should run.

useradd eibd -s /bin/false -U -M

Create the upstart conf file /etc/init/eibd.conf

#######################################################################
# eibd - startscript for the eibd daemon
description "eibd daemon Upstart script"
author "Michael Albert info@michlstechblog.info"

start on (filesystem or resume)
stop on (suspend or runlevel [!2345])
expect fork
normal exit 0

pre-start script
route add 224.0.23.12 dev eth0 2>&1 > /dev/null || true
end script

script
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/eibd
DAEMON_OPTS="-d -D -T -R -S -i -u --eibaddr=1.1.128 ipt:192.168.56.1"
exec start-stop-daemon --start -c eibd --exec $DAEMON -- $DAEMON_OPTS
end script

post-stop script
route delete 224.0.23.12 2>&1 > /dev/null || true
end script
#######################################################################

Continue reading EIB/KNX: Upstart startup script for eibd

KNX/EIB: System V startscript for eibd

Hi,

in a previous post I have descriped how to compile the eibd daemon for the Raspberry PI. Here is a sample debian startscript to start eibd at system boot.

Login as root at your EIBd box and  created a user under which the daemon should run.

useradd eibd -s /bin/false -U -M

Create the script eibd in /etc/init.d
Continue reading KNX/EIB: System V startscript for eibd

Raspberry PI: Cross compiling the KNX/EIB eibd

Hello,

if you want to use the Raspberry PI as a EIB/KNX Gateway or Tunnel you must compile the eibd sources from the scratch, because no precomplied binaries are currently available.

There are two ways to build the eibd. Compiling directly on the Raspberry PI or you compile it on your i386 PC. The last option means you have to “cross” compile the sources, because the RapsberryPi has a different processor architecture than your Intel/AMD PC. Here are the steps to build the eibd on an i386 using a crosscompiler for the ARM architucture.

I verfied the steps at a minimal debian system in a VirtualBox. So it is reproducible:-)

Install all necessary packages. Login as root

apt-get -y install git rsync cmake make gcc g++ binutils automake flex bison patch
Now you can Login as a “normal” user. Define a working folder
export BUILD_PATH=~/eibdbuild
mkdir -p $BUILD_PATH
cd $BUILD_PATH
We need a cross compiler respectively the toolchain for the arm1176jzf arm processor.
Continue reading Raspberry PI: Cross compiling the KNX/EIB eibd