ble-x-nucleo-idb0xa1 icon indicating copy to clipboard operation
ble-x-nucleo-idb0xa1 copied to clipboard

Fix gatt server

Open pan- opened this issue 7 years ago • 3 comments

This PR fix reporting of notification and indication.

pan- avatar Dec 04 '17 17:12 pan-

@apalmieriGH I've fixed what seemed obvious but I've also noticed the following issues:

  • The callback registered with GattServer::onDataSent is not called when a notification or an indication is emitted.
  • The callback registered with GattServer::onConfirmationReceived is not called when the confirmation is received.

I'm not sure how you'd want to tackle these issues.

pan- avatar Dec 04 '17 17:12 pan-

@pan- regarding the PR, the second argument of handleEvent() is (as per function args description) the "handle of the attribute that was modified", the CCCD in this case. So, when calling the HCIEvent() callback, the second param should be: char_value_handle+1 or am I missing something?

apalmieriGH avatar Dec 11 '17 14:12 apalmieriGH

@apalmieriGH You are correct; we got several implementations doing it wrong and forwarding the handle of the characteristic.

pan- avatar Dec 13 '17 10:12 pan-