ESP-NOW peer private data

obdevel
Posts: 2
Joined: Tue Sep 24, 2019 10:20 pm

ESP-NOW peer private data

Postby obdevel » Tue Sep 24, 2019 10:44 pm

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

dgduncan
Posts: 15
Joined: Wed Jan 12, 2022 4:47 pm

Re: ESP-NOW peer private data

Postby dgduncan » Thu Jul 14, 2022 9:17 pm

Bump as I am trying to figure this out as well.

Who is online

Users browsing this forum: No registered users and 142 guests