Page 1 of 1

esp-now and number of nodes [WIFI-2126]

Posted: Tue Apr 07, 2020 5:25 am
by sajjadakhter
i am building application that will have one master and many salves those will need to synchronize with master after every few min.
I read esp-now has 20 peer node max limit, two questions i have

1. Do i have to add node to my peer list to send message? can i just send message without adding to peer list. Can i reieve message from node that's not in my peer list?
2. Can i add node to my peer while i need to communicate and remove after wards so that i can communicate with other nodes. Then i readd once i am expecting to talk to node again.

In my this application i can drive most of the communication initiated by master except the case when salve mode when starting up.

Thanks,
Sajjad

Re: esp-now and number of nodes [WIFI-2126]

Posted: Tue Apr 07, 2020 7:19 am
by ESP_Alvin
Moderator's note: edit the topic title for issue tracking, thanks.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Wed Apr 08, 2020 8:17 am
by zhangyanjiao
hi sajjadakhter,
1. Do i have to add node to my peer list to send message? can i just send message without adding to peer list. Can i reieve message from node that's not in my peer list?
Yes, you have to add node to the peer list, otherwise, `esp_now_send()` will return error, but you can receive message from node that's not in peer list.
2. Can i add node to my peer while i need to communicate and remove after wards so that i can communicate with other nodes. Then i readd once i am expecting to talk to node again
Yes, you can add peer with `esp_now_add_peer()` and delete it with `esp_now_del_peer`.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Thu Apr 09, 2020 5:07 pm
by sajjadakhter
Then why there is limit of number of nodes, is it to help with broadcast to all nodes? I don't understand why there is limit of peers especially if I don't need it to receive message.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Wed Apr 29, 2020 3:29 am
by zhangyanjiao
We set the number of nodes because of resource constraints, especially for the encrypted node, we need to save the key.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Wed Apr 29, 2020 3:23 pm
by sajjadakhter
why not allow a Send with key as parameter instead of managing peer list. This way user of the API can decide how to manage peers. In my case i could use NVS to store all the peer info as it only need to send messages occasionally.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Wed May 06, 2020 11:41 am
by zhangyanjiao
I'm sorry, I don't think there is any conflict between managing the peer list and your application.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Wed May 06, 2020 2:50 pm
by sajjadakhter
Well it would be much cleaner interface, where can i find sources for esp-now and how can i modify it?. In my case i have quite a few peers but those are configured and saved to nvs/flash. So there is no point of keeping such list dynamic /in memory.

Re: esp-now and number of nodes [WIFI-2126]

Posted: Fri May 22, 2020 7:17 am
by zhangyanjiao
Currently you can't mofify it