Chapter 3. application solution
3.9.7 Do I need to connect a router for communication between ESP-NOW devices?
ESP-NOW interacts directly from device to device and does not require a router to forward data.
3.9.8 Why does ESP-NOW limit the data length of each packet to 250 bytes? Can it be
congured?
• The maximum length does not support conguration. ESP-NOW uses one vendor-specic element eld of
action frame to transmit ESP-NOW data, whose length eld is only 1 byte (0x = 255) as dened by IEEE
802.11. Thus, the maximum length of ESP-NOW data is limited to 250 bytes.
• Alternatively, you may try with API
esp_wifi_80211_tx()
to send and use snier mode to receive. This
way could fulll the need of working only base on Wi-Fi stack without involving TCP/IP stack.
3.9.9 What should I pay attention to when using ESP-NOW applications?
• The device cannot switch channels after connecting to Wi-Fi. It can only transmit and receive data on the
current Wi-Fi channel.
• After the device enters Modem-sleep mode, it cannot receive data from ESP-NOW.
3.9.10 How can I reduce power consumption when using ESP-NOW?
You can use the following methods to reduce power consumption:
• If you use ESP-IDF in versions earlier than v5.0, when the AP is not connected, you can
congure the wake-up window size and interval using the esp_now_set_wake_window() and
esp_wi_set_connectionless_wake_interval() functions respectively to save power.
• If you use ESP-IDF v5.0 or the latest master version, the functions are dierent from the other
versions. Whether the AP is connected or not, you can use the esp_now_set_wake_window() and
esp_wi_connectionless_module_set_wake_interval() functions to set the wake-up window size
and interval, respectively.
• Note that the issue of window synchronization between the sending end and receiving end needs
to be considered in the application layer design. In this way, the chip will wake up at every“inter-
val”and work for a period of time equalling the value of “window size”. Under this situation,
you also need to congure CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE=y in
sdkcong.defaults.
3.9.11 In addition to wireless communication through ESP-NOW, is there any other bet-
ter way to realize one-to-one and one-to-many communication?
One-to-one and one-to-many communication can also be realized by using SoftAP + Station. The master
device applies Wi-Fi SoftAP mode to establish connections with multiple slave devices (Wi-Fi Station)
at the same time.
Espressif Systems 36
Submit Document Feedback
Release master