[SOLVED] ESP8266 gateway with RFM69 - WDT issues



  • I am trying to build a ESP8266 gateway with RFM69 (specifically RFM69CW), but no matter what I do, the ESP module crashes with a WDT error as soon as the node sends traffic. LED's and INCLUSION features are turned off.
    I consider the radio modules to be working, since they work fine if I connect the modules to two different Arduino Pro Mini's and load the Node and Gateway sketches from https://github.com/LowPowerLab/RFM69/tree/master/Examples
    ESP8266 is powered from a reliable power source, through an AMS1117 with 470 uF cap, and an additional 4.7uF cap across VCC/GND on the RFM69 and a 100nF across VCC/GND on the ESP. I use similar setups for other ESP8266's that's running reliable.

    More or less the only possible reason for the crash, I can come up with, is a bug in the MySensors RFM69 code, or an issue with interrupt handling on the ESP (and the specific pin I choose). As I understand the RFM69 uses DIO0 to trigger an interrupt on the ESP, when data is received. My Arduino IDE version is 1.6.5 and I tried both the 2.0 2.1RC2 board manager. A similar setup using NRF24 modules works fine

    So, could someone with a working ESP8266/RFM69/MySensors 2.0beta please share their working sketch (ethernet or MQTT) and wiring of the RFM69 to the ESP? At the moment I am using GPIO 4 on the ESP for DIO0, but https://github.com/hallard/NodeMCU-Gateway seems to the GPIO 2 - however using GPIO 2 the ESP won't boot - even with a 10k pulldown resistor, so I assume DIO0 is active low and pulls up GPIO 2

    • Jan


  • After adding another yield() to RFM69.cpp everything works. I have created a pull request to have this added to the code
    https://github.com/mysensors/Arduino/pull/396



  • @chrille - would you mind posting a diagram of your wiring? I'm looking at doing the same, but haven't been able to get it to work. Thank you in advance!



  • @thebillplease said:

    @chrille - would you mind posting a diagram of your wiring? I'm looking at doing the same, but haven't been able to get it to work. Thank you in advance!

    RFM69 <-> ESP8266:

    DIO0 <-> GPIO4
    SCK <-> GPIO14
    MOSI <-> GPIO13
    MISO <-> GPIO12
    CS <-> GPIO15 (AKA NSS)

    And of course GND + VCC

    Another forum user asked for the actual sketches I used for testing - I put them on github: https://github.com/janchrillesen/arduino-stuff
    The gateway sketch also has the wiring in the comments section in the top



  • Thank you! @chrille !! Much appreciated.


Log in to reply
 

Suggested Topics

23
Online

11.2k
Users

11.1k
Topics

112.5k
Posts