h2zero / NimBLE-Arduino

A fork of the NimBLE library structured for compilation with Arduino, for use with ESP32, nRF5x.
https://h2zero.github.io/NimBLE-Arduino/
Apache License 2.0
670 stars 138 forks source link

How to enable debug logs for NimBLE library? #578

Closed eulphean closed 11 months ago

eulphean commented 11 months ago

Hi guys, I'm trying to look at the granular debug logs from the NimBLE library. I'm using esp32 with platform.io. I've tried the following but I still don't see the logs of the library. Can somebody please help me how to enable these logs?

  1. Add build-flags [env:esp32dev] platform = espressif32 board = esp32dev framework = arduino lib_deps = h2zero/NimBLE-Arduino@^1.4.1 build_type = debug build_flags = -D CONFIG_BT_NIMBLE_LOG_LEVEL=0 -D CONFIG_NIMBLE_CPP_LOG_LEVEL=0

  2. Update nimconfig.h `#define CONFIG_NIMBLE_CPP_LOG_LEVEL 0

    define CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT`