Comments on: ESP-NOW: Auto-pairing for ESP32/ESP8266 with Bidirectional Communication and Web Server https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 12 Jun 2025 16:41:24 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Tiziano Deodato https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1056974 Thu, 12 Jun 2025 16:41:24 +0000 https://randomnerdtutorials.com/?p=115899#comment-1056974 Hello

I have done some tests (a lot) with a system with three ESP32s:
– master Wemos-Lolin32 with onboard Oled display
– sender 1 ESP32 Wrover-IE Dev-Kit V4
– sender 2 Wemos-Lolin32

For the ESPNOW range tests (to be done) I printed the RSSI of the two channels on the display.
I learned a lot from these tests (on how ESPNOW works) and identified some points to improve.

The tutorial sketchs works well, but it can crash in case of problems with wifi or on restarts.
I made some changes and now it works well (always demo).
Variants on the senders:
I assume that the senders received a message from the master every now and then (time to be set) otherwise they reset.
Variant on the master:
The master resets if the rooter changes wifi channel.

For a safer and more flexible use, other variations should be made:
– the devices (especially the WEB master) should also start without the presence of the rooter so that it can do its job if necessary.
– manage the WiFi reconnection. In the event of a WiFi drop, the automatic reconnection if it is not immediate, practically blocks the ESPNOW network. the retry frequency should be changed, but I don’t know how to do it. Alternatively, manage it from the program.
– provide for the sending of customized messages to individual senders.
– add the watchdog (to be imported from previous projects).

With these variations I think a sensor network could really be used.
At the moment I have managed to modify the sketch for use with OTA and ControlAssist. The future variations that I have in mind I will do on this version.

Regards
Tizianoi

]]>
By: Roger https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1055371 Fri, 06 Jun 2025 12:51:11 +0000 https://randomnerdtutorials.com/?p=115899#comment-1055371 In reply to Tiziano Deodato.

Tiziano,

Thank you for finding a solution to this problem. I also have been using 3.0.7 with one of my projects and will try your suggestion with 3.2.0.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1054947 Thu, 05 Jun 2025 09:54:30 +0000 https://randomnerdtutorials.com/?p=115899#comment-1054947 In reply to Tiziano Deodato.

Hi.
Thanks for sharing your findings.
I need to try to understand what has changed from one version to the other.
Regards,
Sara

]]>
By: Tiziano Deodato https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1054436 Wed, 04 Jun 2025 10:24:10 +0000 https://randomnerdtutorials.com/?p=115899#comment-1054436 Hi
Thanks for this GREAT tutorial.

I started using this code with version 3.2.0 of the ESP32 board and immediately I had the problem already highlighted of the TG1WDT_SYS_RESET.
Problem present only with the “Server” code, the “Sender” works with 3.2.0.
Switching to version 3.0.7 (as suggested) everything started to work perfectly.
Not satisfied with the downgrade of the board I did a LOT of research online without finding a solution. Version 3.0.7 was the last one that worked. So I started doing some tests to find the source of the problem and I think I found it.
Using version 3.2.0 of the board I removed
/*
WiFi.mode(WIFI_STA);
WiFi.STA.begin();
Serial.print(“Server MAC Address: “);
readMacAddress();
*/
and moved the

Serial.print(“Server MAC Address: “);
readMacAddress();

after the “while” that verifies the successful connection to the WiFi.

I’m still studying this code because I would like to use the “ControllAssist” library for the WEB server side.
Library that I used and that allows very simple management.

Greetings

]]>
By: Sara Santos https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1045729 Mon, 19 May 2025 09:44:56 +0000 https://randomnerdtutorials.com/?p=115899#comment-1045729 In reply to TS.

Hi.
Try to replace the string with a char variable.
Regards,
Sara

]]>
By: TS https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1045697 Mon, 19 May 2025 05:06:44 +0000 https://randomnerdtutorials.com/?p=115899#comment-1045697 Hi Sara
Thanks for that great tutorial.
I used that code for my project (esp8266 as sender and esp32 as server) and it worked perfectly well.
However, when i tweaked the structure to send String as one of the variables, the ESP32 shows “Null” as string received. Even, for troubleshooting when i attempt to print the string variable received on ESP32, the ESP32 starts crashing.
I have modified the structure on both Sender and Receiver sides.
Can you advice please?
Thanks

]]>
By: Roger https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1034330 Mon, 05 May 2025 13:58:16 +0000 https://randomnerdtutorials.com/?p=115899#comment-1034330 OK so the CYD is now exchanging information with the ESP8266 but I found that:

(1) If I power down my ESP8266 and then powered it back up, everything synces back up and the exchange of data continues.

(2) However, if I powered down the CYD and powered it back up the exchange of data failed. To get the communications to work again I had to reset the ESP8266. I wanted this to be automatic, so I added a soft reset to the OnDataSend routine. This simple test case works but I may add a little more sophistication to it later.

Regards,
Roger

// Callback when data is sent
void OnDataSent(uint8_t *mac_addr, uint8_t sendStatus) {
Serial.print(“Last Packet Send Status: “);
if (sendStatus == 0){
Serial.println(“Delivery success”);
}
else{
Serial.println(“Delivery fail”);
delay(15000);
ESP.restart();
}
}

]]>
By: Roger https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1034300 Mon, 05 May 2025 10:56:57 +0000 https://randomnerdtutorials.com/?p=115899#comment-1034300 In reply to Sara Santos.

Thanks Sara.

I did get the serial output shown in the tutorial by downgrading the board to 3.0.7. per your instructions. Thanks for that. I am not sure how many tutorials are affected by this but do you think you and Rui should add a comment to the tutorials?

By the way I appreciate all both of you do. I don’t know what I would do without the support of your tutorials.

Thanks so much,
Roger

]]>
By: Sara Santos https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1034296 Mon, 05 May 2025 10:06:20 +0000 https://randomnerdtutorials.com/?p=115899#comment-1034296 In reply to Roger.

Hi.
I think you can use it.
It is just a regular ESP32 board with a display.
Regards,
Sara

]]>
By: Dave Walmsley https://randomnerdtutorials.com/esp-now-auto-pairing-esp32-esp8266/#comment-1034163 Sun, 04 May 2025 21:48:59 +0000 https://randomnerdtutorials.com/?p=115899#comment-1034163 In reply to Roger.

Roger,
I didn’t realize that it was repeating, but even so there should have been a message about why it reset.
As for ESP8266 and a CYD, not I haven’t.
Regards
Dave

]]>