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

ThomasESP32
Posts: 191
Joined: Thu Jul 14, 2022 5:15 am

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

Postby ThomasESP32 » Thu Jun 08, 2023 9:42 am

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

ThomasESP32
Posts: 191
Joined: Thu Jul 14, 2022 5:15 am

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

Postby ThomasESP32 » Thu Jun 08, 2023 12:03 pm

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 ?

ThomasESP32
Posts: 191
Joined: Thu Jul 14, 2022 5:15 am

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

Postby ThomasESP32 » Thu Jun 08, 2023 12:36 pm

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

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

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

Postby MicroController » Thu Jun 08, 2023 2:05 pm

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.

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], prodigysounds and 134 guests