Product: nRF54L15DK, SDK V2.9.0
Application: Multi protocol (BLE + Matter/Thread) Door Lock
Issue: BLE bonding is not retained after power cycles. The mobile app requests pairing (pop-up window) confirmation from the user.
Hi,
This can be a extension of Private ticket - Case ID: 341084.
We discovered the issue and for ease of reproduction for nordic, we tried Matter Lock sample and confirmed the existence of the issues. The SDK is V2.9. We did not make any changes except in prj.conf - we added the CONFIG_CHIP_NUS, CONFIG_BT_ID_MAX, CONFIG_BT_BONDABLE etc. Please see the attached prj.conf. Built and programmed a nRF54L15DK.
We used nRFconnect App(IOS) to connect to the lock via BLE.
- The BLE connection is successful and the debug info shows that the pairing and bonding occurs. The lock displays the passkey code to enter into the mobile App (pop-up) window. After entering it connects and the debug locks shows the info (see attached logs from UART).
- Disconnect and reconnect - success. The pop-up windows in mobile app does not come up.
- The phone's BLE setting shows the lock as paired and bonded. See below the logs.
-
12345678910111213141516171819uart:~$ *** Booting My Application v2.9.0-df345e4cda59 ****** Using nRF Connect SDK v2.9.0-7787b2649840 ****** Using Zephyr OS v3.7.99-1f8f3dc29142 ***D: LE SC enabledI: 1412 [DL]BLE address: F5:13:36:B7:A4:8BD: NUS BLE advertising startedI: No users indexes storedI: No stored indexes for credential of type: 1D: Cannot load RequirePINforRemoteOperationD: Registered new test event: 0xffffffff32774000I: 1436 [DL]CHIP task runningI: Init CHIP stackI: 1441 [DL]OpenThread started: OKI: 1445 [DL]Setting OpenThread device type to SLEEPY END DEVICEI: 1451 [DL]Found DAC Private Key in factory data set. Copying to secure storage...I: 1463 [DL]The device does not support hardware protection against write.D: Registered new test event: 0xffffffff00000000D: Registered new test event: 0xffffffff10000000I: 1478 [SVR]Subscription persistence not supported
Then, reboot the lock:
- Reboot the lock. The logs shows that the BLE bond settings are loaded. See below for the logs.
- Connect to the lock using nRFconnect(the same phone/mobile app).
- The lock displays the code and the mobile app displays the pop-up windows. Enter the code and connection is made.
- The BLE settings in the iphone shows 2nd entry.
- It shows that bonding is not restored after power cycles.
-
12345678910111213141516171819*** Booting My Application v2.9.0-df345e4cda59 ****** Using nRF Connect SDK v2.9.0-7787b2649840 ****** Using Zephyr OS v3.7.99-1f8f3dc29142 ***D: LE SC enabledD: name cc2746dfba300/1 val 1011220000000000000000000000a0f3aba1978dddfbda6dcf3b0085b82382feeb6b8fa0507f090984e214b695d632773c8db851000000000000000000000000D: CC:27:46:DF:BA:30 (public)D: created 0x20019288 for CC:27:46:DF:BA:30 (public)D: Successfully restored keys for CC:27:46:DF:BA:30 (public)I: SC LTK: 0x23b885003bcf6ddafbdd8d97a1abf3a0D: CC:27:46:DF:BA:30 (public)D: CC:27:46:DF:BA:30 (public) (keys 0x0022)I: 365789 [DL]BLE address: D9:3F:38:51:31:8CD: NUS BLE advertising startedI: No users indexes storedI: No stored indexes for credential of type: 1D: Cannot load RequirePINforRemoteOperationD: Registered new test event: 0xffffffff32774000I: 365815 [DL]CHIP task running
We confirmed with Android also.
Nordic has recommended that we add settings_save and settings_load. We tried here (i don't it is needed since it is loaded by Matter services, but is a Nordic recommendation for BLE bonding)
The above do not make any impact.
We played with changing various configuration parameters without any success.
Please let us know the solution to retain the bonding information, specifically not make the Mobile App to put out the pop-up windows, pair and bond again after lock reboot (power cycle).
In this example, we used NUS services so that you can reproduce. We are using BLE Security Level 2: Encrypted with unauthenticated pairing i.e. we are not using passkey or code since the door lock lacks IO.