NimBLE Service discovery failed

axellin
Posts: 199
Joined: Mon Sep 17, 2018 9:09 am

NimBLE Service discovery failed

Postby axellin » Fri Jun 18, 2021 9:30 am

When testing esp32 NimBLE, I sometime got below error messages:

lld_pdu_get_tx_flush_nb HCI packet count mismatch (1, 2)
Error: Service discovery failed; status=7 conn_handle=0

It seems the message is printed by the binary library.
What could be the reason of the failure?

I test with esp-idf v4.3 tag.

ESP_sushant
Posts: 8
Joined: Mon Aug 26, 2019 6:10 am

Re: NimBLE Service discovery failed

Postby ESP_sushant » Mon Jun 21, 2021 9:19 am

Error pint "lld_pdu_get_tx_flush_nb HCI packet count mismatch (1, 2)" is logged at the time abrupt disconnection if all the ACL packets are not flushed correctly.
Fix for correctly flushing the ACL packets during abrupt disconnection is under review; will update here once merged.
But, the reason for abrupt disconnection, which triggered the Tx flush in first place, can differ from case to case.
Need to check reason for the disconnection using debug logs.
Please enable CONFIG_BT_NIMBLE_LOG_LEVEL_DEBUG from menuconfig-->Bluetooth-->NimBLE Options--> NimBLE Host log verbosity--> Select Debug and share for further analysis.
Also, it will be helpful if you can share the steps to reproduce it.

Who is online

Users browsing this forum: Google [Bot] and 304 guests