DASH7 gateway

Overview

A gateway was set up to receive messages using the DASH7 protocol and forward them over MQTT (Message Queuing Telemetry Transport). The gateway consists of two components: a LiQuiBit IOWAY and a Raspberry Pi. The IOWAY is responsible for receiving the DASH7 messages, but it can only connect to the internet wirelessly. Therefore, the Raspberry Pi, which can support a wired internet connection, is used to provide internet access to the system. The Raspberry Pi and IOWAY communicate with each other using the UART (Universal Asynchronous Receiver/Transmitter) protocol, which is a standard for serial communication transmission of data. Together, the Raspberry Pi and IOWAY receive the DASH7 messages, and the Raspberry Pi forwards them over MQTT.

Raspberry pi

The Raspberry Pi is running a Python script that uses the PyD7A library to convert ALP (Application Layer Protocol) messages into MQTT (Message Queuing Telemetry Transport) packages. The ALP messages are coming from the IOWAY via a serial connection.

The PyD7A library is written in Python specifically designed to work with the DASH7 Alliance Protocol (D7A), which is a wireless communication protocol that uses the ALP as its application layer. It provides functions and classes that can be used to easily parse and encode D7A messages in Python.

In this case, the Python script is using the PyD7A library to convert the ALP messages received from the IOWAY over the serial connection into MQTT packages, which can then be transmitted over a network. This allows the Raspberry Pi to receive the ALP messages from the IOWAY and forward them using the MQTT protocol.

The format of these MQTT packages is determined by the mindsphere IOT platform.

Monit is used to ensure this script keeps running and is started when the Raspberry pi is rebooted. The device also keeps track of all received data in a text file. This can be used for debugging and recovering lost data.

You can find raspberry pi gateway software here.

IOWAY

The LiQuiBit IOWAY is a device that has been repurposed to function as a transceiver for the DASH7 communication protocol. It contains a Wi-Fi chip, but this has been disabled for the current use case. Instead, the device uses a serial to USB chip to transfer ALP (application layer protocol) messages from a microcontroller to a Raspberry Pi. Instructions on how to reprogram the firmware can be found here. Since the device is mounted in an enclosure with the raspberry pi, it is recommended to use a usb a extension cable to connect the IOWAY to your computer when reprogramming.

You can find the IOWAY firmware here.