Commit Graph

652 Commits (master)

Author SHA1 Message Date
Andres Amaya Garcia 9b14870e5c Fix shutdown of Gap instance to avoid NULL refs 2015-12-22 15:49:12 +00:00
Vincent Coubard bb283199db Merge pull request #95 from andresag01/init_checks
Add check for return code of ble_init
2015-12-21 15:02:09 +00:00
Andres Amaya Garcia 65cb294f61 Fix comment typo 2015-12-21 09:35:49 +00:00
Andres Amaya Garcia 7f02a2d51f Add check for return code of ble_init 2015-12-21 09:32:44 +00:00
Rohit Grover 2850a85809 version v2.2.9 2015-12-18 13:30:36 +00:00
Rohit Grover a5fa97a549 Merge pull request #92 from andresag01/rm_appearance
Remove occurrence of deprecated appearance enum
2015-12-18 08:12:37 +00:00
Andres Amaya Garcia 7a499f1f3e Remove unused include blecommon.h from projectconfig.h 2015-12-17 15:51:07 +00:00
Andres Amaya Garcia eab13c8b91 Remove occurrence of deprecated appearance enum 2015-12-17 15:49:10 +00:00
Rohit Grover b1b1a40368 white space diff 2015-12-16 10:19:22 +00:00
Rohit Grover 5a6f8cde9a replace a few instances of Gap::AddressType_t with BLEProtocol::AddressType_t 2015-12-16 08:57:20 +00:00
Rohit Grover 04bb297831 add an interdependency to "ble": "^2.1.16" 2015-12-16 06:50:20 +00:00
Rohit Grover 3f66311359 version v2.2.7 2015-12-15 14:10:18 +00:00
Rohit Grover 1527ce60c1 Merge pull request #89 from andresag01/develop
Replace deprecated inclusions of mbed.h
2015-12-15 14:03:30 +00:00
Andres Amaya Garcia 90de915fac Replace deprecated inclusions of mbed.h
Replace all deprecated inclusions of mbed.h for mbed-drivers/mbed.h when using
mbed OS. Applications should compile for mbed classic.
2015-12-15 13:58:54 +00:00
Vincent Coubard fd8b73f914 Merge pull request #87 from andresag01/develop
Improve shutdown to clear BLE API and not just SD
2015-12-15 13:53:09 +00:00
Andres Amaya Garcia 4efa84c82e Remove out-of-date comment from nRF5xn 2015-12-15 13:18:37 +00:00
Andres Amaya Garcia 252ef3cfbd Make _gapInstance non-static in nRF5xn 2015-12-15 13:16:05 +00:00
Rohit Grover 0e933954c8 update dependency for ble to have version >=2.1.15 2015-12-15 13:07:23 +00:00
Rohit Grover cd2f96b5f1 version v2.2.6 2015-12-15 13:05:37 +00:00
Rohit Grover ca8b3d2135 replace instances of BLEProtocol::AddressType::Type with BLEProtocol::AddressType_t 2015-12-15 13:05:24 +00:00
Rohit Grover 752e2ba43b Merge pull request #88 from rgrover/develop
follow the extraction of address related types from Gap.h into BLEProtocol.h
2015-12-15 13:03:38 +00:00
Andres Amaya Garcia 786cd0b9bf Modify nRF5xn::shutdown to return actual error code 2015-12-15 10:54:11 +00:00
Vincent Coubard 15592642e1 Move Implementation of nRF5xCharacteristicDescriptorDiscoverer::Discovery
to cpp file.
2015-12-15 10:22:23 +00:00
Vincent Coubard c8d826ffd0 Documentation of descriptor discoverer class.
Simplify the process
2015-12-15 09:56:27 +00:00
Vincent Coubard 59ced0b4b1 rename remainingCharacteristic member, now it is named
discoveredCharacteristic. Add doc to the discovery process and the
rationale behind discoveredCharacteristic member.
2015-12-15 09:54:25 +00:00
Rohit Grover 52200b37bb follow the extraction of ddress related types from Gap.h into BLEProtocol.h 2015-12-14 17:09:28 +00:00
Andres Amaya Garcia 0bcc2e96c9 Modify shutdown due to BLE API change
The module is updated to comply with the changes to BLE API regarding correct
shutdown functionality. The following changes are introduced to ble-nrf51822:

* Calls to the old static function shutdown in Gap, GattClient, GattServer and
SecurityManager are removed.
* The cleanup function in Gap, GattClient, GattServer and SecurityManager is
renamed to `reset()` and made public.
* The static references inside nRF5xGap, nRF5xGattClient, nRF5xGattServer and
nRF5xSecurityManager to objects of their own class are moved to nRF5xn.
* The static getInstance accessors in nRF5xGap, nRF5xGattClient,
nRF5xGattServer and nRF5xSecurityManager are removed and their functionality is
moved to the implemented virtual accessors in nRF5xn i.e. getGap(),
getGattClient, etc.
* A static function Instance is added to nRF5xn class to make the transport
object accessible across the module.
2015-12-14 15:15:35 +00:00
Vincent Coubard eb5ca3806d Add a function to change the lastHandle of a discovered characteristic 2015-12-14 15:04:56 +00:00
Vincent Coubard 7e784e0e0c Merge branch 'develop' of into characteristicDescriptorDiscovery 2015-12-14 11:57:57 +00:00
Andres Amaya Garcia 0429643609 Fix comment typo 2015-12-11 18:19:10 +00:00
Andres Amaya Garcia 7bf81e7edb Improve shutdown to clear BLE API and not just SD
Improve the shutdown functionality, such that a call to ble.shutdown() from
the user application clears the API and nRF5x state and NOT only the
SoftDevice. To achieve this the following changes are introduced:

* Add a protected member cleanup() to nRF5xGap, nRF5xGattClient,
nRF5xGattServer, nRF5xSecurityManager and nRF5xServiceDiscovery.
* Modify the shutdown() implementation in nRF5xn such that it also calls the
static member shutdown() exposed by the BLE API in Gap.h, SecurityManager.h,
GattClient.h and GattServer.h.
* Modify nRF5xGattClient, nRF5xGattServer and nRF5xSecurityManager
classes so that they dynamically create their respective objects only if
needed. Previously the GattClient, GattServer and SecurityManager objects were
declared as static, which means that they were always present even though they
were not always needed. This increases memory consumption unnecessarily.
Furthermore, pointers to the object instances are stored in static members of
the classes as specified by the BLE API base classes. This ensures that
calls to shutdown do not require calls to getInstance() functions that would
otherwise result in undesired memory allocations.
* nRF5xGap object is always needed, so this remains allocated statically. But
the reference in Gap is pointed to this object.

The shutdown procedure is as follows:

1. The user calls ble.shutdown() which executes the code in nRF5xn::shutdown()
1. The SoftDevice is shutdown
1. The static members of Gap.h, SecurityManager.h, GattClient.h and
GattServer.h are called to clean up their own state.

If at any point an error occur during the last step, BLE_ERROR_INVALID_STATE is
2015-12-11 17:56:57 +00:00
Rohit Grover 0583503b05 version v2.2.5 2015-12-11 09:24:29 +00:00
Rohit Grover d72e2b71d0 version v2.2.4 2015-12-11 09:24:21 +00:00
Rohit Grover 2405f0cb1f Merge pull request #86 from marcuschangarm/bond
Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection.
2015-12-11 09:20:50 +00:00
Joe Finney 001abe5262 microbit: Increased maximum characteristic count
ble-nrf51822 assumes a static maximum of 20 characteristics by default. This is too small for the default
micro:bit profile requires more than this. default raised to 30 to accomodate.
2015-12-10 17:23:30 +00:00
Joe Finney 031aeec3af microbit: Added support for explicit characteristic notification
Required to allow the mbed layer to avoid caching large amounts of state in its GattCharacteristics

n.b. this should be removed once all optimisations to the mbed layer are completed.
2015-12-10 17:21:19 +00:00
Joe Finney a5bb9906b3 BUGFIX: Updated security requirements for notify/indicate descriptors to match the associated characteristic
Required to both ensure security is not circumvented, and also to initiate bonding via a notification request.
2015-12-10 17:15:10 +00:00
Marcus Chang b2cb566312 Added SecurityManager::setLinkSecurity call for elevating security settings on a particular connection. 2015-12-10 15:09:00 +00:00
Rohit Grover e7492efadd Merge branch 'develop' 2015-12-10 09:22:41 +00:00
Rohit Grover 599bd976d3 Release 2.2.3

* Added support for byte ordering parameter to UUID construction for long UUIDs.

* Added -Wno-unused-function to supress-warnings.cmake.
2015-12-10 09:22:04 +00:00
Rohit Grover 51f614800a version v2.2.2 2015-12-08 13:59:21 +00:00
Rohit Grover 6a0c605d44 Merge pull request pull/83 i.e. commit '6507b4a50ce849db7e5e541dfd03accfc38f1b6f' into develop 2015-12-08 13:58:32 +00:00
Rohit Grover a605c77a0b version v2.2.1 2015-12-08 11:21:52 +00:00
Rohit Grover b96c0a6e72 enforce dependency upon ble version >= 2.1.10
We require changes for APIs involved in UUID construction.
2015-12-08 11:21:12 +00:00
Rohit Grover dada1de8fc Merge pull request #82 from marcuschangarm/endian
WIP: UUID endian change
2015-12-08 11:18:44 +00:00
Marcus Chang 59fa852bea Added bit order parameter to UUID construction. 2015-12-07 13:35:45 +00:00
Andres Amaya Garcia 6507b4a50c Add -Wno-unused-function to supress-warnings.cmake 2015-12-02 16:13:18 +00:00
Marcus Chang e554200f5e Removed endian conversion in custom helper functions. 2015-12-02 15:39:06 +00:00
Rohit Grover a7ff648214 Release 2.2.0

Split out the files belonging to the Nordic SDK into a separate module.

Note: this change will not be synchronized with (otherwise it
will become necessary for all mbed-classic applications to include an
extra library).
2015-12-02 15:38:16 +00:00
Rohit Grover 9412d6745b version v2.2.0 2015-12-02 15:27:13 +00:00