ble-x-nucleo-idb0xa1
ble-x-nucleo-idb0xa1 copied to clipboard
Fix gatt server
This PR fix reporting of notification and indication.
@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- 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 You are correct; we got several implementations doing it wrong and forwarding the handle of the characteristic.