Please continue reading this document on our documentation space, all inline links will be working there.
A flexible software breadboard for sensor-, relay-, and gateway-nodes, transmitting telemetry data in multi-hop radio link environments. It is a hybrid/unified single-file firmware multihop.ino, with an accompanying configuration settings header file, config.h.
The system has originally been conceived for beehive monitoring, but can be used for other environmental monitoring purposes.
The firmware has been primarily conceived for MCUs of the AVR microcontroller family, specifically the Atmel ATmega328 (now Microchip), in form of the vanilla Arduino Uno, the JeeLink v3c, and with a spin-off to the LinkIt Smart 7688 Duo.
The firmware serves different purposes, you can configure it as a »sensor node«, »telemetry relay node«, or »network gateway node«.
A sensor node collects sensor data, encodes it using BERadio, and sends it through a RFM69 radio module directly to a network gateway node, or to an intermediary telemetry relay node.
A telemetry relay node receives radio signals on RFM69 and emits them to RFM95 (LoRa). The messages are processed opaque, no decoding takes place here.
The network gateway node receives RFM95 (LoRa) radio signals and emits the message payloads to its UART interface connected to the gateway computer.
The gateway computer, for example a Linux machine like the Raspberry Pi, is running the BERadio forwarder application. It will decode the data according to the BERadio specification, and forward it to the TCP/IP network using the MQTT protocol, serialized as JSON dictionary.
Build on your workstation#
# Acquire source code repository.
git clone https://github.com/hiveeyes/arduino
# Select this firmware.
# Build firmware.
# Upload to MCU.
Please inspect the
platformio.ini file, and adjust it to match your setup.
In order to configure and build the firmware for different operation modes (node vs.
relay vs. gateway), the PlatformIO configuration file
provides corresponding environment sections, which you can adjust to your needs.
Try those commands to invoke builds for the individual target environments:
# Activate Python virtualenv, where your PlatformIO installation lives.
# Run build for individual environments.
pio run --environment=node-rfm69
pio run --environment=node-rh69
pio run --environment=relay
pio run --environment=gateway-rh69
pio run --environment=gateway-rh95
pio run --environment=gateway-rh95-linkit7688
In order to adjust individual build flags for your setup, we recommend to add a custom
environment section to the
platformio.ini file. Alternatively, you can build with
a custom configuration settings header file, using the
You can also invoke the build by defining
build_flags on the command line, like:
PLATFORMIO_BUILD_FLAGS="-D CUSTOM_CONFIG=config_foobar.h" pio run --environment=relay