Commit graph

617 commits

Author SHA1 Message Date
Rohit Grover
5eda1ad9e7 make signature of BLE::onRadioNotification() more explicit.
void onRadioNotification(void (*callback)(bool))
This then is extended in Gap.h by:

    template <typename T>
    void onRadioNotification(T *tptr, void (T::*mptr)(bool));
2015-07-21 09:34:08 +01:00
Rohit Grover
26e9536a80 fix some typos in API comment blocks in BLE.h 2015-07-21 09:30:09 +01:00
Rohit Grover
90551b6eb7 Rename iBeaconService as iBeacon. This is not a Service in the BLE sense. 2015-07-21 09:24:05 +01:00
Rohit Grover
09076e1673 simplified some declarations: removed extraneous 'typedef' from typedef struct X {}; 2015-07-14 09:05:35 +01:00
Rohit Grover
86d7566467 white space diffs. 2015-07-14 08:20:31 +01:00
Rohit Grover
d79995b3ce Merge pull request #56 from OJFord/develop
expose descriptors optional arg in derived GattChar. constructors
2015-07-14 08:07:18 +01:00
Rohit Grover
98261b871b switch repo URL to ARMmbed organization. 2015-07-14 08:05:20 +01:00
Ollie Ford
d583b13bba fix typo in GattService constructor
Reference to 'this characteristic' become 'this service'
2015-07-13 15:26:03 +01:00
Ollie Ford
ab17d9c409 expose optional descriptors in template constructors
Read/Write/Only/Array derivations forward `descriptors` and `numDescriptors` to base constructor
2015-07-13 15:22:59 +01:00
Rohit Grover
74191e254b module.json: depend on mbed-classic only for mbed-classic builds. 2015-07-13 10:05:56 +01:00
Rohit Grover
7aaf768fde Merge branch 'adfernandes-master' into develop 2015-07-13 07:40:09 +01:00
Rohit Grover
7d961c15f5 Merge branch 'master' of https://github.com/adfernandes/BLE_API into adfernandes-master 2015-07-13 07:39:40 +01:00
Andrew Fernandes
da20f2e2c7 Change DiscoveredCharacteristic API to return long or short UUIDs. 2015-07-10 11:50:36 -04:00
Rohit Grover
9d289f811b minor changes to comments for porting. 2015-07-06 14:39:46 +01:00
Rohit Grover
735e18aab3 provide a useful initial implementation for GattClient::discoverServices() 2015-07-06 14:35:05 +01:00
Rohit Grover
0586bdf264 Release 0.4.2
=============

This is a minor release.

Enhancements
~~~~~~~~~~~~

* fix #53: add GattClient API for handling HVX Events (notifications and
  indications). Refer to GattClient::onHVX(HVXCallback_t ...) and
  GattHVXCallbackParams.

* Add empty (void) declarations for unused variables in the default
  implementations for several API (in Gap, GattServer, GattClient, etc). This
  avoids compiler warnings.

Bugfixes
~~~~~~~~

none.
2015-07-06 09:35:58 +01:00
Rohit Grover
33a70b4655 Release 0.4.2
=============

This is a minor release.

Enhancements
~~~~~~~~~~~~

* fix #53: add GattClient API for handling HVX Events (notifications and
  indications). Refer to GattClient::onHVX(HVXCallback_t ...) and
  GattHVXCallbackParams.

* Add empty (void) declarations for unused variables in the default
  implementations for several API (in Gap, GattServer, GattClient, etc). This
  avoids compiler warnings.

Bugfixes
~~~~~~~~

