This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

About service and characteristic

Hi all, please I have some questions.

1- When adding a service then a characteristic, this enables the SoftDevice to send BLE events to the application whenever a client wants to use the characteristic. Am I right ? So, if a client wants to read data (without authorization) from the server, then how can the server use sd_ble_gatts_hvx() to send the requested data, if there is no event generated for a Read Request without Authorization to notify the application ?

2- Alternatively to the 1st point, is it better to use sd_ble_gatts_value_set() when the data changes, so that the client find the latest value, and no need to sd_ble_gatts_hvx() ?

3-Are the two points possible to implement, or there is something that I am not understanding ?

Thank you for your helps and time.

Regards,

mohBOSS.

Related