diff --git a/drivers/bluetooth/hci/h4.c b/drivers/bluetooth/hci/h4.c index 60f27d7271d..1f428e678ed 100644 --- a/drivers/bluetooth/hci/h4.c +++ b/drivers/bluetooth/hci/h4.c @@ -25,6 +25,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER) #define LOG_MODULE_NAME bt_driver #include "common/log.h" +#include "common/bt_str.h" #include "../util.h" diff --git a/drivers/bluetooth/hci/ipm_stm32wb.c b/drivers/bluetooth/hci/ipm_stm32wb.c index c78eec3a7db..95b08de9a63 100644 --- a/drivers/bluetooth/hci/ipm_stm32wb.c +++ b/drivers/bluetooth/hci/ipm_stm32wb.c @@ -40,6 +40,7 @@ static void sysevt_received(void *pdata); #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER) #define LOG_MODULE_NAME hci_ipm #include "common/log.h" +#include "common/bt_str.h" #define HCI_CMD 0x01 #define HCI_ACL 0x02 diff --git a/subsys/bluetooth/audio/ascs.c b/subsys/bluetooth/audio/ascs.c index 74de28f0594..994caeb701e 100644 --- a/subsys/bluetooth/audio/ascs.c +++ b/subsys/bluetooth/audio/ascs.c @@ -25,6 +25,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_ASCS) #define LOG_MODULE_NAME bt_ascs #include "common/log.h" +#include "common/bt_str.h" #include "common/assert.h" #include "../host/hci_core.h" diff --git a/subsys/bluetooth/audio/bass.c b/subsys/bluetooth/audio/bass.c index 6c1abe1150c..aa05d1e7599 100644 --- a/subsys/bluetooth/audio/bass.c +++ b/subsys/bluetooth/audio/bass.c @@ -23,6 +23,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_BASS) #define LOG_MODULE_NAME bt_bass #include "common/log.h" +#include "common/bt_str.h" #include "audio_internal.h" #include "bass_internal.h" diff --git a/subsys/bluetooth/audio/bass_client.c b/subsys/bluetooth/audio/bass_client.c index ea45056d085..caa3e84ceda 100644 --- a/subsys/bluetooth/audio/bass_client.c +++ b/subsys/bluetooth/audio/bass_client.c @@ -22,6 +22,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_BASS_CLIENT) #define LOG_MODULE_NAME bt_bass_client #include "common/log.h" +#include "common/bt_str.h" #include "bass_internal.h" #include "../host/conn_internal.h" diff --git a/subsys/bluetooth/audio/broadcast_sink.c b/subsys/bluetooth/audio/broadcast_sink.c index 07c98df1c84..d1707526c64 100644 --- a/subsys/bluetooth/audio/broadcast_sink.c +++ b/subsys/bluetooth/audio/broadcast_sink.c @@ -23,6 +23,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_AUDIO_DEBUG_BROADCAST_SINK) #define LOG_MODULE_NAME bt_audio_broadcast_sink #include "common/log.h" +#include "common/bt_str.h" #define PA_SYNC_SKIP 5 #define SYNC_RETRY_COUNT 6 /* similar to retries for connections */ diff --git a/subsys/bluetooth/audio/csis.c b/subsys/bluetooth/audio/csis.c index c03b2d1ad04..8ed835f6279 100644 --- a/subsys/bluetooth/audio/csis.c +++ b/subsys/bluetooth/audio/csis.c @@ -35,6 +35,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_CSIS) #define LOG_MODULE_NAME bt_csis #include "common/log.h" +#include "common/bt_str.h" static struct bt_csis csis_insts[CONFIG_BT_CSIS_MAX_INSTANCE_COUNT]; static bt_addr_le_t server_dummy_addr; /* 0'ed address */ diff --git a/subsys/bluetooth/audio/csis_crypto.c b/subsys/bluetooth/audio/csis_crypto.c index 16660db5adf..54c3e2c05ad 100644 --- a/subsys/bluetooth/audio/csis_crypto.c +++ b/subsys/bluetooth/audio/csis_crypto.c @@ -21,6 +21,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_CSIS_CRYPTO) #define LOG_MODULE_NAME bt_csis_crypto #include "common/log.h" +#include "common/bt_str.h" #define BT_CSIS_CRYPTO_PADDING_SIZE 13 #define BT_CSIS_R_SIZE 3 /* r is 24 bit / 3 octet */ diff --git a/subsys/bluetooth/audio/mcc.c b/subsys/bluetooth/audio/mcc.c index 1a40b5b2e8e..bfa146c43e0 100644 --- a/subsys/bluetooth/audio/mcc.c +++ b/subsys/bluetooth/audio/mcc.c @@ -40,6 +40,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_MCC) #define LOG_MODULE_NAME bt_mcc #include "common/log.h" +#include "common/bt_str.h" struct mcs_instance_t { uint16_t start_handle; diff --git a/subsys/bluetooth/audio/micp_mic_ctlr.c b/subsys/bluetooth/audio/micp_mic_ctlr.c index ffa9be5aa0c..d14f36e3fc2 100644 --- a/subsys/bluetooth/audio/micp_mic_ctlr.c +++ b/subsys/bluetooth/audio/micp_mic_ctlr.c @@ -23,6 +23,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_MICP_MIC_CTLR) #define LOG_MODULE_NAME bt_micp_mic_ctlr #include "common/log.h" +#include "common/bt_str.h" /* Callback functions */ static struct bt_micp_mic_ctlr_cb *micp_mic_ctlr_cb; diff --git a/subsys/bluetooth/audio/pacs.c b/subsys/bluetooth/audio/pacs.c index c4a79f84afe..3c2752fc731 100644 --- a/subsys/bluetooth/audio/pacs.c +++ b/subsys/bluetooth/audio/pacs.c @@ -26,6 +26,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_PACS) #define LOG_MODULE_NAME bt_pacs #include "common/log.h" +#include "common/bt_str.h" #include "audio_internal.h" #include "pacs_internal.h" diff --git a/subsys/bluetooth/audio/tbs_client.c b/subsys/bluetooth/audio/tbs_client.c index 75fb689e109..ab49f185bbb 100644 --- a/subsys/bluetooth/audio/tbs_client.c +++ b/subsys/bluetooth/audio/tbs_client.c @@ -24,6 +24,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_TBS_CLIENT) #define LOG_MODULE_NAME bt_tbs_client #include "common/log.h" +#include "common/bt_str.h" #define MAX_URI_SCHEME_LIST_SIZE 64 #if IS_ENABLED(CONFIG_BT_TBS_CLIENT_GTBS) diff --git a/subsys/bluetooth/audio/vcs_client.c b/subsys/bluetooth/audio/vcs_client.c index 05fd5f30c2a..07e18e74450 100644 --- a/subsys/bluetooth/audio/vcs_client.c +++ b/subsys/bluetooth/audio/vcs_client.c @@ -25,6 +25,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_VCS_CLIENT) #define LOG_MODULE_NAME bt_vcs_client #include "common/log.h" +#include "common/bt_str.h" /* Callback functions */ static struct bt_vcs_cb *vcs_client_cb; diff --git a/subsys/bluetooth/common/CMakeLists.txt b/subsys/bluetooth/common/CMakeLists.txt index d3b3c9e75b7..72d650445fe 100644 --- a/subsys/bluetooth/common/CMakeLists.txt +++ b/subsys/bluetooth/common/CMakeLists.txt @@ -5,6 +5,7 @@ zephyr_library() zephyr_library_sources(addr.c) zephyr_library_sources(dummy.c) zephyr_library_sources(log.c) +zephyr_library_sources(bt_str.c) zephyr_library_sources_ifdef(CONFIG_BT_RPA rpa.c) diff --git a/subsys/bluetooth/common/bt_str.c b/subsys/bluetooth/common/bt_str.c new file mode 100644 index 00000000000..8a28d3d39ee --- /dev/null +++ b/subsys/bluetooth/common/bt_str.c @@ -0,0 +1,63 @@ +/* Copyright (c) 2022 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +/* Helper for printk parameters to convert from binary to hex. + * We declare multiple buffers so the helper can be used multiple times + * in a single printk call. + */ + +#include + +#include +#include +#include +#include +#include +#include + +const char *bt_hex_real(const void *buf, size_t len) +{ + static const char hex[] = "0123456789abcdef"; + static char str[129]; + const uint8_t *b = buf; + size_t i; + + len = MIN(len, (sizeof(str) - 1) / 2); + + for (i = 0; i < len; i++) { + str[i * 2] = hex[b[i] >> 4]; + str[i * 2 + 1] = hex[b[i] & 0xf]; + } + + str[i * 2] = '\0'; + + return str; +} + +const char *bt_addr_str_real(const bt_addr_t *addr) +{ + static char str[BT_ADDR_STR_LEN]; + + bt_addr_to_str(addr, str, sizeof(str)); + + return str; +} + +const char *bt_addr_le_str_real(const bt_addr_le_t *addr) +{ + static char str[BT_ADDR_LE_STR_LEN]; + + bt_addr_le_to_str(addr, str, sizeof(str)); + + return str; +} + +const char *bt_uuid_str_real(const struct bt_uuid *uuid) +{ + static char str[BT_UUID_STR_LEN]; + + bt_uuid_to_str(uuid, str, sizeof(str)); + + return str; +} diff --git a/subsys/bluetooth/common/bt_str.h b/subsys/bluetooth/common/bt_str.h new file mode 100644 index 00000000000..4df2d8d38ac --- /dev/null +++ b/subsys/bluetooth/common/bt_str.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2022 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/* NOTE: These helper functions always encodes into the same buffer storage. + * It is the responsibility of the user of this function to copy the information + * in this string if needed. + * + * NOTE: These functions are not thread-safe! + */ +const char *bt_hex_real(const void *buf, size_t len); +const char *bt_addr_str_real(const bt_addr_t *addr); +const char *bt_addr_le_str_real(const bt_addr_le_t *addr); +const char *bt_uuid_str_real(const struct bt_uuid *uuid); + +#define bt_hex(buf, len) bt_hex_real(buf, len) +#define bt_addr_str(addr) bt_addr_str_real(addr) +#define bt_addr_le_str(addr) bt_addr_le_str_real(addr) +#define bt_uuid_str(uuid) bt_uuid_str_real(uuid) diff --git a/subsys/bluetooth/common/log.c b/subsys/bluetooth/common/log.c index 063dc2edcb6..b72e45276c8 100644 --- a/subsys/bluetooth/common/log.c +++ b/subsys/bluetooth/common/log.c @@ -6,62 +6,3 @@ * * SPDX-License-Identifier: Apache-2.0 */ - -/* Helper for printk parameters to convert from binary to hex. - * We declare multiple buffers so the helper can be used multiple times - * in a single printk call. - */ - -#include -#include -#include -#include -#include -#include -#include - -const char *bt_hex_real(const void *buf, size_t len) -{ - static const char hex[] = "0123456789abcdef"; - static char str[129]; - const uint8_t *b = buf; - size_t i; - - len = MIN(len, (sizeof(str) - 1) / 2); - - for (i = 0; i < len; i++) { - str[i * 2] = hex[b[i] >> 4]; - str[i * 2 + 1] = hex[b[i] & 0xf]; - } - - str[i * 2] = '\0'; - - return str; -} - -const char *bt_addr_str_real(const bt_addr_t *addr) -{ - static char str[BT_ADDR_STR_LEN]; - - bt_addr_to_str(addr, str, sizeof(str)); - - return str; -} - -const char *bt_addr_le_str_real(const bt_addr_le_t *addr) -{ - static char str[BT_ADDR_LE_STR_LEN]; - - bt_addr_le_to_str(addr, str, sizeof(str)); - - return str; -} - -const char *bt_uuid_str_real(const struct bt_uuid *uuid) -{ - static char str[BT_UUID_STR_LEN]; - - bt_uuid_to_str(uuid, str, sizeof(str)); - - return str; -} diff --git a/subsys/bluetooth/common/log.h b/subsys/bluetooth/common/log.h index f6e338448a5..920f8326161 100644 --- a/subsys/bluetooth/common/log.h +++ b/subsys/bluetooth/common/log.h @@ -16,8 +16,6 @@ #include #include -#include -#include #include #ifdef __cplusplus @@ -41,22 +39,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, LOG_LEVEL); #define BT_WARN(fmt, ...) LOG_WRN(fmt, ##__VA_ARGS__) #define BT_INFO(fmt, ...) LOG_INF(fmt, ##__VA_ARGS__) -/* NOTE: These helper functions always encodes into the same buffer storage. - * It is the responsibility of the user of this function to copy the information - * in this string if needed. - * - * NOTE: These functions are not thread-safe! - */ -const char *bt_hex_real(const void *buf, size_t len); -const char *bt_addr_str_real(const bt_addr_t *addr); -const char *bt_addr_le_str_real(const bt_addr_le_t *addr); -const char *bt_uuid_str_real(const struct bt_uuid *uuid); - -#define bt_hex(buf, len) bt_hex_real(buf, len) -#define bt_addr_str(addr) bt_addr_str_real(addr) -#define bt_addr_le_str(addr) bt_addr_le_str_real(addr) -#define bt_uuid_str(uuid) bt_uuid_str_real(uuid) - #ifdef __cplusplus } #endif diff --git a/subsys/bluetooth/common/rpa.c b/subsys/bluetooth/common/rpa.c index 0fb5fe528b3..d6d8d17bbc0 100644 --- a/subsys/bluetooth/common/rpa.c +++ b/subsys/bluetooth/common/rpa.c @@ -18,6 +18,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_RPA) #define LOG_MODULE_NAME bt_rpa #include "common/log.h" +#include "common/bt_str.h" #include diff --git a/subsys/bluetooth/controller/crypto/crypto.c b/subsys/bluetooth/controller/crypto/crypto.c index 56158f29557..48aaaf01bd0 100644 --- a/subsys/bluetooth/controller/crypto/crypto.c +++ b/subsys/bluetooth/controller/crypto/crypto.c @@ -7,6 +7,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER) #define LOG_MODULE_NAME bt_ctlr_crypto #include "common/log.h" +#include "common/bt_str.h" #include "util/memq.h" diff --git a/subsys/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c index ab142c298fc..f152d49a7d7 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -92,6 +92,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER) #define LOG_MODULE_NAME bt_ctlr_hci #include "common/log.h" +#include "common/bt_str.h" #include "hal/debug.h" #define STR_NULL_TERMINATOR 0x00 diff --git a/subsys/bluetooth/host/adv.c b/subsys/bluetooth/host/adv.c index aa2fc101a61..33287fe8267 100644 --- a/subsys/bluetooth/host/adv.c +++ b/subsys/bluetooth/host/adv.c @@ -20,6 +20,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_adv #include "common/log.h" +#include "common/bt_str.h" enum adv_name_type { ADV_NAME_TYPE_NONE, diff --git a/subsys/bluetooth/host/aes_ccm.c b/subsys/bluetooth/host/aes_ccm.c index 82e7882a8be..37c0b818847 100644 --- a/subsys/bluetooth/host/aes_ccm.c +++ b/subsys/bluetooth/host/aes_ccm.c @@ -14,6 +14,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_aes_ccm #include "common/log.h" +#include "common/bt_str.h" static inline void xor16(uint8_t *dst, const uint8_t *a, const uint8_t *b) { diff --git a/subsys/bluetooth/host/att.c b/subsys/bluetooth/host/att.c index 42771da9f51..ca1c7bde6d0 100644 --- a/subsys/bluetooth/host/att.c +++ b/subsys/bluetooth/host/att.c @@ -24,6 +24,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_ATT) #define LOG_MODULE_NAME bt_att #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" #include "conn_internal.h" diff --git a/subsys/bluetooth/host/br.c b/subsys/bluetooth/host/br.c index 2f7315249ca..0190486854c 100644 --- a/subsys/bluetooth/host/br.c +++ b/subsys/bluetooth/host/br.c @@ -15,6 +15,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_br #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" #include "conn_internal.h" diff --git a/subsys/bluetooth/host/crypto.c b/subsys/bluetooth/host/crypto.c index 26459f0f2ec..541c0962125 100644 --- a/subsys/bluetooth/host/crypto.c +++ b/subsys/bluetooth/host/crypto.c @@ -25,6 +25,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_crypto #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index ebc48d773dd..9a1a6b1caba 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -36,6 +36,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_GATT) #define LOG_MODULE_NAME bt_gatt #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" #include "conn_internal.h" diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index b3dedf8c772..313ae7e776f 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -31,6 +31,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_hci_core #include "common/log.h" +#include "common/bt_str.h" #include "common/assert.h" #include "common/rpa.h" diff --git a/subsys/bluetooth/host/hci_ecc.c b/subsys/bluetooth/host/hci_ecc.c index ea49a015cdc..161406afd35 100644 --- a/subsys/bluetooth/host/hci_ecc.c +++ b/subsys/bluetooth/host/hci_ecc.c @@ -26,6 +26,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_hci_ecc #include "common/log.h" +#include "common/bt_str.h" #include "hci_ecc.h" #include "ecc.h" diff --git a/subsys/bluetooth/host/id.c b/subsys/bluetooth/host/id.c index 72a5d6b3f15..f93a3caf889 100644 --- a/subsys/bluetooth/host/id.c +++ b/subsys/bluetooth/host/id.c @@ -32,6 +32,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_id #include "common/log.h" +#include "common/bt_str.h" struct bt_adv_id_check_data { uint8_t id; diff --git a/subsys/bluetooth/host/keys.c b/subsys/bluetooth/host/keys.c index e3c64edab30..7a718f566de 100644 --- a/subsys/bluetooth/host/keys.c +++ b/subsys/bluetooth/host/keys.c @@ -23,6 +23,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_KEYS) #define LOG_MODULE_NAME bt_keys #include "common/log.h" +#include "common/bt_str.h" #include "common/rpa.h" #include "conn_internal.h" diff --git a/subsys/bluetooth/host/keys_br.c b/subsys/bluetooth/host/keys_br.c index 96aee6c973f..c7d736f476c 100644 --- a/subsys/bluetooth/host/keys_br.c +++ b/subsys/bluetooth/host/keys_br.c @@ -19,6 +19,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_KEYS) #define LOG_MODULE_NAME bt_keys_br #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" #include "settings.h" diff --git a/subsys/bluetooth/host/scan.c b/subsys/bluetooth/host/scan.c index 1841302b102..54873758c66 100644 --- a/subsys/bluetooth/host/scan.c +++ b/subsys/bluetooth/host/scan.c @@ -25,6 +25,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_scan #include "common/log.h" +#include "common/bt_str.h" static bt_le_scan_cb_t *scan_dev_found_cb; static sys_slist_t scan_cbs = SYS_SLIST_STATIC_INIT(&scan_cbs); diff --git a/subsys/bluetooth/host/sdp.c b/subsys/bluetooth/host/sdp.c index 667db22f6d2..f07ea1ef4cd 100644 --- a/subsys/bluetooth/host/sdp.c +++ b/subsys/bluetooth/host/sdp.c @@ -19,6 +19,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_SDP) #define LOG_MODULE_NAME bt_sdp #include "common/log.h" +#include "common/bt_str.h" #include "common/assert.h" #include "hci_core.h" diff --git a/subsys/bluetooth/host/settings.c b/subsys/bluetooth/host/settings.c index ea78233bb81..d53a55d2272 100644 --- a/subsys/bluetooth/host/settings.c +++ b/subsys/bluetooth/host/settings.c @@ -15,6 +15,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_SETTINGS) #define LOG_MODULE_NAME bt_settings #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" #include "settings.h" diff --git a/subsys/bluetooth/host/smp.c b/subsys/bluetooth/host/smp.c index e005a509ae9..9d689475bc3 100644 --- a/subsys/bluetooth/host/smp.c +++ b/subsys/bluetooth/host/smp.c @@ -34,6 +34,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_SMP) #define LOG_MODULE_NAME bt_smp #include "common/log.h" +#include "common/bt_str.h" #include "hci_core.h" #include "ecc.h" diff --git a/subsys/bluetooth/host/ssp.c b/subsys/bluetooth/host/ssp.c index 6836d6709a8..f06c07c81ec 100644 --- a/subsys/bluetooth/host/ssp.c +++ b/subsys/bluetooth/host/ssp.c @@ -16,6 +16,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_CORE) #define LOG_MODULE_NAME bt_ssp #include "common/log.h" +#include "common/bt_str.h" #include "keys.h" diff --git a/subsys/bluetooth/mesh/access.c b/subsys/bluetooth/mesh/access.c index bfba4738591..e1df0293bb0 100644 --- a/subsys/bluetooth/mesh/access.c +++ b/subsys/bluetooth/mesh/access.c @@ -17,6 +17,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_ACCESS) #define LOG_MODULE_NAME bt_mesh_access #include "common/log.h" +#include "common/bt_str.h" #include "mesh.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/adv.c b/subsys/bluetooth/mesh/adv.c index 55314f03a38..16dd22bb61a 100644 --- a/subsys/bluetooth/mesh/adv.c +++ b/subsys/bluetooth/mesh/adv.c @@ -18,6 +18,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_ADV) #define LOG_MODULE_NAME bt_mesh_adv #include "common/log.h" +#include "common/bt_str.h" #include "adv.h" #include "net.h" diff --git a/subsys/bluetooth/mesh/adv_ext.c b/subsys/bluetooth/mesh/adv_ext.c index 368894f0880..30d143e6c48 100644 --- a/subsys/bluetooth/mesh/adv_ext.c +++ b/subsys/bluetooth/mesh/adv_ext.c @@ -16,6 +16,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_ADV) #define LOG_MODULE_NAME bt_mesh_adv_ext #include "common/log.h" +#include "common/bt_str.h" #include "host/hci_core.h" diff --git a/subsys/bluetooth/mesh/adv_legacy.c b/subsys/bluetooth/mesh/adv_legacy.c index 115adb781d6..5a6279d940f 100644 --- a/subsys/bluetooth/mesh/adv_legacy.c +++ b/subsys/bluetooth/mesh/adv_legacy.c @@ -18,6 +18,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_ADV) #define LOG_MODULE_NAME bt_mesh_adv_legacy #include "common/log.h" +#include "common/bt_str.h" #include "host/hci_core.h" diff --git a/subsys/bluetooth/mesh/app_keys.c b/subsys/bluetooth/mesh/app_keys.c index 8eb25055471..f3602584438 100644 --- a/subsys/bluetooth/mesh/app_keys.c +++ b/subsys/bluetooth/mesh/app_keys.c @@ -24,6 +24,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_KEYS) #define LOG_MODULE_NAME bt_mesh_app_keys #include "common/log.h" +#include "common/bt_str.h" /* Tracking of what storage changes are pending for App Keys. We track this in * a separate array here instead of within the respective bt_mesh_app_key diff --git a/subsys/bluetooth/mesh/beacon.c b/subsys/bluetooth/mesh/beacon.c index 032061a871b..8aafe999fed 100644 --- a/subsys/bluetooth/mesh/beacon.c +++ b/subsys/bluetooth/mesh/beacon.c @@ -16,6 +16,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_BEACON) #define LOG_MODULE_NAME bt_mesh_beacon #include "common/log.h" +#include "common/bt_str.h" #include "adv.h" #include "mesh.h" diff --git a/subsys/bluetooth/mesh/cdb.c b/subsys/bluetooth/mesh/cdb.c index eb76d7bc1c0..353328b9ea1 100644 --- a/subsys/bluetooth/mesh/cdb.c +++ b/subsys/bluetooth/mesh/cdb.c @@ -15,6 +15,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_CDB) #define LOG_MODULE_NAME bt_mesh_cdb #include "common/log.h" +#include "common/bt_str.h" #include "cdb.h" #include "mesh.h" diff --git a/subsys/bluetooth/mesh/cfg_cli.c b/subsys/bluetooth/mesh/cfg_cli.c index 6e982754db5..5fcc6d1a399 100644 --- a/subsys/bluetooth/mesh/cfg_cli.c +++ b/subsys/bluetooth/mesh/cfg_cli.c @@ -20,6 +20,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_MODEL) #define LOG_MODULE_NAME bt_mesh_cfg_cli #include "common/log.h" +#include "common/bt_str.h" #include "net.h" #include "foundation.h" diff --git a/subsys/bluetooth/mesh/cfg_srv.c b/subsys/bluetooth/mesh/cfg_srv.c index 33bae19bf5e..f961a275377 100644 --- a/subsys/bluetooth/mesh/cfg_srv.c +++ b/subsys/bluetooth/mesh/cfg_srv.c @@ -19,6 +19,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_MODEL) #define LOG_MODULE_NAME bt_mesh_cfg_srv #include "common/log.h" +#include "common/bt_str.h" #include "host/testing.h" diff --git a/subsys/bluetooth/mesh/crypto.c b/subsys/bluetooth/mesh/crypto.c index ece3347f1dd..181dcf35ecc 100644 --- a/subsys/bluetooth/mesh/crypto.c +++ b/subsys/bluetooth/mesh/crypto.c @@ -27,6 +27,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_CRYPTO) #define LOG_MODULE_NAME bt_mesh_tc_crypto #include "common/log.h" +#include "common/bt_str.h" #include "mesh.h" #include "crypto.h" diff --git a/subsys/bluetooth/mesh/gatt_cli.c b/subsys/bluetooth/mesh/gatt_cli.c index 0232830b7db..f904282264b 100644 --- a/subsys/bluetooth/mesh/gatt_cli.c +++ b/subsys/bluetooth/mesh/gatt_cli.c @@ -18,6 +18,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROXY) #define LOG_MODULE_NAME bt_mesh_gatt_client #include "common/log.h" +#include "common/bt_str.h" #include "mesh.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/health_cli.c b/subsys/bluetooth/mesh/health_cli.c index edf7d6234c8..47d9acb9f60 100644 --- a/subsys/bluetooth/mesh/health_cli.c +++ b/subsys/bluetooth/mesh/health_cli.c @@ -19,6 +19,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_MODEL) #define LOG_MODULE_NAME bt_mesh_health_cli #include "common/log.h" +#include "common/bt_str.h" #include "net.h" #include "foundation.h" diff --git a/subsys/bluetooth/mesh/net.c b/subsys/bluetooth/mesh/net.c index d0b5b8180f9..a06e93bb250 100644 --- a/subsys/bluetooth/mesh/net.c +++ b/subsys/bluetooth/mesh/net.c @@ -20,6 +20,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_NET) #define LOG_MODULE_NAME bt_mesh_net #include "common/log.h" +#include "common/bt_str.h" #include "crypto.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/pb_adv.c b/subsys/bluetooth/mesh/pb_adv.c index d9ecec6a269..b745ca0bb8e 100644 --- a/subsys/bluetooth/mesh/pb_adv.c +++ b/subsys/bluetooth/mesh/pb_adv.c @@ -20,6 +20,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROV) #define LOG_MODULE_NAME bt_mesh_pb_adv #include "common/log.h" +#include "common/bt_str.h" #define GPCF(gpc) (gpc & 0x03) #define GPC_START(last_seg) (((last_seg) << 2) | 0x00) diff --git a/subsys/bluetooth/mesh/pb_gatt.c b/subsys/bluetooth/mesh/pb_gatt.c index 6f876a0baf4..fe2f340ef20 100644 --- a/subsys/bluetooth/mesh/pb_gatt.c +++ b/subsys/bluetooth/mesh/pb_gatt.c @@ -19,6 +19,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROV) #define LOG_MODULE_NAME bt_mesh_pb_gatt #include "common/log.h" +#include "common/bt_str.h" struct prov_bearer_send_cb { prov_bearer_send_complete_t cb; diff --git a/subsys/bluetooth/mesh/pb_gatt_srv.c b/subsys/bluetooth/mesh/pb_gatt_srv.c index d3f3b3a8ea2..f409914ab94 100644 --- a/subsys/bluetooth/mesh/pb_gatt_srv.c +++ b/subsys/bluetooth/mesh/pb_gatt_srv.c @@ -17,6 +17,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROV) #define LOG_MODULE_NAME bt_mesh_pb_gatt_srv #include "common/log.h" +#include "common/bt_str.h" #include "mesh.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/prov_device.c b/subsys/bluetooth/mesh/prov_device.c index 48625798964..f917f169c44 100644 --- a/subsys/bluetooth/mesh/prov_device.c +++ b/subsys/bluetooth/mesh/prov_device.c @@ -20,6 +20,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROV_DEVICE) #define LOG_MODULE_NAME bt_mesh_prov_device #include "common/log.h" +#include "common/bt_str.h" #include "host/ecc.h" #include "host/testing.h" diff --git a/subsys/bluetooth/mesh/provisioner.c b/subsys/bluetooth/mesh/provisioner.c index 2aec0614333..9670ee542ed 100644 --- a/subsys/bluetooth/mesh/provisioner.c +++ b/subsys/bluetooth/mesh/provisioner.c @@ -21,6 +21,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROVISIONER) #define LOG_MODULE_NAME bt_mesh_provisioner #include "common/log.h" +#include "common/bt_str.h" #include "host/ecc.h" #include "host/testing.h" diff --git a/subsys/bluetooth/mesh/proxy_msg.c b/subsys/bluetooth/mesh/proxy_msg.c index d58f5060565..091134e8cb1 100644 --- a/subsys/bluetooth/mesh/proxy_msg.c +++ b/subsys/bluetooth/mesh/proxy_msg.c @@ -19,6 +19,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROXY) #define LOG_MODULE_NAME bt_mesh_proxy #include "common/log.h" +#include "common/bt_str.h" #include "mesh.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/proxy_srv.c b/subsys/bluetooth/mesh/proxy_srv.c index 4e517053530..2d3d958a7f4 100644 --- a/subsys/bluetooth/mesh/proxy_srv.c +++ b/subsys/bluetooth/mesh/proxy_srv.c @@ -17,6 +17,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_PROXY) #define LOG_MODULE_NAME bt_mesh_gatt #include "common/log.h" +#include "common/bt_str.h" #include "mesh.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/subnet.c b/subsys/bluetooth/mesh/subnet.c index 671b153cc3a..ee2daf149a6 100644 --- a/subsys/bluetooth/mesh/subnet.c +++ b/subsys/bluetooth/mesh/subnet.c @@ -22,6 +22,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_KEYS) #define LOG_MODULE_NAME bt_mesh_net_keys #include "common/log.h" +#include "common/bt_str.h" #include "crypto.h" #include "adv.h" diff --git a/subsys/bluetooth/mesh/transport.c b/subsys/bluetooth/mesh/transport.c index 97e8f3c382a..b40f7a8a0d6 100644 --- a/subsys/bluetooth/mesh/transport.c +++ b/subsys/bluetooth/mesh/transport.c @@ -20,6 +20,7 @@ #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_MESH_DEBUG_TRANS) #define LOG_MODULE_NAME bt_mesh_transport #include "common/log.h" +#include "common/bt_str.h" #include "host/testing.h"