none.
2015-07-06 09:35:41 +01:00
Rohit Grover
0d55096d82 fix #53: add GattClient::onHVX() and GattHVXCallbackParams 2015-07-06 09:31:37 +01:00
Rohit Grover
4b21112e34 update module.json with version numbers 2015-07-03 11:09:04 +01:00
Rohit Grover
feb4e95753 minor change to a comment for poter(s). 2015-07-03 10:59:27 +01:00
Rohit Grover
163f9e010a add empty (void) declarations for unused variables. This avoids warnings.
I could have used the compiler-polyfill module, but I wanted to avoid creating that dependency.
2015-07-03 10:54:32 +01:00
Rohit Grover
8846107b5c Merge branch 'rosterloh-patch-1' into develop 2015-07-02 11:44:31 +01:00
Rohit Grover
7619e0eb89 Merge branch 'patch-1' of https://github.com/rosterloh/BLE_API into rosterloh-patch-1 2015-07-02 11:44:07 +01:00
Richard Osterloh
41b4e077ff Refactor using new include paths 2015-07-02 11:41:37 +01:00
James Crosby
c7dbf2b071 use mbed-classic to build (this will probably be a target-dependendency in the future) 2015-07-02 11:31:47 +01:00
Rohit Grover
b158df2418 Merge pull request #50 from mbedmicro/revert-45-master
Revert "use mbed-classic as mbed dependency"
2015-07-02 11:29:52 +01:00
Rohit Grover
08c492444b Revert "use mbed-classic as mbed dependency" 2015-07-02 12:26:20 +01:00
Rohit Grover
3118f76bfe Merge pull request #45 from autopulated/master
use mbed-classic as mbed dependency
2015-07-02 11:25:15 +01:00
Rohit Grover
737800d8ec fix a typo in a comment header 2015-07-02 09:36:02 +01:00
Rohit Grover
42f99e1b7c Release 0.4.1
=============

This is a minor release.

Enhancements
~~~~~~~~~~~~

* Introduce API GattServer::areUpdatesEnabled() to determine notification
  status for a characteristic.
  This is a follow up from https://github.com/mbedmicro/BLE_API/pull/41.
  @jeremybrodt did a lovely job submitting that pull request, but there had
  been too many changes in the neighbouring code recently to merge his
  work directly. I didn't take the trouble of preserving his submission
  in the history; my apologies--credit for this API goes entirely to him.

* Replace DiscoveredCharacteristic::setupOnDataRead() with GattClient::onDataRead().

* Move GATT_MTU_SIZE_DEFAULT into blecommon.h as BLE_GATT_MTU_SIZE_DEFAULT.

* Replace uses of the deprecated updateCharacteristicValue() with ble.gattServer().write().

* Change access levels to protected for various members of the standard services.

* Update LinkLossService with a recent change to the definition of
  GattWriteCallbackParams. Involved renaming member charHandle to handle.

Bugfixes
~~~~~~~~

* None.
2015-07-02 08:36:36 +01:00
Rohit Grover
4ac9700a2b update LinkLossService with changes to GattWriteCallbackParams 2015-07-02 08:27:54 +01:00
Rohit Grover
417b857d1b changing a comment pattern to request action from porters. 2015-07-02 08:19:12 +01:00
Rohit Grover
9a0be47794 Introduce GattServer API to determine notification status for a characteristic.
follow up from https://github.com/mbedmicro/BLE_API/pull/41.
@jeremybrodt did a lovely job submitting that pull request, but there had been too many changes in the neighbouring code recently to merge his work directly. I didn't take the trouble of preseving his submission in the history; my apologies--credit for this API goes entirely to him.
2015-07-01 14:52:17 +01:00
Rohit Grover
453681182a change access levels to protected for various members of the standard services 2015-07-01 13:14:26 +01:00
Rohit Grover
b633e90c9c replace use of updateCharacteristicValue() with ble.gattServer().write() 2015-07-01 12:57:17 +01:00
Rohit Grover
7fb8b66ebb minor rename of a variable. 2015-07-01 11:33:38 +01:00
Rohit Grover
2d59404877 #49: replace DiscoveredCharacteristic::setupOnDataRead() with GattClient::onDataRead() 2015-07-01 08:17:44 +01:00
Rohit Grover
27bc31ee0c minor white space and comment header diffs. 2015-07-01 07:39:27 +01:00
Rohit Grover
2601599599 #46: rename GATT_MTU_SIZE_DEFAULT to BLE_GATT_MTU_SIZE_DEFAULT. This avoids a name conflict with the contant defined in Nordic-SDK. 2015-07-01 07:31:24 +01:00
Rohit Grover
dde04982bc fix mbedmicro/BLE_API/#16: move GATT_MTU_SIZE_DEFAULT into blecommon.h 2015-06-30 07:49:04 +01:00
James Crosby
854fd1118a use mbed-classic to build (this will probably be a target-dependendency in the future) 2015-06-23 18:18:44 +01:00
Rohit Grover
d80fec885c Release 0.4.0
=============

