esp now TX Data Rate

yanis88
Posts: 1
Joined: Thu Jun 26, 2025 5:43 pm

esp now TX Data Rate

Postby yanis88 » Thu Jun 26, 2025 6:44 pm

Hi,

I'm new to working with the esp32 and still trying to wrap my head around how the protocol works when setting the protocol is set manually e.g.

Code: Select all

esp_wifi_set_protocol(WIFI_IF_STA, <protocol_value>);
esp_wifi_config_espnow_rate(WIFI_IF_STA, <phy_rate>);
My understanding based on the docs and the esp_wifi_types.h is that the <protocol_value> can be one of the following:
  • 1 --> 11B
  • 3 --> 11BG
  • 7 --> 11BGN
  • 8 --> LR
  • 15 --> 11BGN+LR
As for the phy_rate looking at the wifi_phy_rate_t in the same header as above (correct me if I'm wrong):
  • 0-7 --> 11B
  • 0-15 --> 11BG
  • 0-31 --> 11BGN
  • 0-7 + 41-42 --> LR
  • 0-42 --> 11BGN+LR
I am not using an Access Point - just broadcasting packets - and I am checking in the esp_wifi_set_promiscuous_rx_cb(<callback>) the rx_ctrl.rate, rx_ctrl.mcs, and rx_ctrl.sig_mode.

Here's what confuses me:
  • When I use rate 41 and the protocol is set to LR, I get rx_ctrl.rate=25 and rx_ctrl.mcs=0 (that one is expected). Where does the 25 come from? Which rates are used for the LR?
  • When I try 11N and setting the rate to 31, the received rate is somewhere in the 20s and the mcs is usually 6.
  • Is there a clear mapping between the rates and the protocol used?
  • Throughput looks the same at 1Mbps and WIFI_PHY_RATE_LORA_250K which seems to cap at around 350kbps for a payload of 250 bytes
Thanks!

nopnop2002
Posts: 362
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: esp now TX Data Rate

Postby nopnop2002 » Fri Jun 27, 2025 10:25 pm

>Throughput looks the same at 1Mbps and WIFI_PHY_RATE_LORA_250K which seems to cap at around 350kbps for a payload of 250 bytes

Please try increasing the payload size.

If we send a payload of 1470 bytes, the communication speed will be about 7060 Bytes/Sec (55.2M Bits/Sec).

In ESPNOW Ver1, the maximum payload size was 250 bytes, but in Ver2 it has been expanded to 1470 bytes.
Since ESPNOW for ESP8266 is Ver1, there is a limit of 250 bytes when communicating with the ESP8266.

MicroController
Posts: 2705
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: esp now TX Data Rate

Postby MicroController » Sat Jun 28, 2025 11:52 am

about 7060 Bytes/Sec (55.2M Bits/Sec).
Huh? (7060 kilo-bytes?)

nopnop2002
Posts: 362
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: esp now TX Data Rate

Postby nopnop2002 » Sat Jun 28, 2025 2:22 pm

I got the unit wrong.

about 70.6 KBytes/Sec (552K Bits/Sec).

Who is online

Users browsing this forum: PerplexityBot and 2 guests