Open NorbNorb opened 2 days ago
Why are you switching from NimBLE-Arduino? If you are using arduino framework you should not use this repo unless you are using arduino as a component as well framework = espidf, arduino
.
I am trying to switch from NimBLE-Arduino to this repo to see if it uses less space in RAM. My free heap when I include the arduino library is too small for my main tasks. So I hope that by switching I will have more memory available. Please tell me if this is not the case.
This repo and NimBLE-Arduino are the same code, the only difference being that NimBLE-Arduino includes the entire BLE stack code.
Switching to this repo may help, but only if you switch to espidf entirely with your project, which opens up configuration options.
I'll give it a try to switch from arduino to espidf.
Here's BTW what the free heap space looks like without
and with my (simple) BLE code:
I guess that shrinked heap size comes from static memory allocations caused by that BLE code.
My ESP32 project built with platformio used the NimBLE-Arduino library but I finally went into RAM issues. So I hoped to find a more lightweight solution here.
Using VS Code and platformio, I try to switch from NimBLE-Arduino to esp-nimble-cpp. I therefore simply changed the _libdeps in the platformio.ini file (see below).
However, I get this error: .pio/libdeps/dfrobot_firebeetle2_esp32e_16MB/esp-nimble-cpp/src/NimBLEUtils.h:16:10: fatal error: host/ble_gap.h: No such file or directory
I read here that it might be resolved by changing the platform from arduino to espidf but this lead me down the rabbit hole, leading to further errors.
Here's my full platformio.ini file:
I have spent a whole day on this but couldn't resolve it. Do you have any tips on how to make it work?