This is a major release which introduces the GATT Client functionality. It
also aligns BLE_API with builds using our new package manager: yotta
(https://github.com/armmbed/yotta).

Many APIs have seen some redesign. We encourage our users to pay attention to
the changes and migrate appropriately over time. We've also taken care to
ensure that existing code continues to work the same way. There's more
documentation in the form of comment headers for APIs to explain proper usage;
in many cases comment headers suggest alternative use of APIs.

Enhancements
~~~~~~~~~~~~

* Introduce GattClient. This includes functionality for service-discovery,
  connections, and attribute-reads and writes. You'll find a demo program for
  LEDBlinker on the mbed.org Bluetooth team page to use the new APIs. Some of
  the GATT client functionality hasn't been implemented yet, but the APIs have
  been added.

* Most APIs in the abstract base classes like Gap and GattServer return
  BLE_ERROR_NOT_IMPLEMENTED. Previously many APIs were pure-virtual, which did
  not permit partial ports to compile.

* We've added a new abstract base class for SecurityManager. All security
  related APIs have been moved into that.

* BLEDevice has been renamed as BLE. A deprecated alias for BLEDevice is
  available to support existing code.

* There has been a major cleanup of APIs under BLE. APIs have now been
  categorized as belonging to Gap, GattServer, GattClient, or SecurityManager.
  There are accessors to get references for Gap, GattServer, GattClient, and
  SecurityManager. A former call to ble.setAddress(...) is now expected to be
  achieved with ble.gap().setAddress(...).

* We've cleaned up our APIs, and this has resulted in dropping some APIs like
  BLE::reset().

* We've also dropped GattServer::initializeGattDatabase(). THis was added at
  some point to support controllers where a commit point was needed to
  indicate when the application had finished constructing the GATT database.
  This API would get called internally before Gap::startAdvertising(). We now
  expect the underlying port to do the equivalent of initializeGattDatabase()
  implicitly upon Gap::startAdvertising().

* The callback for BLE.onTimeout() now receives a TimeoutSource_t to indicate
  the cause of the timeout. This is perhaps the only breaking API change. We
  expect it to have very little disruptive effect.

* We've added a version of Gap::disconnect() which takes a connection handle.
  The previous API (which did not take a connection handle) has been
  deprecated; it will still work for situations where there's only a single
  active connection. We hold on to that API to allow existing code to migrate
  to the new API.

Bugfixes
~~~~~~~~

* None.
2015-06-19 15:46:56 +01:00
Rohit Grover
75beb80315 switch to a yotta layout 2015-06-19 13:37:31 +01:00
Rohit Grover
1bb021e666 white space diffs. 2015-06-19 11:49:19 +01:00
Rohit Grover
b7e6ddfae1 DiscoveredCharacteristic: add API for discovering descriptors. 2015-06-19 11:49:03 +01:00
Rohit Grover
9739a146de GattClient: add helper APIs to discover services. 2015-06-19 11:04:23 +01:00
Rohit Grover
9183583ffa disconnect() should take a connection handle. 2015-06-19 10:21:08 +01:00
Rohit Grover
d11a0b04a5 update comment block for launchServiceDiscovery() 2015-06-19 10:12:20 +01:00
Rohit Grover
d90f07cc77 white space diff. 2015-06-19 10:11:18 +01:00
Rohit Grover
3a4a4c16fe SecurityManager: fix comments. 2015-06-19 09:48:09 +01:00