-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TW#16574] Bluetooth Controller: Link Key not emitted on re-pairing #1275
Comments
Hello Espressiv. Any feedback on this bug in the Bluetooth Controller? With this one and maybe #1082 fixed, I guess the ESP32 could be recommended for production use with Bluetooth Classic as long as Wifi isn't used. |
Hi @mringwal , thanks for the detailed description and useful analysis. I can understand the scenario and I have reproduced the issue with your example. Next I will look into the logic and try to find out the cause. |
Great news! Let me know when you have a version to test |
Hello, I have found out the cause and attached is the library file for your test. Please let me know if it fixes this issue. |
BTW, this library works with current ESP-IDF master branch, commit 0a83733 and you don't need to patch other files. |
excellent. I'll give it a try later and report back |
hi @mywang-espressif I'm happy to confirm that the link key is emitted for repairing in the provided library. Thanks! I'd leave this issue open until the fix is integrated on the esp32-bt-lib and available in esp-idf master. |
Glad to hear that. I will further verify the change and put forward a merge request. I will let you know after it is integrated. |
…for initiating side of simple pairing In response to: #1275
…for initiating side of simple_pairing In response to: #1275
…for initiating side of simple_pairing In response to: espressif#1275
The ESP32 Bluetooth Controller fails to emit a link key when the reconnecting and the remote has deleted its link key. Btw. this might be related to #1082 - more incorrect behaviour related to pairing/encryption.
Steps to reproduce
However, the Controller doesn't emit the new link key. In the next re-connect, both sides have a different link key (ESP32 the outdated one and the remote the current one) and the connection fails. It's crucial that the link key is emitted and this affect any Bluetooth stack running on the ESP32.
Here's the full log as
esp32-re-pair.txt (txt) and as
esp32-re-pair.pklg.zip (.pklg for Wireshark)
It can be reproduced e.g. using a patched version of spp_streamer_client of BTstack. You can change the BD Addr of the remote device in btstack_main and also the RFCOMM Channel.
spp_streamer_client.c.zip
The text was updated successfully, but these errors were encountered: