Page 1 of 1

Will ESPNOW work with WIFI simultaneously

Posted: Mon Aug 23, 2021 3:06 pm
by rwel59
Haven't been able to find any definitive info that espnow and wifi will work together. Passing data between esp32's seems to work well using espnow. But I also need access to the data via web.

I know that I can probably cobble something together but I need a robust solution.

Is the technology capable of simultaneous espnow + wifi? If so, is there any documentation describing how this would work.

Re: Will ESPNOW work with WIFI simultaneously

Posted: Tue Aug 24, 2021 6:01 am
by ESP_Sprite
Yes, it works, with the caveat (iirc) that the channel the access point is on and the ESPNow channel should be the same.

Re: Will ESPNOW work with WIFI simultaneously

Posted: Fri Aug 27, 2021 9:49 pm
by rwel59
thanks, I've managed to get it to work and it seems stable. The system includes multiple esp32's sending data to a 'master' using espnow. The master is connected to wifi.

I need to dynamically set the channel based on the wifi network that I connect to. This seems to work fine also.

The master and slave devices need to find each other by broadcasting. I am struggling to define a strategy where the master/slave devices can discover each other when the channel may change depending on the wifi network. Any thoughts?

Re: Will ESPNOW work with WIFI simultaneously

Posted: Sat Aug 28, 2021 1:46 am
by ESP_Sprite
rwel59 wrote:
Fri Aug 27, 2021 9:49 pm
The master and slave devices need to find each other by broadcasting. I am struggling to define a strategy where the master/slave devices can discover each other when the channel may change depending on the wifi network. Any thoughts?
You could send out a 'ping' or keepalive packet out from one side every now and then, e.g. every second or so. If the other side doesn't see the 'ping' packets, shut down STA mode if needed (so you can change channels) and listen on each WiFi channel for a second or two, see if the other side migrated there.

Re: Will ESPNOW work with WIFI simultaneously

Posted: Sat Sep 18, 2021 12:30 am
by rwel59
this ended up working pretty well and is very stable. I find the channel of the wifi ap then broadcast a message to all channels indicating which channel will be used for espnow connection (same channel as wifi ap) and each slave device then sets its channel to this.

Re: Will ESPNOW work with WIFI simultaneously

Posted: Mon Dec 05, 2022 12:33 pm
by davnec
rwel59 wrote:
Sat Sep 18, 2021 12:30 am
this ended up working pretty well and is very stable. I find the channel of the wifi ap then broadcast a message to all channels indicating which channel will be used for espnow connection (same channel as wifi ap) and each slave device then sets its channel to this.
Hi rwel59,
I have the same problem mentioned in the topic, but I don't understand the tecnique to send broadcast to all channel. I've tried to send with ff:ff:ff:ff:ff:ff as mac address but I'm not sure that it's sent to all channel.

can you provide the code for broadcast?

Thanks!