Hi All,
I have two M5Stack devices (Core2 - ESP32/D0WDQ6-V3, Dial - M5StampS3/ESP32-S3), one of which (Core2) is integrated into the Arduino Cloud (I'm using the Arduino IDE to program both devices).
The two devices are configured to exchange small packets (well below the 250-byte limit) using ESP-NOW two-way communication.
In particular, Dial "pings" Core2 every three seconds (I use the millis() function to set the desired ping frequency).
Now,
If the ArduinoCloud.update() function is not called, 100% of the pings are successful.
But if the ArduinoCloud.update() function is called, 80% of the pings are unsuccessful.
I've tried to call the ArduinoCloud.update() less often (e.g., every three seconds using the millis() method), but no matter what I do, as soon as it's called somewhere in the Core2's code, pings start being dropped so severely.
Has anyone encountered this behavior?
Thank you.
EDIT1:
If I use the hotspot on my phone instead of my wireless router, the loss of pings when the ArduinoCloud.update() function is called reaches 100%. I also noticed that when the ArduiniCloud.update() function is not called (zero loss of pings), the Core2 does not even connect to the WiFi network. So, ESP-NOW communication seems severely degraded when the Core2 is also connected to a WiFi station.
EDIT2:
I followed this guide and placed both devices on the same WiFi channel of the wireless router (Core2: AP + STATION, Dial: STATION), but the outcome remains the same: 80-90% ping loss.
EDIT3:
Ultimately, I added an M5Stack AtomS3 to the mix, connected via i2c to the Core2. The AtomS3 forwards/converts i2c messages to esp-now messages and vice versa. Everything works, and I'm happy with it.