Currently it just blindly writes beyond the end of the array, leading to impossible-to-find bugs.
It doesn't help that the limit on the number of characteristics doesn't seem to be documented anywhere.
=============
* Relocate the FOTA bootloader image to this repository. The bootloader
image(s) was previously stored in the mbed SDK, but it was decided that
putting it inside the nRF module would make more sense. This allows users to
replace the bootloader with something other than the default.
The new search algorithm is:
- search for any file named nrf51822_bootloader.hex *ELSE*
- search for any file named (depending on the choice of S130/S110 softdevice)
s130_nrf51_1.0.0_bootloader.hex
s110_nrf51822_8.0.0_bootloader.hex
The exact location of the bootloader image isn't too important, since mbed
SDK looks for file names in all scanned resource files.
* Initialize the member `authorizationReply` when posting read-write
authorization callbacks to the application.
* Minor rework for error handling in nRF5xGattServer::write()--including
remove of the un-necessary variable `gapConnectionHandle`.
* Update yotta CMake files to suppress warnings for unused parameters and
missing initializers (especially when building with gcc).
This file was previously stored in the mbed SDK, but it was decided that
putting it inside the nRF library would make more sense.
The exact location isn't too important, since mbed SDK is looking for
file names in all scanned resource files, when building a BOOT image.
It was built from the current ARMmbed dfu-bootloader repository.
It uses the internal LF clock source only, so it is compatible with all
nRF51822 devices. In addition, it doesn't rely on a specific SoftDevice:
the SoftDevice information struct is inspected at a fixed address, to
find out the application entry point.
As a temporary solution, we'll duplicate the file because mbed assumes
we need per-SoftDevice bootloaders. In the future, this will be a single
file.
In order to ease development, this bootloader pretends to use DFU version
0.4, so recent DFU applications won't mandate an init packet.
=============
* There's now a compile time switch to for handling for BLE stack events. For
mbed OS, we now post callbacks to Minar, else stack events are executed
right-away in interrupt context. In either case, the logic of event
processing is identical--this means that the Nordic port of BLE_API will
have the same code for mbed-classic and mbed OS. :)
As a fallout of the above, all mbed-OS BLE event handling now happens in
thread mode.
=============
Enhancements
~~~~~~~~~~~~
* Add connection handle to GATT callback parameters. This paves the way for
applications requiring multiple concurrent connections: read/write/HVX
callbacks will be able to distinguish between peripherals by comparing per-
device connection handles.
* nRFGattClient: move the allocation of the singleton to within the
getInstance() method. This saves memory when nRFGattClient isn't
instantiated.
* Disable GattClient features when using S110 SoftDevice. This is controlled
by the pre-processor macros: MCU_NORDIC_16K_S110 or MCU_NORDIC_16K_S110.
S110 compatibility is already present, but this patch adds proper handling
of observer/central related features:
* Gap::startScan will return BLE_ERRROR_NOT_IMPLEMENTED (instead of
PARAM_OUT_OF_RANGE)
* nRF5xGattClient uses the default GattClient implementation when S110 is
in use. All if its methods return NOT_IMPLEMENTED.
Example: for an application that acts as both a central and a peripheral,
using S110 will make the ble.gap().startScan() call return
BLE_ERROR_NOT_IMPLEMENTED, and advertisement features will continue
running normally.
In addition, with GCC, this patch will free 344 bytes of RAM and 2504
bytes of flash.