Skip to content

Commit 0b8529d

Browse files
committed
Revert commit a93bf56 ESP-Now/WiFi static buffers
Using static buffers to fix the ESP-Now multicast issue breaks WiFi. We may need to wait until the ESP32 core incorporates the cfg.cache_tx_buf_num = 4; fix.
1 parent 64eba83 commit 0b8529d

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Firmware/RTK_Surveyor/ESPNOW.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ void espnowStart()
9393
if (wifiState == WIFI_OFF && espnowState == ESPNOW_OFF)
9494
{
9595
//Radio is off, turn it on
96-
WiFi.useStaticBuffers(true); //Fix for one to many ESP-Now bug, prior to ESP32 core v2.0.4: https://github.com/espressif/esp-idf/issues/8992
9796
WiFi.mode(WIFI_STA);
9897

9998
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_LR);

Firmware/RTK_Surveyor/WiFi.ino

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,15 @@ void wifiStart(char* ssid, char* pw)
209209
#ifdef COMPILE_WIFI
210210
if ((wifiState == WIFI_OFF) || (wifiState == WIFI_ON))
211211
{
212+
WiFi.mode(WIFI_STA);
212213

213214
#ifdef COMPILE_ESPNOW
214215
if (espnowState > ESPNOW_OFF)
215216
{
216-
WiFi.mode(WIFI_MODE_NULL); //We must go Null before setting static buffers
217-
WiFi.useStaticBuffers(true); //Fix for one to many ESP-Now bug, prior to ESP32 core v2.0.4: https://github.com/espressif/esp-idf/issues/8992
218-
WiFi.mode(WIFI_STA);
219-
220217
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_LR); //Enable WiFi + ESP-Now
221218
}
222219
else
223220
{
224-
WiFi.mode(WIFI_STA);
225-
226221
esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N); //Set basic WiFi protocols
227222
}
228223
#else
@@ -266,8 +261,6 @@ void wifiStop()
266261
//If ESP-Now is active, change protocol to only Long Range
267262
else if (espnowState > ESPNOW_OFF)
268263
{
269-
WiFi.mode(WIFI_MODE_NULL); //We must go Null before setting static buffers
270-
WiFi.useStaticBuffers(true); //Fix for one to many ESP-Now bug, prior to ESP32 core v2.0.4: https://github.com/espressif/esp-idf/issues/8992
271264
WiFi.mode(WIFI_STA);
272265

273266
// Enable long range, PHY rate of ESP32 will be 512Kbps or 256Kbps

0 commit comments

Comments
 (0)