I am working on a BLE central application (client function) using MBED OS 6.
My external BLE peripheral device uses the NOTIFY property.
As such, I need my MBED BLE central application to enable notifications for that characteristic.
Unfortunately, I cannot find much information about how to go about this.
We have a small paragraph here within “the details”: https://os.mbed.com/docs/mbed-os/v6.2/mbed-os-api-doxy/classble_1_1_gatt_client.html#details
And somehow I need to incorporate all data here: https://os.mbed.com/docs/mbed-os/v6.2/mbed-os-api-doxy/struct_gatt_h_v_x_callback_params.html
But that’s it.
Laboriously trawling through the OS code, does not give much more about the function I need, which is found within the GattClient.h file…
* Register an handler for Handle Value Notification/Indication events.
* @param callback Event handler to register.
* @note It is possible to unregister a callback by using
void onHVX(HVXCallback_t callback);
As you see the code documentation does not tell me much.
So, assuming this is the right function, how do I attach this to a particular characteristic handle for example.
Then where should I place this code - I assume this “onHVX” is best placed within the
discovery_termination function, if I was using the LEDblinker example as my reference.
Any guidance, is greatly appreciated.