Nimble compile error when security is disabled

michael.pontillas
Posts: 2
Joined: Wed Aug 25, 2021 6:11 am

Nimble compile error when security is disabled

Postby michael.pontillas » Wed Mar 06, 2024 1:32 pm

ESP-IDF version: V5.2.1

I'm getting the following compilation error when disabling BLE SM feature in sdkconfig. In v5.1.2, the error does not occur.

C:/projects/esp/esp-idf/v5.2.1/components/bt/host/nimble/nimble/nimble/host/include/host/ble_hs.h:77:37: error: expected identifier or '(' before numeric constant
77 | #define BLE_HS_ENOTSUP 8
| ^
C:/projects/esp/esp-idf/v5.2.1/components/bt/host/nimble/nimble/nimble/host/src/ble_sm_priv.h:413:48: note: in expansion of macro 'BLE_HS_ENOTSUP'
413 | #define ble_sm_alg_aes_cmac(key, in, len, out) BLE_HS_ENOTSUP
| ^~~~~~~~~~~~~~
C:/projects/esp/esp-idf/v5.2.1/components/bt/host/nimble/nimble/nimble/host/src/ble_sm_priv.h:435:5: note: in expansion of macro 'ble_sm_alg_aes_cmac'
435 | int ble_sm_alg_aes_cmac(const uint8_t *key, const uint8_t *in, size_t len, uint8_t *out);

---
I found that ble_sm_alg_aes_cmac in ..\components\bt\host\nimble\nimble\nimble\host\src\ble_sm_priv.h is defined as a function and a macro if the SM feature is disabled. Commenting out line 435 (function declaration) solves the compile error but have not tested if the security features are enabled.

Could you please advise what is correct sdkconfig configuration when disabling BLS security?

-Michael

Who is online

Users browsing this forum: No registered users and 168 guests