* gattc: use UUID() to allow for bare metal to permit clean use of short UUIDs
Signed-off-by: deadprogram <ron@hybridgroup.com>
* gattc/macos: correct usage of UUID wrapper type alias
Signed-off-by: Ron Evans <ron@hybridgroup.com>
* gattc/sd: correct usage of UUID wrapper type alias
Signed-off-by: Ron Evans <ron@hybridgroup.com>
* gattc/sd, uuid/sd: changes intended to reduce memory allocations for service and characteristic discovery
Signed-off-by: deadprogram <ron@hybridgroup.com>
* gattc/sd: partial improvements to DiscoverServices/DiscoverCharacteristics
Signed-off-by: deadprogram <ron@hybridgroup.com>
* gattc/sd: mostly getting uuid back for services in DiscoverServices
Signed-off-by: deadprogram <ron@hybridgroup.com>
* uuid/sd: correct way to calculate UUID from shortUUID
Signed-off-by: deadprogram <ron@hybridgroup.com>
* gattc/sd: able to discover services and characteristics
Signed-off-by: deadprogram <ron@hybridgroup.com>
* examples: updated discover example that can run with OS or bare metal
Signed-off-by: deadprogram <ron@hybridgroup.com>
* gattc/sd: ensure safe casts for length of returned struct when converting short UUID
Signed-off-by: deadprogram <ron@hybridgroup.com>
I couldn't measure a difference in my setup, apparently my multimeter is
not able to handle the high-to-low current transition when entering
sleep mode. But it _should_ reduce current consumption a little bit.
This is necessary when connecting to a device when using the SoftDevice.
The information is not set on Linux and Windows and is ignored on those
platform when connecting.
There used to be GAP events (connect/disconnect). The main purpose for
these events was to allow applications to re-start advertisement when a
connection was lost - on nrf. Unfortunately things work differently on
Linux, which already has this behavior and for which I haven't yet
implemented these events. Therefore I have removed these events and
instead added code to automatically restart advertisement on connection
loss.
Supporting multiple (incoming) connections as a peripheral would be
useful, but is not currently supported.
All initialization can be done in the Enable call. This makes the API a
bit simpler and a bit more consistent between Nordic chips and other BLE
interfaces.
The nrf51822 chip is still widely available, for example in the BBC
micro:bit. Therefore it's a good idea to support it too.
Unfortunately, Nordic decided to change the API in some significant ways
so many parts are not compatible between S110 for nrf51 and the other
nrf52* SoftDevices.