Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: public/BLEDevice.h
- Revision:
- 369:9a76cc068644
- Parent:
- 368:89726b616c1b
- Child:
- 370:678fdba95a62
--- a/public/BLEDevice.h Fri May 08 15:35:48 2015 +0100
+++ b/public/BLEDevice.h Fri May 08 15:35:48 2015 +0100
@@ -509,6 +509,15 @@
void onSecurityContextStored(Gap::HandleSpecificEvent_t callback);
/**
+ * Setup a callback for when the passkey needs to be displayed on a
+ * peripheral with DISPLAY capability. This happens when security is
+ * configured to prevent Man-In-The-Middle attacks, and a PIN (or passkey)
+ * needs to be exchanged between the peers to authenticate the connection
+ * attempt.
+ */
+ void onPasskeyDisplay(Gap::PasskeyDisplayCallback_t callback);
+
+ /**
* Get the security status of a connection.
*
* @param[in] connectionHandle Handle to identify the connection.
@@ -918,4 +927,10 @@
return transport->initializeSecurity(enableBonding, requireMITM, iocaps, passkey);
}
+inline void
+BLEDevice::onPasskeyDisplay(Gap::PasskeyDisplayCallback_t callback)
+{
+ return transport->getGap().setOnPasskeyDisplay(callback);
+}
+
#endif // ifndef __BLE_DEVICE__
\ No newline at end of file
