ESP-NOW Encrypted Master

the-wal
Posts: 3
Joined: Tue Dec 21, 2021 1:22 am

ESP-NOW Encrypted Master

Postby the-wal » Tue Dec 21, 2021 2:21 am

Hello and thank you in advance for your time.
I have been using ESP-NOW for years with my sensor network of door sensors and remote controls.
I have been sending the data unencrypted without any issues, but I want to migrate to using encrypted data.
Currently the ESP32 sensor boots and send an unencrypted packet to address 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF and goes to sleep.
The slaves receives this packet and registers the peer.

When the sensor wakes from deep sleep it sends the packet to the receivers address eg 0xD8, 0xA0, 0x1D, 0x54, 0x6E, 0xBC as an encrypted packet.

The problem I am having is if the slave gets reset between when the master was registered and wakes from deep sleep, the master will no longer be registered on the slave.

In both cases when the master send’s the packet it returns esp_err_t of 0 and the OnDataSent call back returns Delivery Success.
The problem if the slave was reset the OnDataRecv call back does not execute because the packet is encrypted and the master was not registered. And the master has no idea it did not get processed.
Any ideas?
Thanks again.

Who is online

Users browsing this forum: No registered users and 56 guests