Closed melkati closed 8 months ago
Built rude version with NimBLE (without gadgetBle.handleEvents();
) in branch Feature-NimBLE
Memory use with WiFi, MQTT and Bluetooth, using built in default Bluetooth library:
RAM: [== ] 22.1% (used 72528 bytes from 327680 bytes)
Flash: [==========] 95.8% (used 1882948 bytes from 1966080 bytes)
Exactly the same (WiFi, MQTT and Bluetooth) but using NimBLE library:
RAM: [== ] 21.1% (used 69160 bytes from 327680 bytes)
Flash: [======== ] 75.1% (used 1475880 bytes from 1966080 bytes)
Memory use with WiFi, MQTT (without Bluetooth).
RAM: [== ] 16.6% (used 54544 bytes from 327680 bytes)
Flash: [====== ] 63.4% (used 1247140 bytes from 1966080 bytes)
Great improvement! Everything, but fetch data logger buffer from Sensirion MyAmbience mobile App, works.
Now I need help to implement gadgetBle.handleEvents(); with the NimBLE library.
I just asked arduino-ble-gadget library author about this. https://github.com/Sensirion/arduino-ble-gadget/issues/11#issue-1087471599
The arduino-ble-gadget library author is already working on migrating it to the NimBLE bluetooth library. Hopefully, it doesn't take too much time and memory issues are solved with this, so CO2 Gadget can keep growing.
Upgrade to new Sensirion library version with NimBLE bluetooth library.
There are some memory issues (that's why this issue is also labeled as bug) when all options are enabled (WiFi, MQTT, BLE). We have reached the limits of memory.
Bluetooth library is tacking too much memory.
One possibility is to swap actual bluetooth library with NimBLE (a similar less memory angry library).
Right now, it forces to have to choose functionalities.
Memory use with WiFi, MQTT and Bluetooth:
Memory use with WiFi, MQTT (without Bluetooth):