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

sajjadakhter
Posts: 6
Joined: Tue Mar 17, 2020 4:36 am

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

Postby sajjadakhter » Tue Apr 07, 2020 5:25 am

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

ESP_Alvin
Posts: 120
Joined: Thu May 17, 2018 2:26 am

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

Postby ESP_Alvin » Tue Apr 07, 2020 7:19 am

Moderator's note: edit the topic title for issue tracking, thanks.

zhangyanjiao
Posts: 24
Joined: Mon Aug 28, 2017 3:27 am

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

Postby zhangyanjiao » Wed Apr 08, 2020 8:17 am

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`.

sajjadakhter
Posts: 6
Joined: Tue Mar 17, 2020 4:36 am

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

Postby sajjadakhter » Thu Apr 09, 2020 5:07 pm

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.

zhangyanjiao
Posts: 24
Joined: Mon Aug 28, 2017 3:27 am

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

Postby zhangyanjiao » Wed Apr 29, 2020 3:29 am

We set the number of nodes because of resource constraints, especially for the encrypted node, we need to save the key.

sajjadakhter
Posts: 6
Joined: Tue Mar 17, 2020 4:36 am

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

Postby sajjadakhter » Wed Apr 29, 2020 3:23 pm

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.

zhangyanjiao
Posts: 24
Joined: Mon Aug 28, 2017 3:27 am

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

Postby zhangyanjiao » Wed May 06, 2020 11:41 am

I'm sorry, I don't think there is any conflict between managing the peer list and your application.

sajjadakhter
Posts: 6
Joined: Tue Mar 17, 2020 4:36 am

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

Postby sajjadakhter » Wed May 06, 2020 2:50 pm

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.

zhangyanjiao
Posts: 24
Joined: Mon Aug 28, 2017 3:27 am

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

Postby zhangyanjiao » Fri May 22, 2020 7:17 am

Currently you can't mofify it

Who is online

Users browsing this forum: Bing [Bot] and 25 guests