Skip to content

Commit 6e94bc5

Browse files
set the preserve bonding persistently bit
1 parent a0b3955 commit 6e94bc5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

BLE_SM/source/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ class SMDevice : private mbed::NonCopyable<SMDevice>,
183183
return;
184184
}
185185

186+
error = _ble.securityManager().preserveBondingStateOnReset(true);
187+
188+
if (error) {
189+
printf("Error during preserveBondingStateOnReset %d\r\n", error);
190+
}
191+
186192
/* Tell the security manager to use methods in this class to inform us
187193
* of any events. Class needs to implement SecurityManagerEventHandler. */
188194
_ble.securityManager().setSecurityManagerEventHandler(this);

0 commit comments

Comments
 (0)