Bluetooth: Mesh: improve solicitation debug logging
Commits adds debug logging for all reasons preventing of the proxy solicitation. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
parent
917a3e6e64
commit
00457ae6c6
1 changed files with 6 additions and 2 deletions
|
@ -190,13 +190,14 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
|
||||||
if (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
|
if (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
|
||||||
bt_mesh_priv_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
|
bt_mesh_priv_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
|
||||||
bt_mesh_od_priv_proxy_get() == 0) {
|
bt_mesh_od_priv_proxy_get() == 0) {
|
||||||
|
LOG_DBG("Not soliciting");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get rid of ad_type that was checked in bt_mesh_scan_cb */
|
/* Get rid of ad_type that was checked in bt_mesh_scan_cb */
|
||||||
type = net_buf_simple_pull_u8(buf);
|
type = net_buf_simple_pull_u8(buf);
|
||||||
if (type != BT_DATA_UUID16_SOME && type != BT_DATA_UUID16_ALL) {
|
if (type != BT_DATA_UUID16_SOME && type != BT_DATA_UUID16_ALL) {
|
||||||
LOG_ERR("Invalid type 0x%x, expected 0x%x or 0x%x",
|
LOG_DBG("Invalid type 0x%x, expected 0x%x or 0x%x",
|
||||||
type, BT_DATA_UUID16_SOME, BT_DATA_UUID16_ALL);
|
type, BT_DATA_UUID16_SOME, BT_DATA_UUID16_ALL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -215,6 +216,7 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sol_uuid_found) {
|
if (!sol_uuid_found) {
|
||||||
|
LOG_DBG("No solicitation UUID found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,6 +232,7 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf->len <= reported_len - 3) {
|
if (buf->len <= reported_len - 3) {
|
||||||
|
LOG_DBG("Invalid length (%u) Solicitation PDU", buf->len);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,12 +240,13 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!svc_data_found) {
|
if (!svc_data_found) {
|
||||||
|
LOG_DBG("No solicitation service data found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
type = net_buf_simple_pull_u8(buf);
|
type = net_buf_simple_pull_u8(buf);
|
||||||
if (type != 0) {
|
if (type != 0) {
|
||||||
LOG_ERR("Invalid type %d, expected 0x00", type);
|
LOG_DBG("Invalid type %d, expected 0x00", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue