ESP NOW worked for 1 year but suddenly stopped after Board/Library update!!!



  • Hi, all! I use a M5Stack Core Basic to communicate with two M5Stamp boards, in an HVAC app in my home office. (Using the latest Arduino ver 1.8.19) They all worked perfectly together as a stable solution...however...I had updated all my libraries as available. I wanted to edit a screen text and when I uploaded, the source compiled no problems, but the serial error message was "Failed to add peer" and "Error sending the data". (text messages in my code that I put there last year.

    I had used the official M5Stack board def, so I tried the older ES32 Arduino folder, M5Stack-Core-RSP32, which USED to do the trick. Still no comm and I tried to revert the Board definitions and no joy.
    My basic ESP NOW template is here: https://github.com/teastainGit/ESP_NOWpeer2peer/blob/main/ESPpeer2peer.ino
    I put this code into two StickCPlus, with corrected MAC and it used to work. Push the big button on one and the LED on the other comes on, and the same the other way.
    I am stuck and need help! Thanks, Terry



  • @teastain SOLVED!
    On one hand it did work for several years with ""esp_now_peer_info_t peerInfo;" placed in the void setup() !!!
    After the Board definition, somewhow changed, the project just stopped communicating.
    Researching every line of my program revealed that it should have been before the setup() as a declaration.
    Whew, my desktop application is back on line!



  • Thank you for the update.