-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description of defect
Using Cordio and the device in the peripheral role, I can successfully connect, pair and bond to the device using a phone. Once disconnected though, I cannot reconnect to the device without manually clearing the bond information from the phone and re-pairing to the device. I would expect the bond keys to be preserved on the device and for the phone to re-form an encrypted connection without re-pairing.
I've tested this with a variety of configuration settings and functions from SecurityManager and BLE::Gap as well as saving the keys to non-volatile memory and can't seem to find anything that changes this behavior, so I'm fairly confident at this point this is a bug. Enabling WSF_TRACE_ENABLED and LL_TRACE_ENABLED in wsf_trace.h correctly shows that the original connection is successfully encrypted and the LTK is generated, but once disconnected, the stack does not seem to react at all to the phone trying to connect in the future and the connection times out. Is there something here I'm missing?
Target(s) affected by this defect ?
NRF52_DK, NRF52832
Toolchain(s) (name and version) displaying this defect ?
gcc arm 9-2019-q4-major
What version of Mbed-os are you using (tag or sha) ?
mbed-os-6.2.1 and mbed-os-5.15.3
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli
How is this defect reproduced ?
I've attached a slightly modified version of the BLE_SM example main.cpp that can be used to test this. It removes the central role and doesn't auto-disconnect. With the phone, connect, pair, disconnect, and try to connect again. Clearing the bond information in phone settings allows for the device to connect again. Tested with LightBlue and NRF Connect on iOS.