No changes

Fork of nRF51822 by Nordic Semiconductor

Committer:
rgrover1
Date:
Thu Jul 02 09:08:44 2015 +0100
Revision:
361:d2405f5a4853
Parent:
360:7c68c8d67e1f
Child:
362:6fa0d4d555f6
Synchronized with git rev 9f72c4ba
Author: Rohit Grover
Release 0.3.7
=============

This is a minor set of enhancements mostly around reduce our global static
memory footprint.

Enhancements
~~~~~~~~~~~~

* Reduce the maximum number of CHARACTERISTICS and DESCRIPTORS that can be
handled. This has memory implications for static global memory. It should
be possible to re-architect our solution for add_characteristic() to not
require these limits; hopefully we'll get there soon.

* Move nRF51GattServer::getInstance() into a .cpp file; same for nRF51Gap::getInstance().

* Reduce max bonds to managed by device-manager to 4; this has memory implications for static global memory.

* Reduce pStorage command queue size to 2; this has memory implications for static global memory.

* Replace uses of deprecated Gap::addr_type_t with Gap::AddressType_t.

* Some UUID-related types have moved into UUID class. Minor changes were needed to work around build errors.

Bugfixes
~~~~~~~~

* None.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rgrover1 134:df7e7964a9c3 1 /* mbed Microcontroller Library
rgrover1 134:df7e7964a9c3 2 * Copyright (c) 2006-2013 ARM Limited
rgrover1 134:df7e7964a9c3 3 *
rgrover1 134:df7e7964a9c3 4 * Licensed under the Apache License, Version 2.0 (the "License");
rgrover1 134:df7e7964a9c3 5 * you may not use this file except in compliance with the License.
rgrover1 134:df7e7964a9c3 6 * You may obtain a copy of the License at
rgrover1 134:df7e7964a9c3 7 *
rgrover1 134:df7e7964a9c3 8 * http://www.apache.org/licenses/LICENSE-2.0
rgrover1 134:df7e7964a9c3 9 *
rgrover1 134:df7e7964a9c3 10 * Unless required by applicable law or agreed to in writing, software
rgrover1 134:df7e7964a9c3 11 * distributed under the License is distributed on an "AS IS" BASIS,
rgrover1 134:df7e7964a9c3 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rgrover1 134:df7e7964a9c3 13 * See the License for the specific language governing permissions and
rgrover1 134:df7e7964a9c3 14 * limitations under the License.
rgrover1 134:df7e7964a9c3 15 */
rgrover1 134:df7e7964a9c3 16
rgrover1 134:df7e7964a9c3 17 #ifndef _BTLE_SECURITY_H_
rgrover1 134:df7e7964a9c3 18 #define _BTLE_SECURITY_H_
rgrover1 134:df7e7964a9c3 19
rgrover1 361:d2405f5a4853 20 #include "Gap.h"
rgrover1 149:f6a9caa8c565 21
rgrover1 134:df7e7964a9c3 22 /**
rgrover1 134:df7e7964a9c3 23 * Enable Nordic's Device Manager, which brings in functionality from the
rgrover1 134:df7e7964a9c3 24 * stack's Security Manager. The Security Manager implements the actual
rgrover1 134:df7e7964a9c3 25 * cryptographic algorithms and protocol exchanges that allow two devices to
rgrover1 134:df7e7964a9c3 26 * securely exchange data and privately detect each other.
rgrover1 134:df7e7964a9c3 27 *
rgrover1 150:44c40836c82f 28 * @param[in] enableBonding Allow for bonding.
rgrover1 150:44c40836c82f 29 * @param[in] requireMITM Require protection for man-in-the-middle attacks.
rgrover1 150:44c40836c82f 30 * @param[in] iocaps To specify IO capabilities of this peripheral,
rgrover1 150:44c40836c82f 31 * such as availability of a display or keyboard to
rgrover1 150:44c40836c82f 32 * support out-of-band exchanges of security data.
rgrover1 150:44c40836c82f 33 * @param[in] passkey To specify a static passkey.
rgrover1 150:44c40836c82f 34 *
rgrover1 134:df7e7964a9c3 35 * @return BLE_ERROR_NONE on success.
rgrover1 134:df7e7964a9c3 36 */
rgrover1 361:d2405f5a4853 37 ble_error_t btle_initializeSecurity(bool enableBonding = true,
rgrover1 361:d2405f5a4853 38 bool requireMITM = true,
rgrover1 361:d2405f5a4853 39 Gap::SecurityIOCapabilities_t iocaps = Gap::IO_CAPS_NONE,
rgrover1 361:d2405f5a4853 40 const Gap::Passkey_t passkey = NULL);
rgrover1 134:df7e7964a9c3 41
rgrover1 137:aafab7b0a8bd 42 /**
rgrover1 138:750eca573e18 43 * Get the security status of a link.
rgrover1 138:750eca573e18 44 *
rgrover1 138:750eca573e18 45 * @param[in] connectionHandle
rgrover1 138:750eca573e18 46 * Handle to identify the connection.
rgrover1 138:750eca573e18 47 * @param[out] securityStatusP
rgrover1 138:750eca573e18 48 * security status.
rgrover1 138:750eca573e18 49 *
rgrover1 138:750eca573e18 50 * @return BLE_SUCCESS Or appropriate error code indicating reason for failure.
rgrover1 138:750eca573e18 51 */
rgrover1 361:d2405f5a4853 52 ble_error_t btle_getLinkSecurity(Gap::Handle_t connectionHandle, Gap::LinkSecurityStatus_t *securityStatusP);
rgrover1 138:750eca573e18 53
rgrover1 138:750eca573e18 54 /**
rgrover1 137:aafab7b0a8bd 55 * Function for deleting all peer device context and all related bonding
rgrover1 137:aafab7b0a8bd 56 * information from the database.
rgrover1 137:aafab7b0a8bd 57 *
rgrover1 137:aafab7b0a8bd 58 * @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure.
rgrover1 137:aafab7b0a8bd 59 * @retval BLE_ERROR_INVALID_STATE If the API is called without module initialization and/or
rgrover1 137:aafab7b0a8bd 60 * application registration.
rgrover1 137:aafab7b0a8bd 61 */
rgrover1 140:3a5282e3f30c 62 ble_error_t btle_purgeAllBondingState(void);
rgrover1 137:aafab7b0a8bd 63
rgrover1 134:df7e7964a9c3 64 #endif /* _BTLE_SECURITY_H_ */