Commit graph

652 commits

Author SHA1 Message Date
Joe Finney 040baa12c0 Add NRF event loop handler hook. 2017-03-01 16:53:28 +00:00
Vincent Coubard c5ce428dae Fix access to enum member 2016-04-08 00:00:00 +01:00
Joe Finney 67d0ac737d microbit: Update to indicate when system attributes require intialisation 2016-02-11 22:01:37 +00:00
Joe Finney 0963f913e0 microbit: Added funciton to allow the size of the GATT table to be configuraed
from the user's application.

The default ble-nrf51822 library does not provide a mechanism for the user
application to define size of the GATT attribute table size. It is important as
over 1.5K of sram is statically alllocated for SD.
2016-02-08 01:01:53 +00:00
Joe Finney 2b2a9d0fab microbit: Remove restriction on GATT table size to permit larger profiles. 2016-02-07 20:39:57 +00:00
Joe Finney 2541e8fdb0 microbit: Populate 'bonds' field in whitelist entry
Update to populate a recently introduced 'bonds' field in the whitelist_t
structure. This field records the number of IRKs present in the table, which
correlates to the number of bonds.
2016-02-07 20:03:24 +00:00
Joe Finney 06a34dad44 microbit: Revert service changed indication.
Some central devices under testing performed poorly, failing to correctly
conect or discover services.
2016-02-07 19:03:28 +00:00
Joe Finney fd017fbf2b microbit: Update to indicate service change on SYS_ATTR_MISSING
When using bonded connections to a central device, an explicit service changed
indication should be used in cases where a device's GATT table appears out of
date. This patch preserves the metadata of the Service Changed
characterisitic, and also adds this indication as described.
2016-01-25 17:18:10 +00:00
Joe Finney 47098827fc microbit: Increase maximum descriptor count
The ble-nrf51822 library maintains a static array of BLE descriptors (by
default, 8). This patch increases the size of this array to 20. This is
required to hold the full complement of services that make up the micro:bit
standard BLE profile.
2016-01-19 00:26:24 +00:00
Joe Finney 4831021204 Merge branch 'master' of https://www.github.com/lancaster-university/nrf51822 2016-01-17 00:42:10 +00:00
Joe Finney f0333be39e microbit: Update to acomodate changed ble-nrf51822 API 2016-01-16 15:16:06 +00:00
Joe Finney 12cc720955 BUGFIX: Add conditional compilation to support S110 only builds
S110 builds contian a conditional compilation option that compiles out
GattClient functionality, thereby saving several hundred bytes of unecessary
memory overhead.
2016-01-16 15:11:48 +00:00
Joe Finney 93dd3fcc5b microbit: Defined an initial GATT table size of 768 bytes.
Reduced GATT table size by 1K. 768 bytes is sufficient to hold the basic
micro:bit BLE services (Device Information, DFU, event service). The
additional 1K normally held by SoftDevice can then be reused for application
heap.
2016-01-12 22:12:37 +00:00
Joe Finney d214d82075 microbit: BUGFIX: nRF5xn global singleton preventing gcc optimisation when module not initialized
A statically allocated nRF5xn singleton "deviceInstance" prevents gcc from optimising out the .bss memory used by the ble-nrf51822 module (approx 1.2K of RAM), even when the module is not used or initialised by application code. This can cause memory usage issues for heavily constrianed systems.

This patch replaces the statically allocated singleton with an equivalent mechanism based on lazy instantiation. This approach permits gcc to optimise the code out when not in use.
2016-01-12 22:12:34 +00:00
Joe Finney d8227522cd 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.
2016-01-12 22:10:56 +00:00
Joe Finney 5928b5e443 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.
2016-01-12 22:10:52 +00:00
Joe Finney 2547adaa9c 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.
2016-01-12 22:10:47 +00:00
Vincent Coubard d9c0198237 version v2.5.0 2016-01-12 18:58:16 +00:00
Vincent Coubard 2f875c9c1d Merge pull request #103 from andresag01/bond-table-query
Finish implementation of getAddressesFromBondTable
2016-01-12 18:56:10 +00:00
Vincent Coubard e2368c7eb3 version v2.4.1 2016-01-11 22:45:44 +00:00
Vincent Coubard 29d53c2992 Remove dependency to mbed-error 2016-01-11 22:44:42 +00:00
Andres Amaya Garcia c1bc230bcf Initialize address list before returning error 2016-01-11 10:44:52 +00:00
Andres Amaya Garcia 1e4d6f20fc Add initialization check before querying SD bond table 2016-01-11 09:32:59 +00:00
Andres Amaya Garcia 33db258c8d Add missing documentation to getAddressesFromBondTable API 2016-01-11 09:28:36 +00:00
Vincent Coubard 0b4dde9c94 version v2.4.0 2016-01-10 19:22:24 +00:00
Vincent Coubard bd45b25fac Merge pull request #99 from andresag01/whitelisting
Add implementation of experimental whitelisting API
2016-01-10 19:11:55 +00:00
Andres Amaya Garcia 116eb8db8e Finish implementation of getAddressesFromBondTable
Finish the implementation of the new function getAddressesFromBondTable() in
SecurityManager that returns a table with a list of addresses from the peers
in the bond table.
2016-01-08 18:23:43 +00:00
Andres Amaya Garcia 91e8bf4bb2 Modify nRF5xGap::reset() to reset the whitelist 2016-01-08 15:33:19 +00:00
Andres Amaya Garcia bdf392d471 Remove redundant structures from nRF5xGap
Remove the following structures/arrays from the nRF5xGap class:

