About AVR-based Radio-to-IP gateway solutions
As the top dog RFM libraries like the
LowPowerLab RFM69 library by Felix Rusu and the RadioHead library by Mike McCauley used to work best on the AVR, this is currently the most stable variant implementing such a gateway. All implementations showed here have these attributes in common:
Send radio messages from the sensor node
Receive radio messages on the gateway side
Forward them to the UART interface of the AVR
Receive messages from the UART interface on a SoC machine
Translate and forward them to TCP/IP, preferably by publishing them to the MQTT bus
We are using the
BERadio C++ library to serialize radio message payloads on the MCU side and decode them on the SoC side using its counterpart BERadio Python, which translates and forwards them to the MQTT bus. The JeeLink is plugged into a RaspberryPi SoC machine.
Generic firmware” can be used on the sensor node as well as on the gateway side. For some documentation about it, see also:
“generic” firmware is a flexible software breadboard for AVR-based sensor-, transceiver- and gateway-nodes. It is using the RadioHead and BERadio C++ libraries for ISM radio transmission. The fine Arduino-Makefile is used for the build process.
The intention is to have a single source code for a firmware capable running on the sensor node, the protocol transceiver and the gateway side for making a multihop FSK scenario reality (RFM69 -> RFM95 -> UART -> MQTT).
The different ro…
The most simple thing is to use a JeeLink USB dongle:
The JeeLink is a fully assembled and ready-to-use USB-type “stick” which plugs directly into a PC, Mac or USB hub. It contains Atmel’s ATmega328p AVR microprocessor, HopeRF’s RFM69CW wireless radio module and a branded FT232R USB interface chip.
The JeeLink v3c also has 16 Mbit of flash memory, which can be used to collect data. An accurate (10 ppm) crystal helps keep track of time, even when the attached computer is sleeping.
The on-board wireless radio module can interop…
JeeLink with RFM69
The JeeLink can be ordered with HopeRF’s RFM69CW wireless radio module. Plug & play! See
The JeeLabs Shop - JeeLink (v3c). JeeLink with RFM95
However, it is possible to solder a corresponding HopeRF RFM95 (LoRa) module. This is what we are actually using at
one of our sites. See also:
Generic firmware for RFM69 and RFM95 (LoRa)
Welcome to the
“generic” firmware, a flexible software breadboard for sensor-, transceiver- and gateway-nodes. This is now based on the RadioHead and BERadio C++ libraries for radio transmission. For building it, we switched to the fine Arduino-Makefile.
The intention is to have a single firmware capable running on the sensor node, the protocol transceiver and the gateway side for making a multihop FSK scenario reality (RFM69 -> RFM95 -> MQTT).
You can achieve similar things by building the same on a breadboard or using custom soldering.
The “LinkIt Smart 7688 Duo” is a promising platform as it combines a MIPS MPU with a WiFi module running a full fledged Linux with an AVR MCU, see:
LinkIt Smart 7688 Duo
The Smart Duo combinates a MIPS MPU with an Atmel MCU. Is has WiFi on board and is able to host USB. There are targets for OpenWRT/LEDE and it comes preinstalled with such. You can run Python and Node.js on this device.
The LinkIt Smart 7688 Duo (a compact controller board) is an open development board based on the MT7688 (
datasheet) and the ATmega32u4. The board is compatible with Arduino Yun sketches and is based on the OpenWrt Linux distribution. As it is compatible wi…
Using this, we can get rid of the Raspberry Pi as a gateway machine.
@einsiedlerkrebs unlocked this for us, cheers! See also:
The general idea about this setup is to use the
LinkIt Smart 7688 Duo as WiFi gateway for the RFM95 radio on the hardware layer and as UART-to-MQTT gateway on the transport layer. Since the 7688 is capable of running LEDE/ OpenWrt and Python, BERadio should work out of the box.
The Duo comes with the ATmega32U4 as a realtime processor for the radio. LEDE has AVRDude on board so it can flash the ATmega with .hex files. This is the corresponding boards.txt.
– However, there are currently two minor drawbacks: –
– Have to disconnect RFM chip before flashing the AVR, – Jumpers needs to be placed on SPI-Bus, for disconnecting radio during flashing.
– Mechanical robustness regarding durability (breadboard vs. soldering).-- Radio works stable if soldered.