Page 1 of 1

Esp32S3 : How to enable Wifi and BLE at the same time ?

Posted: Thu Jun 08, 2023 9:42 am
by ThomasESP32
Good morning,


I am using Bluedroid BLE stack in order to do BLE with an Esp32S3 chip and everything is ok.

The stack runs normally, I have no problems with it.

Now, I would like to enable Wifi in SoftAP mode when the chip starts in order to have the possibility
to upgrade the firmware via OTA.

Unfortunately, when I enable Wifi in SoftAP mode, the firmware does no manage to run the BLE stack anymore.
I get errors when the stack is executed.

Do you have any idea about what can happen please ??

Best regards,

Thomas TRUILHE

Re: Esp32S3 : How to enable Wifi and BLE at the same time ?

Posted: Thu Jun 08, 2023 12:03 pm
by ThomasESP32
it seams that it is a problem of memory,
when I initialise the bluedroid controller the error code is 0x101 out of memory.
Maybe the Wifi stack takes to much of internal memory ?

Re: Esp32S3 : How to enable Wifi and BLE at the same time ?

Posted: Thu Jun 08, 2023 12:36 pm
by ThomasESP32
Excuse me, how can I know the amount of internal memory needed by the Bluedroid controller ?
And the amount of internal memory needed by the Wifi stack/driver ?

Can you confirm me that there elements are located into internal memory ?
Or can I use external memory ?

Best regards,

Thomas TRUILHE

Re: Esp32S3 : How to enable Wifi and BLE at the same time ?

Posted: Thu Jun 08, 2023 2:05 pm
by MicroController
Excuse me, how can I know the amount of internal memory needed by the Bluedroid controller ?
And the amount of internal memory needed by the Wifi stack/driver ?
You can get an approximation of the dynamic RAM use by using the heap information API before + after starting the Bluetooth or WiFi stack.
Or can I use external memory ?
You should be able to set CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST by setting Bluedroid menuconfig item "BT/BLE will first malloc the memory from the PSRAM" to reduce use of internal RAM.

Also, the NimBLE stack is reported to require less RAM than Bluedroid.