Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event 'indicateconfirmed' added #2299

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Event 'indicateconfirmed' added #2299

wants to merge 2 commits into from

Conversation

yerpj
Copy link
Contributor

@yerpj yerpj commented Dec 1, 2022

event 'indicateconfirmed' created. Raised upon reception of an 'BLE_GATTS_EVT_HVC' softdevice event.
See https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/msc_inline_mscgraph_90.png for more info.

This event can be used in the application to provide app-to-app data transfer reliability.
Primarily added to prevent any buffer overflow or data loss between the server and client.

event 'indicateconfirmed' created. Raised upon reception of an 'BLE_GATTS_EVT_HVC' softdevice event.
See https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/msc_inline_mscgraph_90.png for more info.

This event can be used in the application to provide app-to-app data transfer reliability.
Primarily added to prevent any buffer overflow or data loss between the server and client.
event 'indicateconfirmed' created. Raised upon reception of an 'BLE_GATTS_EVT_HVC' softdevice event.
See https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/msc_inline_mscgraph_90.png for more info.

This event can be used in the application to provide app-to-app data transfer reliability.
Primarily added to prevent any buffer overflow or data loss between the server and client.
@gfwilliams
Copy link
Member

Thanks - so just to confirm:

You have to use NRF.setServices to create a characteristic with indicate on it, and then when you update it with updateServices it sends an indication? And when that is handled, you get this global 'indicateconfirmed' event?

@yerpj
Copy link
Contributor Author

yerpj commented Dec 1, 2022

Thanks - so just to confirm:

You have to use NRF.setServices to create a characteristic with indicate on it, and then when you update it with updateServices it sends an indication? And when that is handled, you get this global 'indicateconfirmed' event?

That's correct. It should allow for the user app (server side) to transmit reliably packets of data without worry of getting buffer overflow from the softdevice.

@gfwilliams
Copy link
Member

Thanks - I guess from my point of view it'd be nice if this could call an event on the service itself, like we do for onWrite so you can see which one it was for if you have more than one characteristic:

NRF.setServices({
  0xBCDE : {
    0xABCD : {
      value : "Hello", // optional
      indicate : true,   // optional, default is false
      onIndicateResponse : function(evt) { // optional

      },

I'd have thought you could pretty much copy the code for that...

@yerpj
Copy link
Contributor Author

yerpj commented Dec 1, 2022

I totally agree with you, this would be fantastic if linked to a specific service. However, I already struggled at understanding how to expose this event globally, it will take me some time to understand how events could be linked to services.

@gfwilliams
Copy link
Member

Thanks - ok, I'll take a look when I get a minute. I can't merge this at the moment anyway as it looks like it breaks the Microbit 1 build

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