-
Notifications
You must be signed in to change notification settings - Fork 180
Reduce Bluetooth heap size by building custom version #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Add the following lines to configs/defconfig.esp32
and rebuild the esp32-arduino libraries. This will save some 300kB flash and 50kB ram |
A related tquestion on this specific topic, since arduino library builder seems to only work on linux or OSX, is it possible to simply build the bluetooth library in IDF directly (which works under win10), for example from the A2DP example, and just move the blob to Arduino somehow? |
@0x0fe You could try to copy the sdkconfig to bt_discovery example, menuconfig, build it, copy the libbt.a to your Arduino framework directory. However I bet that you will get wired crashes if you get a version mismatch or different sdkconfig settings that are clashing. I assume that setting up a linux virtual machine will be faster and less frustrating. |
@ferbar Thank you, yes i also had the same thought and decided to compile under ubuntu from WSL, it compiles fine, it seems there is a bug with partitions.csv though. |
Where can I find this file configs/defconfig.esp32? |
@0x0fe Thank you. But is there anyway I can do this when using PlatformIO and not ESPIDF? |
mmh, yeah, in fact it is quite more convenient, just make a project and include the following in platformio.ini
|
May I know the stability of the signal as WiFi and BLE share the same antenna? Is it still usable? |
there is a time domain multiplexing, so bluetooth and wifi can coexist, the problems are more related to ressources, in particular IRAM, you will find out very quickly that once wifi is started, especially with TLS, and bluetooth is active, most of the IRAM is used (depening on which extensions you use in the bluetooth stack) and it is quite tricky to have these functions coexist with the available ressources in many scnarios. |
@0x0fe What is the behaviour of the chip when it runs out of IRAM? I never got into this scenario. Will it crash? |
Hi to all,
I need to use BT A2DP while sending some data on Wi-Fi. When used alone, A2DP works fine.
But with Wi-Fi enabled I was getting some crashes.
I was on 2.0.4, I upgraded to 2.0.6 but still getting crashes.
Upon a bit of investigation, my code with Wi-Fi only have 230KB free heap, but when BT is enabled drops to 40KB and when playing music it drops further to 21KB, which is not stable anymore.
I read somewhere it is possible to recompile BT library binary blob to discard unnecessary functions for a specific project.
For instance, I don't need BLE.
Can you give me a hint on how to do it?
Many thanks,
Nick
The text was updated successfully, but these errors were encountered: