Page 1 of 1

Adding peer responders in ESP-NOW

Posted: Wed Jul 17, 2024 3:28 am
by sgarciav
Hi all. I am working on a project that involves ESP-NOW. I have this working, but have a question regarding adding more peers to the ESP-NOW network.

What happens if I add a peer that I've added before?

Is the MAC address added again, creating a duplicate?

Is the add peer function ignored because the MAC address of the new responder is already in the list?

Does the function generate an error because adding an existing MAC to the peers list is not allowed?


Any of the above works for me, as I can handle each case, but I would like to know what happens when I add an existing responder MAC so that coding effort is not over done. Thank you.

Re: Adding peer responders in ESP-NOW

Posted: Wed Jul 17, 2024 8:36 am
by MicroController
esp_now_add_peer(...):
Returns:
...
  • ESP_ERR_ESPNOW_EXIST : peer has existed

Re: Adding peer responders in ESP-NOW

Posted: Fri Jul 19, 2024 3:10 am
by sgarciav
Thanks!

I looked up the error and found the documentation here:

https://docs.espressif.com/projects/esp ... p_now.html

It is almost halfway down the page. Much appreciated! Saga