I'm sure the problem I am seeing is something experienced by others trying to get ESP8266 devices to communicate using esp_now. I have spent many hours searching for answers to no avail
The setup is relatively simple with two ESP8266 devices, 1 as MASTER (sends data) and 1 as SLAVE (receives data). Using Arduino 1.8.9 and v2.5.2 in the ESP8266 boards manager. The project is for a sensor that collects data and sends to the SLAVE.
The devices start up fine and the SLAVE creates a softAP, inits the esp_now, registers a recv callback and waits for data.
The Master inits esp_now, sets its own role as Controller and adds the Slave peer with role as Slave. It then loops and sends data every 10 secs. No encryption used on the esp_now setup
if at the end of the loop section I use a delay(10000) [let's call this mode 1] then the Slave receives and prints every send from the Master
However, if at the end of the loop section I use a deep_sleep for 10 secs [Let's call this mode 2] then when the device restarts and sends data it is not received/displayed by the Slave.
I have tried deleting the peer before the Master goes to sleep but still get the same results.
Interestingly with "mode 1" if the Master device is restarted then packets are also no longer received by the Slave.
If the Slave device is restarted using the reset button then it will receive and display one and only one packet of data from the Master.
The Master sets up the esp_now in the same way when it restarts.
It seems like the Slave is somehow blocking or not receiving packets.
I have used this great example as the basis of the Master
Any thoughts are welcomed and I guess a few straight forward questions
Does the Slave softAP hold any details for incoming packets about a device?
Does the esp_now "add_peer" store anything about the relationship at the Master
Does anyone know about/have any means to monitor whats happening on the softAP - I have tried setting debug out on via the IDE (WiFi.printDiag(Serial); and Serial.setDebugOutput(true) without anything meaningful.