Husarnet not working with BLE server
I want to use BLE Server and Husarnet in one project. Each on their own are working, however, when adding
platform_packages =
framework-arduinoespressif32 @ https://github.com/husarnet/arduino-esp32/releases/download/1.0.4-1/arduino-husarnet-esp32.zip
to platformio.ini BLE does not work anymore. I get a lot of errors like e.g:
path/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/libraries/BLE/src/BLEDescriptor.cpp: In constructor 'BLEDescriptor::BLEDescriptor(BLEUUID, uint16_t)':
path/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/libraries/BLE/src/BLEDescriptor.cpp:40:36: error: 'malloc' was not declared in this scope
m_value.attr_value = (uint8_t*) malloc(max_len); // Allocate storage for the value.
^~~~~~
path/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/libraries/BLE/src/BLEDescriptor.cpp:40:36: note: 'malloc' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
path/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/libraries/BLE/src/BLEDescriptor.cpp:19:1:
+#include <cstdlib>
path/.platformio/packages/framework-arduinoespressif32@src-ac062c2d4978b25cad32b0aa2d894938/libraries/BLE/src/BLEDescriptor.cpp:40:36:
m_value.attr_value = (uint8_t*) malloc(max_len); // Allocate storage for the value.
but when the platform_packages are not added to platform.ini, I get the error src/main.cpp:11:10: fatal error: Husarnet.h: No such file or directory
My entire platform.ini:
[env:nodemcu-32s]
platform = espressif32 @ ~6.3.1
board = nodemcu-32s
framework = arduino
platform_packages =
framework-arduinoespressif32 @ https://github.com/husarnet/arduino-esp32/releases/download/1.0.4-1/arduino-husarnet-esp32.zip
lib_deps =
adafruit/Adafruit NeoPixel@^1.11.0
bblanchon/ArduinoJson@^6.21.2
husarnet/Husarnet ESP32@^1.2.0-4
board_build.partitions = huge_app.csv
Hello @TanaroSch our ESP32 port is aligned to outdated platform code, the library is outdated as well. We are in the process of rewriting it, but until it's completed unfortunately we can't provide you any support for this project. New library will be available in 2023 Q4 maybe.
Sorry for the bad news. Best regards, ympek
Any updates here on the BLE coexistance, especially for esp_ide?