ESP-NOW & WIFI - Performance and Channel
Posted: Mon Oct 21, 2019 2:46 am
I'm using ESP-Now to send data very quickly (in the millisecond range) from an ESP32 based sensor ("the master") to another ESP32 that drives a bunch of LEDs ("the slave"). It works amazingly well.
I'm now experementing with concurrently connecting "the master" ESP32 to Wi-fi in order to interact with it. There is no requirement to also have "the slave" connected to Wi-fi. For now I have hard coded the ESP-Now channel to match my Wi-fi AP's channel. The only way I can find to set the channel on "the slave" is to either create a softAP or also connect it to Wi-fi (which I have no need for), any attempt to send data via ESP-Now (with Wi-fi connected) silently fails without doing this. Without Wi-fi, I can send ESP-Now data on any channel without setting it on "the slave". All I do is esp_wifi_start() & esp_now_init().
I can send ESP-Now data when connected to Wi-fi (when "the slave" is softAP or connected to my AP) but performance is extremely poor. I have no way to quantify it except that without Wi-fi, there is no noticeable latency, with Wi-fi there is huge latency. Range is also greatly affected. Without Wi-fi ESP-Now works through several walls from one end of a house to another. With Wi-fi no data is received greater than 3 meters in the same room. I do not believe my issues are due to a congested channel. Without connecting to Wi-fi I can use the same channel without negative effect.
Is it known/expected that concurrent Wi-fi and ESP-Now has a performance/range hit? I suspect I'm only seeing this issue due to my data rate requirements.
Is there a way to force "the slave" to listen on a particular channel without creating a softAP or connecting it to the same Wi-fi? In my testing (and searching) esp_wifi_set_channel() does not work on "the slave" without a SoftAP. Why is it that it doesn't work when "the master" is connected to wifi but does when not (and using the exact same channel)?.
Thanks,
Pete
I'm now experementing with concurrently connecting "the master" ESP32 to Wi-fi in order to interact with it. There is no requirement to also have "the slave" connected to Wi-fi. For now I have hard coded the ESP-Now channel to match my Wi-fi AP's channel. The only way I can find to set the channel on "the slave" is to either create a softAP or also connect it to Wi-fi (which I have no need for), any attempt to send data via ESP-Now (with Wi-fi connected) silently fails without doing this. Without Wi-fi, I can send ESP-Now data on any channel without setting it on "the slave". All I do is esp_wifi_start() & esp_now_init().
I can send ESP-Now data when connected to Wi-fi (when "the slave" is softAP or connected to my AP) but performance is extremely poor. I have no way to quantify it except that without Wi-fi, there is no noticeable latency, with Wi-fi there is huge latency. Range is also greatly affected. Without Wi-fi ESP-Now works through several walls from one end of a house to another. With Wi-fi no data is received greater than 3 meters in the same room. I do not believe my issues are due to a congested channel. Without connecting to Wi-fi I can use the same channel without negative effect.
Is it known/expected that concurrent Wi-fi and ESP-Now has a performance/range hit? I suspect I'm only seeing this issue due to my data rate requirements.
Is there a way to force "the slave" to listen on a particular channel without creating a softAP or connecting it to the same Wi-fi? In my testing (and searching) esp_wifi_set_channel() does not work on "the slave" without a SoftAP. Why is it that it doesn't work when "the master" is connected to wifi but does when not (and using the exact same channel)?.
Thanks,
Pete