Page 1 of 1

ESP-NOW peer private data

Posted: Tue Sep 24, 2019 10:44 pm
by obdevel
I'm trying to understand the purpose of the .priv member of the esp_now_peer_info struct.

I'd like to store some data for each paired peer, e.g. number of send errors, so that I can un-peer unresponsive devices after a set number of errors. Otherwise, I'll need to maintain a separate, parallel list of peers. I'll do this based on the results from the send_data callback.

Can I use this ? e.g. by allocating some memory and attaching it to this pointer ?

Or is it truly private and just for ESP-NOW internal purposes ?

I did try this method and just got crashes when I tried to access my data through the pointer.

Thanks

Re: ESP-NOW peer private data

Posted: Thu Jul 14, 2022 9:17 pm
by dgduncan
Bump as I am trying to figure this out as well.