mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-07 02:27:56 +00:00
nimble/mesh: Add support for log modules
This PR adds support for various log modules which is possible thanks to modlog feature. With this feature we can specify a logging level for each module separately which could have the following advantages: - Being able to filter out only the logs that we are interested in at the moment - Controlling log level in runtime - Improved readability if we start printing module name in log header - Ability to use color-coded log messages by mapping module to a specific color
This commit is contained in:
@@ -32,8 +32,6 @@
|
||||
#include "services/gap/ble_svc_gap.h"
|
||||
#include "mesh/glue.h"
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG))
|
||||
|
||||
/* Company ID */
|
||||
#define CID_VENDOR 0x05C3
|
||||
#define STANDARD_TEST_ID 0x00
|
||||
|
||||
@@ -35,18 +35,5 @@ syscfg.vals:
|
||||
BLE_MESH_ADV_BUF_COUNT: 20
|
||||
BLE_MESH_TX_SEG_MAX: 6
|
||||
|
||||
BLE_MESH_DEBUG: 1
|
||||
BLE_MESH_DEBUG_NET: 1
|
||||
BLE_MESH_DEBUG_TRANS: 1
|
||||
BLE_MESH_DEBUG_BEACON: 1
|
||||
BLE_MESH_DEBUG_CRYPTO: 1
|
||||
BLE_MESH_DEBUG_PROV: 1
|
||||
BLE_MESH_DEBUG_ACCESS: 1
|
||||
BLE_MESH_DEBUG_MODEL: 1
|
||||
BLE_MESH_DEBUG_ADV: 1
|
||||
BLE_MESH_DEBUG_LOW_POWER: 1
|
||||
BLE_MESH_DEBUG_FRIEND: 1
|
||||
BLE_MESH_DEBUG_PROXY: 1
|
||||
|
||||
BLE_MESH_SETTINGS: 0
|
||||
CONFIG_NFFS: 0
|
||||
|
||||
@@ -36,16 +36,3 @@ syscfg.vals:
|
||||
|
||||
BLE_MESH_ADV_BUF_COUNT: 20
|
||||
BLE_MESH_TX_SEG_MAX: 6
|
||||
|
||||
BLE_MESH_DEBUG: 0
|
||||
BLE_MESH_DEBUG_NET: 0
|
||||
BLE_MESH_DEBUG_TRANS: 0
|
||||
BLE_MESH_DEBUG_BEACON: 0
|
||||
BLE_MESH_DEBUG_CRYPTO: 0
|
||||
BLE_MESH_DEBUG_PROV: 0
|
||||
BLE_MESH_DEBUG_ACCESS: 0
|
||||
BLE_MESH_DEBUG_MODEL: 0
|
||||
BLE_MESH_DEBUG_ADV: 0
|
||||
BLE_MESH_DEBUG_LOW_POWER: 0
|
||||
BLE_MESH_DEBUG_FRIEND: 0
|
||||
BLE_MESH_DEBUG_PROXY: 0
|
||||
|
||||
@@ -58,16 +58,3 @@ syscfg.vals:
|
||||
BLE_MESH_APP_KEY_COUNT: 2
|
||||
BLE_MESH_MODEL_GROUP_COUNT: 2
|
||||
BLE_MESH_LABEL_COUNT: 3
|
||||
|
||||
BLE_MESH_DEBUG: 0
|
||||
BLE_MESH_DEBUG_NET: 0
|
||||
BLE_MESH_DEBUG_TRANS: 0
|
||||
BLE_MESH_DEBUG_BEACON: 0
|
||||
BLE_MESH_DEBUG_CRYPTO: 0
|
||||
BLE_MESH_DEBUG_PROV: 0
|
||||
BLE_MESH_DEBUG_ACCESS: 0
|
||||
BLE_MESH_DEBUG_MODEL: 0
|
||||
BLE_MESH_DEBUG_ADV: 0
|
||||
BLE_MESH_DEBUG_LOW_POWER: 0
|
||||
BLE_MESH_DEBUG_FRIEND: 0
|
||||
BLE_MESH_DEBUG_PROXY: 0
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
#define MESH_LOG_MODULE BLE_MESH_LOG
|
||||
|
||||
#include <assert.h>
|
||||
#include "os/mynewt.h"
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
@@ -53,16 +53,3 @@ syscfg.vals:
|
||||
BLE_MESH_CFG_CLI: 1
|
||||
BLE_MESH_SETTINGS: 0
|
||||
CONFIG_NFFS: 0
|
||||
|
||||
BLE_MESH_DEBUG: 0
|
||||
BLE_MESH_DEBUG_NET: 0
|
||||
BLE_MESH_DEBUG_TRANS: 0
|
||||
BLE_MESH_DEBUG_BEACON: 0
|
||||
BLE_MESH_DEBUG_CRYPTO: 0
|
||||
BLE_MESH_DEBUG_PROV: 0
|
||||
BLE_MESH_DEBUG_ACCESS: 0
|
||||
BLE_MESH_DEBUG_MODEL: 0
|
||||
BLE_MESH_DEBUG_ADV: 0
|
||||
BLE_MESH_DEBUG_LOW_POWER: 0
|
||||
BLE_MESH_DEBUG_FRIEND: 0
|
||||
BLE_MESH_DEBUG_PROXY: 0
|
||||
|
||||
@@ -115,17 +115,3 @@ syscfg.vals:
|
||||
|
||||
BLE_MESH_ADV_BUF_COUNT: 20
|
||||
BLE_MESH_TX_SEG_MAX: 6
|
||||
|
||||
BLE_MESH_DEBUG: 0
|
||||
BLE_MESH_DEBUG_NET: 0
|
||||
BLE_MESH_DEBUG_TRANS: 0
|
||||
BLE_MESH_DEBUG_BEACON: 0
|
||||
BLE_MESH_DEBUG_CRYPTO: 0
|
||||
BLE_MESH_DEBUG_PROV: 0
|
||||
BLE_MESH_DEBUG_ACCESS: 0
|
||||
BLE_MESH_DEBUG_MODEL: 0
|
||||
BLE_MESH_DEBUG_ADV: 0
|
||||
BLE_MESH_DEBUG_LOW_POWER: 0
|
||||
BLE_MESH_DEBUG_FRIEND: 0
|
||||
BLE_MESH_DEBUG_PROXY: 0
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#include "logcfg/logcfg.h"
|
||||
#include "modlog/modlog.h"
|
||||
#include "nimble/nimble_npl.h"
|
||||
|
||||
#include "os/os_mbuf.h"
|
||||
@@ -168,13 +170,19 @@ extern "C" {
|
||||
#define BT_GAP_ADV_SLOW_INT_MIN 0x0640 /* 1 s */
|
||||
#define BT_GAP_ADV_SLOW_INT_MAX 0x0780 /* 1.2 s */
|
||||
|
||||
#define BT_DBG(fmt, ...) \
|
||||
if (BT_DBG_ENABLED) { \
|
||||
BLE_HS_LOG(DEBUG, "%s: " fmt "\n", __func__, ## __VA_ARGS__); \
|
||||
}
|
||||
#define BT_INFO(fmt, ...) BLE_HS_LOG(INFO, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#define BT_WARN(fmt, ...) BLE_HS_LOG(WARN, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#define BT_ERR(fmt, ...) BLE_HS_LOG(ERROR, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#ifndef MESH_LOG_MODULE
|
||||
#define MESH_LOG_MODULE BLE_MESH_LOG
|
||||
#endif
|
||||
|
||||
#define CAT(a, ...) PRIMITIVE_CAT(a, __VA_ARGS__)
|
||||
#define PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
|
||||
|
||||
#define BLE_MESH_LOG(lvl, ...) CAT(MESH_LOG_MODULE, CAT(_, lvl))(__VA_ARGS__)
|
||||
|
||||
#define BT_DBG(fmt, ...) BLE_MESH_LOG(DEBUG, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#define BT_INFO(fmt, ...) BLE_MESH_LOG(INFO, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#define BT_WARN(fmt, ...) BLE_MESH_LOG(WARN, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#define BT_ERR(fmt, ...) BLE_MESH_LOG(ERROR, "%s: " fmt "\n", __func__, ## __VA_ARGS__);
|
||||
#define BT_GATT_ERR(_att_err) (-(_att_err))
|
||||
|
||||
typedef ble_addr_t bt_addr_le_t;
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <os/os_mbuf.h>
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_ACCESS))
|
||||
#include "host/ble_hs_log.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_ACCESS_LOG
|
||||
|
||||
#include <errno.h>
|
||||
#include <os/os_mbuf.h>
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "mesh_priv.h"
|
||||
#include "adv.h"
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_ADV))
|
||||
#include "host/ble_hs_log.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_ADV_LOG
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "host/ble_hs_adv.h"
|
||||
#include "host/ble_gap.h"
|
||||
#include "nimble/hci_common.h"
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_BEACON_LOG
|
||||
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include "os/os_mbuf.h"
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_BEACON))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "adv.h"
|
||||
#include "mesh_priv.h"
|
||||
#include "net.h"
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
|
||||
#if MYNEWT_VAL(BLE_MESH_CFG_CLI)
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL))
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -6,16 +6,15 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_MODEL)
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "mesh_priv.h"
|
||||
#include "adv.h"
|
||||
#include "net.h"
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG
|
||||
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
@@ -16,10 +19,6 @@
|
||||
#include <tinycrypt/cmac_mode.h>
|
||||
#include <tinycrypt/ccm_mode.h>
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_CRYPTO))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "crypto.h"
|
||||
|
||||
#define NET_MIC_LEN(pdu) (((pdu)[1] & 0x80) ? 8 : 4)
|
||||
|
||||
@@ -6,17 +6,15 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_FRIEND)
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_FRIEND))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh/slist.h"
|
||||
#include "mesh_priv.h"
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_LOG
|
||||
|
||||
#include "mesh/glue.h"
|
||||
#include "adv.h"
|
||||
#ifndef MYNEWT
|
||||
@@ -27,8 +30,6 @@
|
||||
#include "base64/base64.h"
|
||||
#endif
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG))
|
||||
|
||||
extern u8_t g_mesh_addr_type;
|
||||
|
||||
#if MYNEWT_VAL(BLE_EXT_ADV)
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh_priv.h"
|
||||
#include "adv.h"
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh_priv.h"
|
||||
#include "adv.h"
|
||||
|
||||
@@ -7,14 +7,12 @@
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_LOW_POWER_LOG
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_LOW_POWER)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh_priv.h"
|
||||
#include "crypto.h"
|
||||
@@ -66,7 +64,7 @@
|
||||
|
||||
static void (*lpn_cb)(u16_t friend_addr, bool established);
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER)
|
||||
#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG
|
||||
static const char *state2str(int state)
|
||||
{
|
||||
switch (state) {
|
||||
@@ -92,11 +90,11 @@ static const char *state2str(int state)
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BLUETOOTH_MESH_DEBUG_LPN */
|
||||
#endif
|
||||
|
||||
static inline void lpn_set_state(int state)
|
||||
{
|
||||
#if MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER)
|
||||
#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG
|
||||
BT_DBG("%s -> %s", state2str(bt_mesh.lpn.state), state2str(state));
|
||||
#endif
|
||||
bt_mesh.lpn.state = state;
|
||||
@@ -311,7 +309,7 @@ static void req_sent(u16_t duration, int err, void *user_data)
|
||||
{
|
||||
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
|
||||
|
||||
#if BT_DBG_ENABLED
|
||||
#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG
|
||||
BT_DBG("req 0x%02x duration %u err %d state %s",
|
||||
lpn->sent_req, duration, err, state2str(lpn->state));
|
||||
#endif
|
||||
@@ -725,7 +723,7 @@ static void lpn_timeout(struct ble_npl_event *work)
|
||||
{
|
||||
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER)
|
||||
#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG
|
||||
BT_DBG("state: %s", state2str(lpn->state));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_LOG
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "os/os_mbuf.h"
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG))
|
||||
#include "host/ble_hs_log.h"
|
||||
#include "host/ble_uuid.h"
|
||||
|
||||
#include "adv.h"
|
||||
@@ -149,14 +148,12 @@ int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
|
||||
return -EALREADY;
|
||||
}
|
||||
|
||||
if (MYNEWT_VAL(BLE_MESH_DEBUG)) {
|
||||
char uuid_buf[BLE_UUID_STR_LEN];
|
||||
const struct bt_mesh_prov *prov = bt_mesh_prov_get();
|
||||
ble_uuid_t *uuid = BLE_UUID128_DECLARE();
|
||||
char uuid_buf[BLE_UUID_STR_LEN];
|
||||
const struct bt_mesh_prov *prov = bt_mesh_prov_get();
|
||||
ble_uuid_t *uuid = BLE_UUID128_DECLARE();
|
||||
|
||||
memcpy(BLE_UUID128(uuid)->value, prov->uuid, 16);
|
||||
BT_INFO("Device UUID: %s", ble_uuid_to_str(uuid, uuid_buf));
|
||||
}
|
||||
memcpy(BLE_UUID128(uuid)->value, prov->uuid, 16);
|
||||
BT_INFO("Device UUID: %s", ble_uuid_to_str(uuid, uuid_buf));
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) &&
|
||||
(bearers & BT_MESH_PROV_ADV)) {
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <mesh/mesh.h>
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL))
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh/model_cli.h"
|
||||
#include "mesh_priv.h"
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL))
|
||||
|
||||
#include "mesh/model_srv.h"
|
||||
#include "mesh_priv.h"
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_NET_LOG
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
@@ -13,10 +16,6 @@
|
||||
#include "os/os_mbuf.h"
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_NET)
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "crypto.h"
|
||||
#include "adv.h"
|
||||
#include "mesh_priv.h"
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_PROV_LOG
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_PROV)
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_PROV))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh_priv.h"
|
||||
|
||||
|
||||
@@ -7,13 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_PROXY_LOG
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_PROXY)
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_PROXY))
|
||||
#include "host/ble_hs_log.h"
|
||||
#include "host/ble_att.h"
|
||||
#include "services/gatt/ble_svc_gatt.h"
|
||||
#include "../../host/src/ble_hs_priv.h"
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_SETTINGS_LOG
|
||||
|
||||
#if MYNEWT_VAL(BLE_MESH_SETTINGS)
|
||||
|
||||
#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_SETTINGS)
|
||||
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh/glue.h"
|
||||
#include "net.h"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define MESH_LOG_MODULE BLE_MESH_TRANS_LOG
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
@@ -13,10 +15,6 @@
|
||||
#include "mesh/mesh.h"
|
||||
#include "mesh_priv.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_TRANS))
|
||||
#include "host/ble_hs_log.h"
|
||||
|
||||
#include "crypto.h"
|
||||
#include "adv.h"
|
||||
#include "net.h"
|
||||
|
||||
+172
-76
@@ -347,82 +347,6 @@ syscfg.defs:
|
||||
the console.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG:
|
||||
description: >
|
||||
Use this option to enable debug logs for the Bluetooth
|
||||
Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_NET:
|
||||
description: >
|
||||
Use this option to enable Network layer debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_TRANS:
|
||||
description: >
|
||||
Use this option to enable Transport layer debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_BEACON:
|
||||
description: >
|
||||
Use this option to enable Beacon-related debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_CRYPTO:
|
||||
description: >
|
||||
Use this option to enable cryptographic debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_PROV:
|
||||
description: >
|
||||
Use this option to enable Provisioning debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_ACCESS:
|
||||
description: >
|
||||
Use this option to enable Access layer and device composition
|
||||
related debug logs for Bluetooth Mesh.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_MODEL:
|
||||
description: >
|
||||
Use this option to enable debug logs for the Foundation
|
||||
Models.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_ADV:
|
||||
description: >
|
||||
Use this option to enable advertising debug logs for
|
||||
the Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_LOW_POWER:
|
||||
description: >
|
||||
Use this option to enable Low Power debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_FRIEND:
|
||||
description: >
|
||||
Use this option to enable Friend debug logs for the
|
||||
Bluetooth Mesh functionality.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_PROXY:
|
||||
description: >
|
||||
Use this option to enable Proxy protocol debug logs.
|
||||
value: 0
|
||||
|
||||
BLE_MESH_DEBUG_SETTINGS:
|
||||
description: >
|
||||
Use this option to enable persistent settings debug logs.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_IV_UPDATE_TEST:
|
||||
description: >
|
||||
This option removes the 96 hour limit of the IV Update
|
||||
@@ -530,6 +454,178 @@ syscfg.defs:
|
||||
Secondary sysinit stage for BLE mesh functionality.
|
||||
value: 1000
|
||||
|
||||
### Log settings.
|
||||
|
||||
BLE_MESH_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh log messages.
|
||||
value: 9
|
||||
BLE_MESH_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_ACCESS_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Access-related log messages.
|
||||
value: 10
|
||||
BLE_MESH_ACCESS_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Access-related log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_ADV_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh advertising log messages.
|
||||
value: 11
|
||||
BLE_MESH_ADV_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_BEACON_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Beacon-related log messages.
|
||||
value: 12
|
||||
BLE_MESH_BEACON_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Beacon-related log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_CRYPTO_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh cryptographic log messages.
|
||||
value: 13
|
||||
BLE_MESH_CRYPTO_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh cryptographic log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_FRIEND_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Friend log messages.
|
||||
value: 14
|
||||
BLE_MESH_FRIEND_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Friend log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_LOW_POWER_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Low Power log messages.
|
||||
value: 15
|
||||
BLE_MESH_LOW_POWER_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Low Power log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_MODEL_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Foundation Models log messages.
|
||||
value: 16
|
||||
BLE_MESH_MODEL_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Foundation Models log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_NET_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Network layer log messages.
|
||||
value: 17
|
||||
BLE_MESH_NET_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Network layer log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_PROV_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Provisioning log messages.
|
||||
value: 18
|
||||
BLE_MESH_PROV_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Provisioning log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_PROXY_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Proxy protocol log messages.
|
||||
value: 19
|
||||
BLE_MESH_PROXY_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Proxy protocol log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_SETTINGS_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh persistent settings log messages.
|
||||
value: 20
|
||||
BLE_MESH_SETTINGS_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh persistent settings log.
|
||||
value: 1
|
||||
|
||||
BLE_MESH_TRANS_LOG_MOD:
|
||||
description: >
|
||||
Numeric module ID to use for BLE Mesh Transport Layer log messages.
|
||||
value: 21
|
||||
BLE_MESH_TRANS_LOG_LVL:
|
||||
description: >
|
||||
Minimum level for the BLE Mesh Transport Layer log.
|
||||
value: 1
|
||||
|
||||
syscfg.logs:
|
||||
BLE_MESH_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_LOG_LVL)
|
||||
|
||||
BLE_MESH_ACCESS_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_ACCESS_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_ACCESS_LOG_LVL)
|
||||
|
||||
BLE_MESH_ADV_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_ADV_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_ADV_LOG_LVL)
|
||||
|
||||
BLE_MESH_BEACON_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_BEACON_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_BEACON_LOG_LVL)
|
||||
|
||||
BLE_MESH_CRYPTO_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_CRYPTO_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_CRYPTO_LOG_LVL)
|
||||
|
||||
BLE_MESH_FRIEND_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_FRIEND_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_FRIEND_LOG_LVL)
|
||||
|
||||
BLE_MESH_LOW_POWER_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL)
|
||||
|
||||
BLE_MESH_MODEL_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_MODEL_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_MODEL_LOG_LVL)
|
||||
|
||||
BLE_MESH_NET_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_NET_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_NET_LOG_LVL)
|
||||
|
||||
BLE_MESH_PROV_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_PROV_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_PROV_LOG_LVL)
|
||||
|
||||
BLE_MESH_PROXY_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_PROXY_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_PROXY_LOG_LVL)
|
||||
|
||||
BLE_MESH_SETTINGS_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_SETTINGS_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_SETTINGS_LOG_LVL)
|
||||
|
||||
BLE_MESH_TRANS_LOG:
|
||||
module: MYNEWT_VAL(BLE_MESH_TRANS_LOG_MOD)
|
||||
level: MYNEWT_VAL(BLE_MESH_TRANS_LOG_LVL)
|
||||
|
||||
syscfg.vals.BLE_MESH_SHELL:
|
||||
BLE_MESH_CFG_CLI: 1
|
||||
BLE_MESH_HEALTH_CLI: 1
|
||||
|
||||
@@ -15,6 +15,97 @@
|
||||
#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__)
|
||||
#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_ACCESS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_ACCESS_LOG_INFO(...) MODLOG_INFO(10, __VA_ARGS__)
|
||||
#define BLE_MESH_ACCESS_LOG_WARN(...) MODLOG_WARN(10, __VA_ARGS__)
|
||||
#define BLE_MESH_ACCESS_LOG_ERROR(...) MODLOG_ERROR(10, __VA_ARGS__)
|
||||
#define BLE_MESH_ACCESS_LOG_CRITICAL(...) MODLOG_CRITICAL(10, __VA_ARGS__)
|
||||
#define BLE_MESH_ACCESS_LOG_DISABLED(...) MODLOG_DISABLED(10, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_ADV_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_ADV_LOG_INFO(...) MODLOG_INFO(11, __VA_ARGS__)
|
||||
#define BLE_MESH_ADV_LOG_WARN(...) MODLOG_WARN(11, __VA_ARGS__)
|
||||
#define BLE_MESH_ADV_LOG_ERROR(...) MODLOG_ERROR(11, __VA_ARGS__)
|
||||
#define BLE_MESH_ADV_LOG_CRITICAL(...) MODLOG_CRITICAL(11, __VA_ARGS__)
|
||||
#define BLE_MESH_ADV_LOG_DISABLED(...) MODLOG_DISABLED(11, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_BEACON_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_BEACON_LOG_INFO(...) MODLOG_INFO(12, __VA_ARGS__)
|
||||
#define BLE_MESH_BEACON_LOG_WARN(...) MODLOG_WARN(12, __VA_ARGS__)
|
||||
#define BLE_MESH_BEACON_LOG_ERROR(...) MODLOG_ERROR(12, __VA_ARGS__)
|
||||
#define BLE_MESH_BEACON_LOG_CRITICAL(...) MODLOG_CRITICAL(12, __VA_ARGS__)
|
||||
#define BLE_MESH_BEACON_LOG_DISABLED(...) MODLOG_DISABLED(12, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_CRYPTO_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_CRYPTO_LOG_INFO(...) MODLOG_INFO(13, __VA_ARGS__)
|
||||
#define BLE_MESH_CRYPTO_LOG_WARN(...) MODLOG_WARN(13, __VA_ARGS__)
|
||||
#define BLE_MESH_CRYPTO_LOG_ERROR(...) MODLOG_ERROR(13, __VA_ARGS__)
|
||||
#define BLE_MESH_CRYPTO_LOG_CRITICAL(...) MODLOG_CRITICAL(13, __VA_ARGS__)
|
||||
#define BLE_MESH_CRYPTO_LOG_DISABLED(...) MODLOG_DISABLED(13, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_FRIEND_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_FRIEND_LOG_INFO(...) MODLOG_INFO(14, __VA_ARGS__)
|
||||
#define BLE_MESH_FRIEND_LOG_WARN(...) MODLOG_WARN(14, __VA_ARGS__)
|
||||
#define BLE_MESH_FRIEND_LOG_ERROR(...) MODLOG_ERROR(14, __VA_ARGS__)
|
||||
#define BLE_MESH_FRIEND_LOG_CRITICAL(...) MODLOG_CRITICAL(14, __VA_ARGS__)
|
||||
#define BLE_MESH_FRIEND_LOG_DISABLED(...) MODLOG_DISABLED(14, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_LOG_INFO(...) MODLOG_INFO(9, __VA_ARGS__)
|
||||
#define BLE_MESH_LOG_WARN(...) MODLOG_WARN(9, __VA_ARGS__)
|
||||
#define BLE_MESH_LOG_ERROR(...) MODLOG_ERROR(9, __VA_ARGS__)
|
||||
#define BLE_MESH_LOG_CRITICAL(...) MODLOG_CRITICAL(9, __VA_ARGS__)
|
||||
#define BLE_MESH_LOG_DISABLED(...) MODLOG_DISABLED(9, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_LOW_POWER_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_LOW_POWER_LOG_INFO(...) MODLOG_INFO(15, __VA_ARGS__)
|
||||
#define BLE_MESH_LOW_POWER_LOG_WARN(...) MODLOG_WARN(15, __VA_ARGS__)
|
||||
#define BLE_MESH_LOW_POWER_LOG_ERROR(...) MODLOG_ERROR(15, __VA_ARGS__)
|
||||
#define BLE_MESH_LOW_POWER_LOG_CRITICAL(...) MODLOG_CRITICAL(15, __VA_ARGS__)
|
||||
#define BLE_MESH_LOW_POWER_LOG_DISABLED(...) MODLOG_DISABLED(15, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_MODEL_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_MODEL_LOG_INFO(...) MODLOG_INFO(16, __VA_ARGS__)
|
||||
#define BLE_MESH_MODEL_LOG_WARN(...) MODLOG_WARN(16, __VA_ARGS__)
|
||||
#define BLE_MESH_MODEL_LOG_ERROR(...) MODLOG_ERROR(16, __VA_ARGS__)
|
||||
#define BLE_MESH_MODEL_LOG_CRITICAL(...) MODLOG_CRITICAL(16, __VA_ARGS__)
|
||||
#define BLE_MESH_MODEL_LOG_DISABLED(...) MODLOG_DISABLED(16, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_NET_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_NET_LOG_INFO(...) MODLOG_INFO(17, __VA_ARGS__)
|
||||
#define BLE_MESH_NET_LOG_WARN(...) MODLOG_WARN(17, __VA_ARGS__)
|
||||
#define BLE_MESH_NET_LOG_ERROR(...) MODLOG_ERROR(17, __VA_ARGS__)
|
||||
#define BLE_MESH_NET_LOG_CRITICAL(...) MODLOG_CRITICAL(17, __VA_ARGS__)
|
||||
#define BLE_MESH_NET_LOG_DISABLED(...) MODLOG_DISABLED(17, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_PROV_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_PROV_LOG_INFO(...) MODLOG_INFO(18, __VA_ARGS__)
|
||||
#define BLE_MESH_PROV_LOG_WARN(...) MODLOG_WARN(18, __VA_ARGS__)
|
||||
#define BLE_MESH_PROV_LOG_ERROR(...) MODLOG_ERROR(18, __VA_ARGS__)
|
||||
#define BLE_MESH_PROV_LOG_CRITICAL(...) MODLOG_CRITICAL(18, __VA_ARGS__)
|
||||
#define BLE_MESH_PROV_LOG_DISABLED(...) MODLOG_DISABLED(18, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_PROXY_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_PROXY_LOG_INFO(...) MODLOG_INFO(19, __VA_ARGS__)
|
||||
#define BLE_MESH_PROXY_LOG_WARN(...) MODLOG_WARN(19, __VA_ARGS__)
|
||||
#define BLE_MESH_PROXY_LOG_ERROR(...) MODLOG_ERROR(19, __VA_ARGS__)
|
||||
#define BLE_MESH_PROXY_LOG_CRITICAL(...) MODLOG_CRITICAL(19, __VA_ARGS__)
|
||||
#define BLE_MESH_PROXY_LOG_DISABLED(...) MODLOG_DISABLED(19, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_SETTINGS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_SETTINGS_LOG_INFO(...) MODLOG_INFO(20, __VA_ARGS__)
|
||||
#define BLE_MESH_SETTINGS_LOG_WARN(...) MODLOG_WARN(20, __VA_ARGS__)
|
||||
#define BLE_MESH_SETTINGS_LOG_ERROR(...) MODLOG_ERROR(20, __VA_ARGS__)
|
||||
#define BLE_MESH_SETTINGS_LOG_CRITICAL(...) MODLOG_CRITICAL(20, __VA_ARGS__)
|
||||
#define BLE_MESH_SETTINGS_LOG_DISABLED(...) MODLOG_DISABLED(20, __VA_ARGS__)
|
||||
|
||||
#define BLE_MESH_TRANS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define BLE_MESH_TRANS_LOG_INFO(...) MODLOG_INFO(21, __VA_ARGS__)
|
||||
#define BLE_MESH_TRANS_LOG_WARN(...) MODLOG_WARN(21, __VA_ARGS__)
|
||||
#define BLE_MESH_TRANS_LOG_ERROR(...) MODLOG_ERROR(21, __VA_ARGS__)
|
||||
#define BLE_MESH_TRANS_LOG_CRITICAL(...) MODLOG_CRITICAL(21, __VA_ARGS__)
|
||||
#define BLE_MESH_TRANS_LOG_DISABLED(...) MODLOG_DISABLED(21, __VA_ARGS__)
|
||||
|
||||
#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
|
||||
#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__)
|
||||
#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__)
|
||||
|
||||
@@ -741,11 +741,27 @@
|
||||
#endif
|
||||
|
||||
/*** @apache-mynewt-nimble/nimble/host/mesh */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_ACCESS_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_ACCESS_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_ACCESS_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_ACCESS_LOG_MOD (10)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT
|
||||
#define MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT (20)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_ADV_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_ADV_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_ADV_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_ADV_LOG_MOD (11)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO
|
||||
#define MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO (9)
|
||||
#endif
|
||||
@@ -755,6 +771,14 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_APP_KEY_COUNT (4)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_BEACON_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_BEACON_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_BEACON_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_BEACON_LOG_MOD (12)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_CFG_CLI
|
||||
#define MYNEWT_VAL_BLE_MESH_CFG_CLI (1)
|
||||
@@ -764,56 +788,12 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_CRPL (10)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG (0)
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ADV
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_ADV (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_BEACON
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_BEACON (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_CRYPTO
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_CRYPTO (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_FRIEND
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_FRIEND (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_LOW_POWER
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_LOW_POWER (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_MODEL
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_MODEL (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_NET
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_NET (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_PROV
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_PROV (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_PROXY
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_PROXY (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_SETTINGS
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_SETTINGS (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_TRANS
|
||||
#define MYNEWT_VAL_BLE_MESH_DEBUG_TRANS (0)
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_MOD (13)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_DEVICE_NAME
|
||||
@@ -829,6 +809,14 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_FRIEND (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_FRIEND_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_FRIEND_LOG_MOD (14)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LPN_COUNT
|
||||
#define MYNEWT_VAL_BLE_MESH_FRIEND_LPN_COUNT (2)
|
||||
#endif
|
||||
@@ -872,11 +860,27 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_LABEL_COUNT (2)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_LOG_MOD (9)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER
|
||||
#define MYNEWT_VAL_BLE_MESH_LOW_POWER (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_MOD (15)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LPN_AUTO
|
||||
#define MYNEWT_VAL_BLE_MESH_LPN_AUTO (0)
|
||||
@@ -935,10 +939,26 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_MODEL_KEY_COUNT (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_MODEL_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_MODEL_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_MODEL_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_MODEL_LOG_MOD (16)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_MSG_CACHE_SIZE
|
||||
#define MYNEWT_VAL_BLE_MESH_MSG_CACHE_SIZE (10)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_NET_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_NET_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_NET_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_NET_LOG_MOD (17)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_NODE_ID_TIMEOUT
|
||||
#define MYNEWT_VAL_BLE_MESH_NODE_ID_TIMEOUT (60)
|
||||
#endif
|
||||
@@ -974,6 +994,14 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_PROV (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_PROV_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_PROV_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_PROV_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_PROV_LOG_MOD (18)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/nimble/host/mesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_PROXY
|
||||
#define MYNEWT_VAL_BLE_MESH_PROXY (1)
|
||||
@@ -983,6 +1011,14 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_PROXY_FILTER_SIZE (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_PROXY_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_PROXY_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_PROXY_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_PROXY_LOG_MOD (19)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_RELAY
|
||||
#define MYNEWT_VAL_BLE_MESH_RELAY (1)
|
||||
@@ -1013,6 +1049,14 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_SETTINGS (0)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_MOD (20)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_SHELL
|
||||
#define MYNEWT_VAL_BLE_MESH_SHELL (0)
|
||||
@@ -1044,6 +1088,14 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_TESTING (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TRANS_LOG_LVL
|
||||
#define MYNEWT_VAL_BLE_MESH_TRANS_LOG_LVL (1)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TRANS_LOG_MOD
|
||||
#define MYNEWT_VAL_BLE_MESH_TRANS_LOG_MOD (21)
|
||||
#endif
|
||||
|
||||
/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MAX
|
||||
#define MYNEWT_VAL_BLE_MESH_TX_SEG_MAX (6)
|
||||
|
||||
Reference in New Issue
Block a user