Embedded Radio-to-IP Gateway (ESP)

About ESP-based Radio-to-IP gateway solutions

The RFM library problem

Currently, there seems to be no firmware based on vanilla top dog libraries like the LowPowerLab RFM69 library by Felix Rusu or the RadioHead library by Mike McCauley.

Update: Both the LowPowerLab RFM69 library by Felix Rusu and the RadioHead library by Mike McCauley seem to work with the ESP8266. Read on my dear…

Introduction

See also:
https://github.com/hallard/NodeMCU-Gateway/issues/3
https://github.com/hallard/NodeMCU-Gateway/issues/4

hallard commented Jun 5, 2016

For now I’m using custom firmware not yet released because it’s really dedicated to works with ULPNode and it’s under testing. It’s using modified version of RadioHead Library to support RFM69 module on ESP8266.

As soon all is stable it will be released.

palitu commented Jun 6, 2016

Thanks, really like the idea of a RFM-to-ESP gateway. Currently i have just
piggybacked an ESP onto an emonTX, via serial. Would love to utilize the
ESP gateway, but struggling to find a decent RFM library to use on it.

State of the onion

However, there seems to be much progress for RadioHead, as Mike McCauley writes in the changelog of the RadioHead library:

ESP8266 on Arduino IDE and Boards Manager per GitHub - esp8266/Arduino: ESP8266 core for Arduino. Tested using Arduino 1.6.8 with esp8266 by ESP8266 Community version 2.1.0. Examples serial_reliable_datagram_* and ask_* are shown to work.

  • 1.54 2016-01-29 Added support for ESP8266 processor on Arduino IDE. Examples serial_reliable_datagram_* are shown to work. CAUTION: SPI not supported yet. Timers used by RH_ASK are not tested. The GHz radio included in the ESP8266 is not yet supported.

  • 1.56 2016-02-18 Implemented timers for RH_ASK on ESP8266, added some doc on IO pin selection.

  • 1.60 2016-06-25 Added support for ESP8266 SPI, provided by David Skinner.

  • 1.61 2016-07-07 Patch to RH_ASK.cpp for ESP8266, to prevent crashes in interrupt handlers. Patch from Alexander Mamchits.

  • 1.74 2017-03-08 Added documentation about how to connect RFM69 to an ESP8266. Tested OK.

RFM-to-WiFi gateway hardware

We already found some decent hardware solutions, the board by Charles Hallard is looking most promising.

Hallard Gateway


Firmware status: Charles Hallard currently does not provide any firmware.

Ebulobo Gateway

Firmware status: The RFM69 library for the Ebulobo Gateway by James Coxon seems to be based on both the RadioHead library and the LowPowerLab RFM69 library:

// Based on RF22 Copyright (C) 2011 Mike McCauley ported to mbed by Karl Zweimueller
// Based on RFM69 LowPowerLabs (https://github.com/LowPowerLab/RFM69/)

Espism Gateway

Firmware status: Johan Kanflo ported Andreas Heßling’s STM32 RFM driver to the ESP Open RTOS. However, when looking at his mqtt_sniffer, the ported driver seems to be missing.

Tinkerman Gateway

Firmware status: Xose Pérez says in his RFM69 WIFI Gateway article:

Felix’s LowPowerLab RFM69 library was compatible with the ESP8266 almost without modification!

See also: [Update] RFM69 Library for ESP8266 - Moteino Compatible!

  • UPDATE [2016-08-26]: Modify RFM69.cpp file to change SPI clock divider to 2. In my tests this results in a great improvement when sending ACKs (or any other message). This is the patch you should apply on the file:
diff --git a/RFM69.cpp b/RFM69.cpp
index a1e1eeb..ad2e30b 100644
--- a/RFM69.cpp
+++ b/RFM69.cpp
@@ -450,7 +450,7 @@ void RFM69::select() {
   // set RFM69 SPI settings
   SPI.setDataMode(SPI_MODE0);
   SPI.setBitOrder(MSBFIRST);
-  SPI.setClockDivider(SPI_CLOCK_DIV4); // decided to slow down from DIV2 after SPI stalling in some instances, especially visible on mega1284p when RFM69 and FLASH chip both present
+  SPI.setClockDivider(SPI_CLOCK_DIV2); // speeding it up for the ESP8266
   digitalWrite(_slaveSelectPin, LOW);
 }
  • Initialize the RFM69_ATC object (or the RFM69, whichever you use) passing the SS and interrupt pins.
RFM69_ATC radio = RFM69_ATC(SPI_CS, IRQ_PIN, false, IRQ_NUM);

someburner firmware

Jeff Hufford also provides a “Driver + Interface for RFM69 on ESP8266”:


LoPy

Introduction

@clemens started working on a LoPy-based solution for a LoRa-to-WiFi gateway. The LoPy uses an ESP32 MCU.

Status quo

The status quo is a work in progress, sorry! However, he was able to do some range testing already.

See also