Skip to content

Conversation

@jeremybrodt
Copy link
Contributor

In some cases, application behavior may be dependent upon whether updates (notifications/indications) are enabled for a characteristic. Since the CCCDs are being created within the adaptation layer, the application does not know the handle of the CCCD attribute for a given characteristic. This allows the application to determine the status from the characteristic's value handle.

@jeremybrodt
Copy link
Contributor Author

That seems reasonable. I will look at how I might do this today.

@jeremybrodt
Copy link
Contributor Author

I've been thinking about your recommendation more. The information to resolve the handle is in the GattServer. How would GattCharacteristic access the GattServer? Would the caller need to provide the BLEDevice object upon which to access the GattCharacteristic?

@rgrover
Copy link
Contributor

rgrover commented May 14, 2015

I see the problem.
Perhaps the updatesEnabled() [or areNotificationsEnabled()] API should be a method under BLEDevice, and should take in arguments for connectionHandle and const GattCharacteristic &.

@jeremybrodt
Copy link
Contributor Author

@rgrover I believe my latest commit is in line with your recommendation. Let me know if see any issues with this.

rgrover pushed a commit that referenced this pull request Jul 1, 2015
…cteristic.

follow up from #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.
@rgrover rgrover closed this Jul 1, 2015
rgrover pushed a commit that referenced this pull request Jul 2, 2015
=============

This is a minor release.

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

* Introduce API GattServer::areUpdatesEnabled() to determine notification
  status for a characteristic.
  This is a follow up from #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.
JayBeavers pushed a commit to JayBeavers/ble-api that referenced this pull request Mar 19, 2016
Author: Rohit Grover
Introduce GattServer API to determine notification status for a characteristic.
follow up from ARMmbed/ble#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.
jacobrosenthal pushed a commit to jacobrosenthal/ble that referenced this pull request Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants