Raspberry Pi Variant

RPI
In the Raspberry Pi variant, the adapter is plugged directly onto the Raspberry Pi via the GPIO socket.

Attention! Depending on the adapter version, the socket can also be shorter, but it must always align to pin 1 at the “lower end” of the PCB.

The adapter is supplied with power directly from the Raspberry Pi and communication takes place via the following pins on the Raspberry Pi GPIO:

These pins are assigned to the physical device “serial0”. The physical device is usually assigned to the logical device ttyAMA0, but depending on the Raspberry Pi version and the Raspbian / Raspberry Pi OS version different assignments may take place. The current configuration can be found by executing:

ls -l /dev

and then searching for the mapping of serial0. This is usually either ttyAMA0 or ttyS0.

Since the ttyS0 UART has difficulties with higher baudrates, it is strongly recommended to definitely use ttyAMA0 which is using UART type PL011 where these problems cannot occur.

If serial0 is connected to ttyS0, which occurs mainly with the Raspberry Pi 3 and some Raspbian/Raspberry Pi OS versions, then ttyS0 and ttyAMA0 can be swapped by adding an entry in /boot/config.txt:

dtoverlay=pi3-miniuart-bt

followed by a reboot.

The ebusd device configuration is therefore:

-d enh:/dev/ttyAMA0 --latency=50

If there are no other reasons not to do so, it is strongly recommended to use the enhanced protocol (“enh:”), as this is the only way to ensure compliance with the correct timings on the eBUS. Nevertheless, “latency=50” should be specified so that the ebusd will not run into a timeout caused by some UART drivers.

Configuration with Raspberry Pi OS

By default, the pins required for the eBUS adapter are used by the Raspberry Pi OS for a serial login shell. In order to be able to run the eBUS adapter via this interface instead, this login shell must be disabled.

Attention! If this shell is not completely disabled, it may send uncontrolled data to the eBUS, which may lead to a disruption of the entire bus system.

To disable the serial login shell, the following steps must be carried out (note that the text below may slightly vary depending on the Raspberry Pi OS):

Special UART settings

In some Raspberry Pi versions and/or Raspbian/Raspberry Pi OS versions, no UART is active by default. Therefore it should be checked whether in /boot/config.txt the entry

enable_uart=1

is included. Add if necessary and then reboot.

Attention! If the ttyebus driver is still present, it must be completely uninstalled (https://github.com/eBUS/ttyebus). This driver is not suitable for enhanced protocol.

To verify that the settings are correct, you can run dmesg|grep ttyAMA0, which should print a line like this, that should contain at least the UART PL011:

[    1.138083] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2