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.
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.
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.
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.
S110 builds contian a conditional compilation option that compiles out
GattClient functionality, thereby saving several hundred bytes of unecessary
memory overhead.
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.
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.
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.
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.
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.
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.
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.
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.
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.