PlatformIO Community

How to properly modify sdkconfig ? Change some values, save it and that's it?

Hello !

There was a commit made 20 days ago in ESP32 Arduino Core: https://github.com/espressif/arduino-esp32/commit/b0d8d4dd442b2953e57b16d05d6bf2a893334f1d regarding Wi-Fi and I think I will really benefit from using it as I am experiencing serious issues with ESP32’s AP Mode.

I would like to know how can I get that commit while using PlatformiIO.

Is that commit included in the 1.9.0 Stable release ? Or is in the Development version ?

I’ve found sdkconfig in

/.platformio/packages/framework-arduinoespressif32/tools/sdk/sdkconfig
and
.platformio/packages/framework-arduinoespressif32/tools/sdk/include/config/sdkconfig.h

and the changes from that commit weren’t made.

If I modify both sdkconfig to match the commit will it take effect ?

Also, something strange is that in

/.platformio/packages/framework-arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6/tools/sdk/sdkconfig

and

.platformio/packages/framework-arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6/tools/sdk/include/config/sdkconfig.h

CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM and CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM were changed from 8 to 10 and 10 to 32 respectively, but CONFIG_ESP32_WIFI_RX_BA_WIN was still 16, instead of the new value that is 6.

Is this intentional ?

Correct… that commit (from Jul 10) is one of 38 made subsequent to the the last arduino-esp32 release. And since that was a pre-release, and PlatformIO doesn’t formally support non-stable releases, the latest release supported is 1.0.2, back in framework version 1.8.0.

As far as why CONFIG_ESP32_WIFI_RX_BA_WIN was reverted back to 16, you’ll need to ask over on the arduino-esp32 github, as a subsequent commit made that change (go to the history view of the file to see the last two commits, or view the blame to see what commits were responsible for what changes). There’s the commit from 20 days ago you referenced, and then there is another one 12 days ago which changed that value back.

Note: there is already mention of that change in the PR associated with the offending commit.

Who knows, maybe they are still testing it.

I’ve modified both sdkconfig files in both framework-arduinoespressif32 and framework-arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6 folders.

Are they in effect now or do I have to do some other sort of witchcraft ?

Also, if I want to use the latest commits, can I use PlatformIO ? Will the Stage version include the latest commits from arduino-esp32 ?

Stage version is the current commit form the arduino-esp32 repo… as long as you do a pio update periodically so that the latest git commit is pulled. You can double check by, when you have the arduinoespressif32@src-537c58760dafe7fcc8a1d9bbcf00b6f6 open in a terminal, doing a git fetch to make sure git knows about any changes to the arduino-esp32 repo, and then a git status or git log to see what where it’s at. You can do a git pull while you’re there if you want it to update.

At a guess, I’d say it’s in effect… try doing a Clean, or just delete the .pio folder unless you’ve customized something in there, to make sure… I don’t usually tinker with that stuff, so can’t say for sure if you need to do anything else…

The change to 16 was due to supporting PSRAM enabled boards. The PSRAM default is 16. I’ve been testing with a slightly adjusted values with near 100% success:
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 16
#define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1
#define CONFIG_ESP32_WIFI_TX_BA_WIN 6
#define CONFIG_ESP32_WIFI_NVS_ENABLED 0
#define CONFIG_ESP32_WIFI_RX_BA_WIN 16
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED 1

I’ll be submitting a PR to bump to values which are compatible and stable for both WROOM-32 (no PSRAM) and WROVER (with PSRAM) boards.

1 Like