Skip to content

Commit 971b13b

Browse files
paul-szczepanek-armDonatien Garnier
authored andcommitted
send ltk as master when we are master
1 parent 7308bc1 commit 971b13b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

BLE_SM/source/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ class SMDevicePeripheral : public SMDevice {
304304
* can proceed. Setting it to false will automatically accept
305305
* pairing. */
306306
_ble.securityManager().setPairingRequestAuthorisation(true);
307-
308-
_ble.securityManager().setHintFutureRoleReversal(true);
309307
};
310308

311309
/** This is called by Gap to notify the application we connected,
@@ -364,6 +362,9 @@ class SMDeviceCentral : public SMDevice {
364362
printf("Error during Gap::startScan %d\r\n", error);
365363
return;
366364
}
365+
366+
/* send our keys since we will be a peripheral next */
367+
_ble.securityManager().setHintFutureRoleReversal(true);
367368
}
368369

369370
/** Look at scan payload to find a peer device and connect to it */

0 commit comments

Comments
 (0)