BLE_API_Tiny_BLE
Fork of BLE_API by
Diff: public/BLEDevice.h
- Revision:
- 347:20be4234c6fe
- Parent:
- 343:4d2576324b62
- Child:
- 349:b8b2b3973c47
--- 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