BLE_API_Tiny_BLE

Dependents:   CSSE4011_BLE_IMU

Fork of BLE_API by Bluetooth Low Energy

Revision:
347:20be4234c6fe
Parent:
343:4d2576324b62
Child:
349:b8b2b3973c47
diff -r 4a42f777161f -r 20be4234c6fe public/BLEDevice.h
--- a/public/BLEDevice.h	Thu Apr 30 08:37:22 2015 +0100
+++ b/public/BLEDevice.h	Fri May 08 15:35:45 2015 +0100
@@ -445,6 +445,14 @@
      */
     void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP);
 
+    /**
+     * Enable the BLE stack's Security Manager. The Security Manager implements
+     * the actual cryptographic algorithms and protocol exchanges that allow two
+     * devices to securely exchange data and privately detect each other.
+     * Calling this API is a prerequisite for encryption and pairing (bonding).
+     */
+    ble_error_t initializeSecurity(void);
+
 public:
     BLEDevice() : transport(createBLEDeviceInstance()), advParams(), advPayload(), scanResponse(), needToSetAdvPayload(true) {
         advPayload.clear();
@@ -800,4 +808,10 @@
     transport->getPermittedTxPowerValues(valueArrayPP, countP);
 }
 
+inline ble_error_t
+BLEDevice::initializeSecurity(void)
+{
+    return transport->initializeSecurity();
+}
+
 #endif // ifndef __BLE_DEVICE__
\ No newline at end of file