Correct setting of ESP-Now

mato157
Posts: 2
Joined: Fri Nov 09, 2018 10:02 am

Correct setting of ESP-Now

Postby mato157 » Mon Apr 01, 2019 6:32 pm

In my project I use protocol ESP-Now as a way of communication between ESP32 boards.
I have some questions about setting ESP-Now.
The first ESP board only reads the data from sensors and sends it through ESP-Now. The second board receives ESP-Now data but in the same time is also connected to Wi-Fi AP. So the second board is in Station mode. According ESP-Now User Guide it is not recommended to send packets to a device in Station mode. Because the device may be in sleep and thus not receive the ESP-Now message. One possible option is to set the second board to the combined AP-STA mode but then also the Wi-Fi AP starts on the ESP. Which is something I don't want.

So the first question is, what is the correct setting of ESP to be connected to Wi-Fi AP but also reliably received ESP-Now messages? Is it somehow possible to set ESP to combined AP-STA mode but not to turn on Wi-Fi AP? Or somehow make STA mode reliable for receiving ESP-Now messages?

The second question is about Espressif Wi-Fi Long Range Protocol Mode. Is it already implemented on ESP32? And if yes, can it be used to increase the range of ESP-Now communication?

Thank you for your response.

littlesky
Posts: 47
Joined: Fri Jun 09, 2017 7:49 am

Re: Correct setting of ESP-Now

Postby littlesky » Tue Apr 02, 2019 3:02 am

mato157 wrote:
Mon Apr 01, 2019 6:32 pm
In my project I use protocol ESP-Now as a way of communication between ESP32 boards.
I have some questions about setting ESP-Now.
The first ESP board only reads the data from sensors and sends it through ESP-Now. The second board receives ESP-Now data but in the same time is also connected to Wi-Fi AP. So the second board is in Station mode. According ESP-Now User Guide it is not recommended to send packets to a device in Station mode. Because the device may be in sleep and thus not receive the ESP-Now message. One possible option is to set the second board to the combined AP-STA mode but then also the Wi-Fi AP starts on the ESP. Which is something I don't want.

So the first question is, what is the correct setting of ESP to be connected to Wi-Fi AP but also reliably received ESP-Now messages? Is it somehow possible to set ESP to combined AP-STA mode but not to turn on Wi-Fi AP? Or somehow make STA mode reliable for receiving ESP-Now messages?

The second question is about Espressif Wi-Fi Long Range Protocol Mode. Is it already implemented on ESP32? And if yes, can it be used to increase the range of ESP-Now communication?

Thank you for your response.
If using station only mode, modem sleep should be disabled by calling esp_wifi_set_ps(WIFI_PS_NONE) after esp_wifi_init(). Then ESP-Now data can be received by the station.

Long Range Protocol Mode is already implemented on ESP32, but its performance is not that good as we expected. We are trying to improve it now.

Who is online

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