* ble_gap_whitelist_t whitelist
* ble_gap_addr_t *whitelistAddressePtrs[]
* ble_gap_irk_t  *whitelistIrkPtrs[]

These are made redundant because the SoftDevice does not require the user to
keep a copy of the whitelist itself.
2016-01-08 15:19:18 +00:00
Andres Amaya Garcia 12e6c9ec09 Make setWhitelist check errors before changing state 2016-01-08 14:23:17 +00:00
Andres Amaya Garcia 553551aa4f Update nrf51-sdk dependency to v2.1.0
This is required because 2.1.0 includes additional files from the peer manager
that are used by the implementation of the whitelisting API to check whether an
address can be generated from a given IRK.
2016-01-08 14:23:17 +00:00
Andres Amaya Garcia b72f9aa24e Add whitelisting documentation to nRF51xGap 2016-01-08 14:20:38 +00:00
Andres Amaya Garcia 9d0c6381d4 Add missing documentation to btle_security for whitelisting 2016-01-08 14:20:38 +00:00
Andres Amaya Garcia 2ebbcb08b5 Add documentation and fix style of SecurityManager 2016-01-08 14:20:38 +00:00
Andres Amaya Garcia c9b6bb9bbb Almost complete implementation of whitelisting API 2016-01-08 14:20:38 +00:00
Andres Amaya Garcia 0f76db4eed Add helper function to get whitelist from SD bond table 2016-01-08 14:20:38 +00:00
Andres Amaya Garcia fdead9ec36 Early whitelisting API prototype implementation 2016-01-08 14:20:38 +00:00
Vincent Coubard 31c4a7c475 version v2.3.1 2016-01-07 17:28:17 +00:00
Andres Amaya Garcia 98d770885c Merge pull request #98 from pan-/yottaDependencies
Update yotta module dependencies
2016-01-07 17:24:25 +00:00
Vincent Coubard 48ee379978 Update yotta module dependencies 2016-01-07 17:19:35 +00:00
Joe Finney 60b4c5c210 version v2.2.5 2016-01-05 16:44:45 +00:00
Joe Finney e38a6b7e5f microbit: Defined an initial GATT table size of 768 bytes.
Reduced GATT table size by 1K. 768 bytes is sufficient to hold the basic
micro:bit BLE services (Device Information, DFU, event service). The
additional 1K normally held by SoftDevice can then be reused for application
heap.
2016-01-04 23:47:27 +00:00
Joe Finney ce50b67bb4 version v2.2.4 2016-01-02 20:13:13 +00:00
Joe Finney 8fafd6cba6 microbit: BUGFIX: nRF5xn global singleton preventing gcc optimisation when module not initialized
A statically allocated nRF5xn singleton "deviceInstance" prevents gcc from optimising out the .bss memory used by the ble-nrf51822 module (approx 1.2K of RAM), even when the module is not used or initialised by application code. This can cause memory usage issues for heavily constrianed systems.

This patch replaces the statically allocated singleton with an equivalent mechanism based on lazy instantiation. This approach permits gcc to optimise the code out when not in use.
2016-01-02 20:05:05 +00:00
Vincent Coubard 1d37de1460 version v2.3.0 2015-12-23 12:27:45 +00:00
Vincent Coubard 05763f7854 Merge pull request #74 from pan-/characteristicDescriptorDiscovery
Implementation of Characteristic descriptor discovery
2015-12-23 12:25:32 +00:00
Vincent Coubard 4092d56947 version v2.2.10 2015-12-23 11:17:59 +00:00
Vincent Coubard 19d1c40612 Merge branch 'develop' of https://github.com/ARMmbed/ble-nrf51822 into characteristicDescriptorDiscovery 2015-12-22 17:53:52 +00:00
Vincent Coubard b8ed9fdbf7 Merge pull request #96 from andresag01/fix_shutdown
Fix shutdown of Gap instance to avoid NULL refs
2015-12-22 17:03:37 +00:00
Andres Amaya Garcia 22082c54ae Add minor comment in shutdown function 2015-12-22 15:51:34 +00:00