Will ESPNOW work with WIFI simultaneously

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Will ESPNOW work with WIFI simultaneously

Postby rwel59 » Mon Aug 23, 2021 3:06 pm

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.

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: Will ESPNOW work with WIFI simultaneously

Postby ESP_Sprite » Tue Aug 24, 2021 6:01 am

Yes, it works, with the caveat (iirc) that the channel the access point is on and the ESPNow channel should be the same.

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Re: Will ESPNOW work with WIFI simultaneously

Postby rwel59 » Fri Aug 27, 2021 9:49 pm

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?

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: Will ESPNOW work with WIFI simultaneously

Postby ESP_Sprite » Sat Aug 28, 2021 1:46 am

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.

rwel59
Posts: 97
Joined: Thu Oct 12, 2017 3:32 pm

Re: Will ESPNOW work with WIFI simultaneously

Postby rwel59 » 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.

davnec
Posts: 5
Joined: Mon Jul 10, 2017 8:14 am

Re: Will ESPNOW work with WIFI simultaneously

Postby davnec » Mon Dec 05, 2022 12:33 pm

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!

Who is online

Users browsing this forum: No registered users and 163 guests