Commit graph

619 commits

Author SHA1 Message Date
Rohit Grover
20b07e38bc update init() to match the chagnes around initializationCompleteCallback.
refer to https://github.com/ARMmbed/ble/pull/91 and https://github.com/ARMmbed/ble/issues/90
2015-10-30 10:26:37 +00:00
Rohit Grover
aba22463c8 Merge branch 'master' into develop 2015-10-30 10:21:17 +00:00
Rohit Grover
2fc324f01b Merge pull request #55 from andresag01/develop
Introduced changes for memory savings
2015-10-29 13:03:37 +00:00
Andres Amaya Garcia
97a65815ed Introduced changes for memory savings
Moved GattSecurityManager and GattClient to be allocated dynamically and
reduced the size of some arrays to increase memory savings.
2015-10-29 11:39:00 +00:00
Rohit Grover
18050e7068 Merge pull request #53 from marcuschangarm/defaultScanParams
When connecting, if no scanning parameters are passed, use values from Gap parent.
2015-10-20 12:48:28 +01:00
Bogdan Marinescu
63df68b147 version v1.0.0 2015-10-19 16:17:00 +03:00
Bogdan Marinescu
a9f33e16dc Updated dependencies 2015-10-19 16:17:00 +03:00
Marcus Chang
6082c76ab5 When connecting, if no scanning parameters are passed, use values from Gap parent. 2015-10-16 11:44:03 +01:00
Rohit Grover
804e7f8bb9 Merge #48 into develop 2015-10-13 12:55:29 +01:00
Rohit Grover
816f4559f1 white space diffs; convert tabs to spaces 2015-10-13 12:54:46 +01:00
Rohit Grover
031ae20002 Merge branch 'patch-1' of https://github.com/Timmmm/ble-nrf51822 into Timmmm-patch-1 2015-10-13 12:51:08 +01:00
Rohit Grover
9d51dfe4a6 Merge pull request #49 from jpbrucker/s110_compat
Update S110 detection macros, again
2015-10-13 12:45:09 +01:00
Jean-Philippe Brucker
eab6631cb6 Update S110 detection macros again
The mbed SDK actually prefixes all labels from targets.py with "TARGET_".
Update our detection macros accordingly.
2015-10-05 18:05:55 +01:00
Tim
4af5d03cd5 Error check number of characteristics
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.
2015-09-29 15:04:59 +01:00
Rohit Grover
ad59bf4701 Merge branch 'develop' 2015-09-25 15:24:03 +01:00
Rohit Grover
d18b39efc4 Release 0.4.8
=============

* 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).
2015-09-25 15:21:19 +01:00
Rohit Grover
ee2b3dfe4a nRF5xGattServer::write()L remember to setup returnValue to BLE_STACK_BUSY in the case of an unforseen error. 2015-09-25 14:19:49 +01:00
Rohit Grover
2d0b533b5e adding LICENSE at the top level 2015-09-03 13:25:06 +01:00
Rohit Grover
3f9d15a7eb add LICENSE at the top level; also clarify that there are multiple licenses involved in this module 2015-09-02 14:22:39 +01:00
Rohit Grover
d0d82e3e65 Merge pull #47 into develop 2015-09-02 09:18:53 +01:00
Rohit Grover
167f304b68 minor cleanup to Fabien's pull request; remove the un-necessary gapConnectionHandle 2015-09-02 09:17:02 +01:00
Rohit Grover
887426ad0b minor white space diff 2015-08-28 14:01:52 +01:00
Rohit Grover
b0bf2db253 Merge branch 'master' of https://github.com/fabiencomte/ble-nrf51822 into fabiencomte-master2 2015-08-28 13:51:10 +01:00
Fabien Comte
6cdb6f161f rgrover patch fixed 2015-08-28 14:44:34 +02:00
Rohit Grover
b94805eb39 Merge branch 'autopulated-master' into develop 2015-08-25 10:35:49 +01:00
Rohit Grover
70a7f88ec4 Merge branch 'master' of https://github.com/autopulated/ble-nrf51822 into autopulated-master 2015-08-25 10:35:35 +01:00
Rohit Grover
4fa43078db initialize all members of gattc_write_params_t in GattClient::write().
This avoids some compiler warnings about un-initialized members.
2015-08-25 10:34:01 +01:00
Rohit Grover
6a5d142f03 initialize the member authorizationReply when posting authorization callbacks to the application.
This is a nice-to-do.
2015-08-25 10:34:01 +01:00
Rohit Grover
94e699bbe8 supress warnings for unused paramters and missing initializers for the Nordic code. 2015-08-25 10:34:01 +01:00
Rohit Grover
31a28c5b87 Merge pull request #43 from jpbrucker/s110_compat
Update S110 detection macros
2015-08-25 10:28:09 +01:00
Jean-Philippe Brucker
dc1d7893c4 Update S110 detection macros
Those macros are defined by mbed SDK in targets.py. They changed from
MCU_NORDIC_xxx_S110 to MCU_NRF51_xxx_S110. Update the #ifdefs accordingly.
2015-08-24 18:09:28 +01:00
James Crosby
b94eaffd5f remove some unnecessary include paths 2015-08-18 14:06:13 +01:00
Rohit Grover
52625825de Merge pull request #41 from jpbrucker/bootloader
Add FOTA bootloader image
2015-08-13 13:43:16 +01:00
Jean-Philippe Brucker
8f853d9676 Add FOTA bootloader image
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.
2015-08-13 13:36:10 +01:00
Rohit Grover
21e8e22df9 Release 0.4.7
=============

* 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.
2015-08-13 11:12:42 +01:00
Rohit Grover
41ec57c418 version v0.4.7 2015-08-13 11:11:07 +01:00
Rohit Grover
34cffe75cb depend on an updated version of ble 2015-08-13 11:07:59 +01:00
Rohit Grover
74c707687b setup an event handler to post BLE events to Minar.
Stack and system events now get scheduled through minar.
2015-08-13 11:01:50 +01:00
Rohit Grover
6d1b1d94f6 white space diffs. 2015-08-12 10:55:44 +01:00
Rohit Grover
c9a77b8253 Release 0.4.6
=============

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.
2015-08-11 15:11:45 +01:00
Rohit Grover
f69fd98508 version v0.4.6 2015-08-11 15:11:37 +01:00
Rohit Grover
a763452453 depend on ble v0.4.6 because of addition of connHandle in gattClient callbacks param structs. 2015-08-11 14:56:27 +01:00
Rohit Grover
1da1aa8622 fix #39: have a single call to SOFTDEVICE_HANDLER_INIT() to remove duplication of BLE_EVT_BUFFER. 2015-08-11 14:42:53 +01:00
Rohit Grover
c28d0eea88 fix #11. Remove include for missing header. 2015-08-11 14:35:20 +01:00
Rohit Grover
2c01109786 Merge pull request #38 from jpbrucker/s110_compat
Disable GattClient features when using S110 SoftDevice
2015-08-11 14:21:33 +01:00
Rohit Grover
fff7623df3 Setup connHandle for most gattClient callbacks.
Merge branch 'jpbrucker-GattCB_conn_handle' into develop.
2015-08-11 14:11:18 +01:00
Rohit Grover
2d149d36fb Merge branch 'GattCB_conn_handle' of https://github.com/jpbrucker/nRF51822 into jpbrucker-GattCB_conn_handle 2015-08-11 14:08:07 +01:00
Jean-Philippe Brucker
3eabc779a0 Disable GattClient features when using S110 SoftDevice
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.
2015-08-11 13:02:34 +01:00
Jean-Philippe Brucker
73147b41c2 Fill connection handle in Gatt callbacks parameters 2015-08-11 11:31:20 +01:00
Rohit Grover
e699db6a54 nRFGattClient: move the allocation of the singleton to within the getInstance() method.
This saves memory when getInstance() isn't used.
2015-08-11 10:32:33 +01:00