Skip to content

Commit cf03a36

Browse files
alxelaxcvinayak
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: improve solicitation debug logging
Commits adds debug logging for all reasons preventing of the proxy solicitation. Signed-off-by: Aleksandr Khromykh <[email protected]> (cherry picked from commit 00457ae) Signed-off-by: Alperen Şener <[email protected]>
1 parent ab53aaa commit cf03a36

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

subsys/bluetooth/mesh/solicitation.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,14 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
190190
if (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
191191
bt_mesh_priv_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
192192
bt_mesh_od_priv_proxy_get() == 0) {
193+
LOG_DBG("Not soliciting");
193194
return;
194195
}
195196

196197
/* Get rid of ad_type that was checked in bt_mesh_scan_cb */
197198
type = net_buf_simple_pull_u8(buf);
198199
if (type != BT_DATA_UUID16_SOME && type != BT_DATA_UUID16_ALL) {
199-
LOG_ERR("Invalid type 0x%x, expected 0x%x or 0x%x",
200+
LOG_DBG("Invalid type 0x%x, expected 0x%x or 0x%x",
200201
type, BT_DATA_UUID16_SOME, BT_DATA_UUID16_ALL);
201202
return;
202203
}
@@ -215,6 +216,7 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
215216
}
216217

217218
if (!sol_uuid_found) {
219+
LOG_DBG("No solicitation UUID found");
218220
return;
219221
}
220222

@@ -230,19 +232,21 @@ void bt_mesh_sol_recv(struct net_buf_simple *buf, uint8_t uuid_list_len)
230232
}
231233

232234
if (buf->len <= reported_len - 3) {
235+
LOG_DBG("Invalid length (%u) Solicitation PDU", buf->len);
233236
return;
234237
}
235238

236239
net_buf_simple_pull_mem(buf, reported_len - 3);
237240
}
238241

239242
if (!svc_data_found) {
243+
LOG_DBG("No solicitation service data found");
240244
return;
241245
}
242246

243247
type = net_buf_simple_pull_u8(buf);
244248
if (type != 0) {
245-
LOG_ERR("Invalid type %d, expected 0x00", type);
249+
LOG_DBG("Invalid type %d, expected 0x00", type);
246250
return;
247251
}
248252

0 commit comments

Comments
 (0)