Page 1 of 1

NimBLE Service discovery failed

Posted: Fri Jun 18, 2021 9:30 am
by axellin
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.

Re: NimBLE Service discovery failed

Posted: Mon Jun 21, 2021 9:19 am
by ESP_sushant
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.