ESP32 Bluetooth Serial libraries excessive memory size

The ESP32's Bluetooth functionality is a key feature, but the available Serial libraries leave something to be desired. I've explored two options, both consume over 50% of the ESP32's heap space, rendering them impractical for many applications. Examining the source code didn't reveal the cause of this excessive memory footprint.
I'm hoping someone with more expertise could collaborate on developing a more memory-efficient library that can coexist with other program components.

The two libraries I investigated are:

when using BLE I tend to set the Partition Scheme to "Huge APP"
image

Sorry guys, my mistake.
I thought I used the previously mentioned Arduino BluetoothSerial Espresiff library, but in fact the program loaded the Arduino built-in BluetoothSerial (Copyright 2018 Evandro Luis Copercini) which is huge and occupies large part of the available memory.
The problem still exsists: Using that serial bluetooth with ESP32 is not practical unless, as was suggested here with thanks by horace, namely change the Partition to Huge App. (which may have other implications)
There is a need for a "normal" size Serialbluetooth library.
By the way, whay do people build different libraries with the same name?

Not sure which built-in library you are referring to; I don't seem to have that library in any of my installations except for my portable installation for ESP32; so it's part of the board package, not of Arduino. And that is the library by Evandro Luis Copercini and shipped by Espresiff.

It happens; after all, the name covers what it does. Wait till you have to use a LiquidCrystal_I2C.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.