ESP_NOW_Broadcast_Slave unable to handle more than 1 master #11165
Labels
Area: ESP-NOW
Issues and Feature Request about ESP-NOW Protocol
Status: Needs investigation
We need to do some research before taking next steps on this issue
Board
XIAO_ESP32C3
Device Description
Plain XIAO_ESP32C3
Hardware Configuration
WIFI
Serial
Built-in LED (GPIO 8)
Version
v3.0.7
IDE Name
Arduino IDE
Operating System
ArchLinux
Flash frequency
80
PSRAM enabled
yes
Upload speed
921600
Description
I adopted the example of
libraries/ESP_NOW/examples/ESP_NOW_Broadcast_Slave/ESP_NOW_Broadcast_Slave.ino
and proceed to setup 2 masters. It works fine with 1 master. Once the 2nd master started transmit and the slave registered it, it stop reacting to the first 1 master, as if nothing was received. I use the example as a push button remote control, and it's only transmitting one at a time when I was testing back and forth.The master code is the same as the example except it transmit every 10ms continiously when the button is pressed.
I then found example online that uses the
esp_now
library directly instead of throughESP_NOW
as per the example, and directly registering the callback usingesp_now_register_recv_cb
, then I was able to see messages from both the masters, while still using the same example code for master.I couldn't figure out what went wrong in the slave example, but I suspect something within the
vector
or the peer registration that prevents the callback from working. Or that only 1 copy of ccallback is supported byesp_now
?Sketch
Debug Message
Other Steps to Reproduce
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: