Skip to content

Commit 284d525

Browse files
dosasdosas
andauthored
Fix race condition in esp now communication (#1673)
when calling mac address to fast after setting it happened on ESP32-WROOM-32E with IDF version > 5 Co-authored-by: dosas <[email protected]>
1 parent 22cc923 commit 284d525

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Communication/ESPNowStream.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class ESPNowStream : public BaseStream {
112112
LOGE("Could not set mac address");
113113
return false;
114114
}
115+
delay(500); // On some boards calling macAddress to early leads to a race condition.
115116
// checking if address has been updated
116117
const char *addr = macAddress();
117118
if (strcmp(addr, cfg.mac_address) != 0) {

0 commit comments

Comments
 (0)