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.
Will ESPNOW work with WIFI simultaneously
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Will ESPNOW work with WIFI simultaneously
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
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?
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?
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Will ESPNOW work with WIFI simultaneously
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
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
Hi rwel59,rwel59 wrote: ↑Sat Sep 18, 2021 12:30 amthis 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.
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