mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
ble_mesh: add BQB LOG
This commit is contained in:
@ -1464,6 +1464,9 @@ static void mod_sub_add(struct bt_mesh_model *model,
|
|||||||
goto send_status;
|
goto send_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BT_BQB(BLE_MESH_BQB_TEST_LOG_LEVEL_PRIMARY_ID_NODE | BLE_MESH_BQB_TEST_LOG_LEVEL_SUB_ID_TNPT,
|
||||||
|
"SubGroupAddr: 0x%x", sub_addr);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(mod->groups); i++) {
|
for (i = 0; i < ARRAY_SIZE(mod->groups); i++) {
|
||||||
if (mod->groups[i] == BLE_MESH_ADDR_UNASSIGNED) {
|
if (mod->groups[i] == BLE_MESH_ADDR_UNASSIGNED) {
|
||||||
mod->groups[i] = sub_addr;
|
mod->groups[i] = sub_addr;
|
||||||
@ -1865,6 +1868,9 @@ static void mod_sub_va_add(struct bt_mesh_model *model,
|
|||||||
goto send_status;
|
goto send_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BT_BQB(BLE_MESH_BQB_TEST_LOG_LEVEL_PRIMARY_ID_NODE | BLE_MESH_BQB_TEST_LOG_LEVEL_SUB_ID_TNPT,
|
||||||
|
"SubVirtualAddr: 0x%x", sub_addr);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(mod->groups); i++) {
|
for (i = 0; i < ARRAY_SIZE(mod->groups); i++) {
|
||||||
if (mod->groups[i] == BLE_MESH_ADDR_UNASSIGNED) {
|
if (mod->groups[i] == BLE_MESH_ADDR_UNASSIGNED) {
|
||||||
mod->groups[i] = sub_addr;
|
mod->groups[i] = sub_addr;
|
||||||
|
@ -1472,6 +1472,11 @@ void bt_mesh_net_recv(struct net_buf_simple *data, int8_t rssi,
|
|||||||
/* Save the state so the buffer can later be relayed */
|
/* Save the state so the buffer can later be relayed */
|
||||||
net_buf_simple_save(&buf, &state);
|
net_buf_simple_save(&buf, &state);
|
||||||
|
|
||||||
|
BT_BQB(BLE_MESH_BQB_TEST_LOG_LEVEL_PRIMARY_ID_NODE | BLE_MESH_BQB_TEST_LOG_LEVEL_SUB_ID_NET,
|
||||||
|
"\nNetRecv: ctl: %d, src: %d, dst: %d, ttl: %d, data: 0x%s",
|
||||||
|
CTL(buf.data), SRC(buf.data), DST(buf.data), TTL(buf.data),
|
||||||
|
bt_hex(buf.data + BLE_MESH_NET_HDR_LEN, buf.len - BLE_MESH_NET_HDR_LEN));
|
||||||
|
|
||||||
rx.local_match = (bt_mesh_fixed_group_match(rx.ctx.recv_dst) ||
|
rx.local_match = (bt_mesh_fixed_group_match(rx.ctx.recv_dst) ||
|
||||||
bt_mesh_elem_find(rx.ctx.recv_dst));
|
bt_mesh_elem_find(rx.ctx.recv_dst));
|
||||||
|
|
||||||
|
@ -2872,8 +2872,8 @@ static void prov_msg_recv(const uint8_t idx)
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
/**
|
/**
|
||||||
* FOR the case MESH/PVNR/PROV/BV-10-C and MESH/PVNR/PROV/BI-14-C
|
* For the case MESH/PVNR/PROV/BV-10-C and MESH/PVNR/PROV/BI-14-C,
|
||||||
* Provisioner should send transaction ack before closing the link
|
* provisioner should send transaction ack before closing the link.
|
||||||
*/
|
*/
|
||||||
gen_prov_ack_send(idx, link[idx].rx.trans_id);
|
gen_prov_ack_send(idx, link[idx].rx.trans_id);
|
||||||
|
|
||||||
|
@ -22,9 +22,11 @@
|
|||||||
#if (CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_GATT) || \
|
#if (CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_GATT) || \
|
||||||
CONFIG_BLE_MESH_GATT_PROXY_SERVER
|
CONFIG_BLE_MESH_GATT_PROXY_SERVER
|
||||||
|
|
||||||
|
#if !CONFIG_BLE_MESH_BQB_TEST
|
||||||
/* Not support enabling Proxy Client and Proxy Server simultaneously */
|
/* Not support enabling Proxy Client and Proxy Server simultaneously */
|
||||||
_Static_assert(!(IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_SERVER) &&IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_CLIENT)),
|
_Static_assert(!(IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_SERVER) &&IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_CLIENT)),
|
||||||
"Not support Proxy Server and Proxy Client simultaneously");
|
"Not support Proxy Server and Proxy Client simultaneously");
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PDU_TYPE(data) (data[0] & BIT_MASK(6))
|
#define PDU_TYPE(data) (data[0] & BIT_MASK(6))
|
||||||
#define PDU_SAR(data) (data[0] >> 6)
|
#define PDU_SAR(data) (data[0] >> 6)
|
||||||
|
@ -782,6 +782,11 @@ static int sdu_recv(struct bt_mesh_net_rx *rx, uint32_t seq, uint8_t hdr,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BT_BQB(BLE_MESH_BQB_TEST_LOG_LEVEL_PRIMARY_ID_NODE | BLE_MESH_BQB_TEST_LOG_LEVEL_SUB_ID_TNPT,
|
||||||
|
"\nTNPTRecv: ctl: 0x%04x, ttl: 0x%04x, src: 0x%04x, dst: 0x%04x, payload: 0x%s",
|
||||||
|
rx->ctl, rx->ctx.recv_ttl, rx->ctx.addr, rx->ctx.recv_dst,
|
||||||
|
bt_hex(sdu->data, sdu->len));
|
||||||
|
|
||||||
rx->ctx.app_idx = BLE_MESH_KEY_DEV;
|
rx->ctx.app_idx = BLE_MESH_KEY_DEV;
|
||||||
bt_mesh_model_recv(rx, sdu);
|
bt_mesh_model_recv(rx, sdu);
|
||||||
|
|
||||||
@ -827,6 +832,12 @@ static int sdu_recv(struct bt_mesh_net_rx *rx, uint32_t seq, uint8_t hdr,
|
|||||||
sdu, ad, rx->ctx.addr,
|
sdu, ad, rx->ctx.addr,
|
||||||
rx->ctx.recv_dst, seq,
|
rx->ctx.recv_dst, seq,
|
||||||
BLE_MESH_NET_IVI_RX(rx));
|
BLE_MESH_NET_IVI_RX(rx));
|
||||||
|
|
||||||
|
BT_BQB(BLE_MESH_BQB_TEST_LOG_LEVEL_PRIMARY_ID_NODE | BLE_MESH_BQB_TEST_LOG_LEVEL_SUB_ID_TNPT,
|
||||||
|
"\nTNPTRecv: ctl: 0x%04x, ttl: 0x%04x, src: 0x%04x, dst: 0x%04x, payload: 0x%s",
|
||||||
|
rx->ctl, rx->ctx.recv_ttl, rx->ctx.addr, rx->ctx.recv_dst,
|
||||||
|
bt_hex(sdu->data, sdu->len));
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
BT_DBG("Unable to decrypt with AppKey 0x%03x",
|
BT_DBG("Unable to decrypt with AppKey 0x%03x",
|
||||||
key->app_idx);
|
key->app_idx);
|
||||||
@ -997,6 +1008,11 @@ static int ctl_recv(struct bt_mesh_net_rx *rx, uint8_t hdr,
|
|||||||
|
|
||||||
BT_DBG("OpCode 0x%02x len %u", ctl_op, buf->len);
|
BT_DBG("OpCode 0x%02x len %u", ctl_op, buf->len);
|
||||||
|
|
||||||
|
BT_BQB(BLE_MESH_BQB_TEST_LOG_LEVEL_PRIMARY_ID_NODE | BLE_MESH_BQB_TEST_LOG_LEVEL_SUB_ID_TNPT,
|
||||||
|
"\nTNPTRecv: ctl: 0x%04x, ttl: 0x%04x, src: 0x%04x, dst: 0x%04x, payload: 0x%s",
|
||||||
|
rx->ctl, rx->ctx.recv_ttl, rx->ctx.addr, rx->ctx.recv_dst,
|
||||||
|
bt_hex(buf->data, buf->len));
|
||||||
|
|
||||||
switch (ctl_op) {
|
switch (ctl_op) {
|
||||||
case TRANS_CTL_OP_ACK:
|
case TRANS_CTL_OP_ACK:
|
||||||
return trans_ack(rx, hdr, buf, seq_auth);
|
return trans_ack(rx, hdr, buf, seq_auth);
|
||||||
|
Reference in New Issue
Block a user