Hello everybody !
My code is based on the code of the "ble_app_template" to which I added my own custom service composed of 4 characteristics sending notifications. Notifications are sent to the central with a code based on "ble_app_multilink".
I want each characteristic to send its 8-byte notification to the panel and that it will display them.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
uint32_t ble_cus_custom_value_update(ble_cus_t * p_cus, uint64_t custom_value, uint64_t custom_value2, uint64_t custom_value3, uint64_t custom_value4)
{
NRF_LOG_INFO("In ble_cus_custom_value_update. \r\n");
if (p_cus == NULL)
{
return NRF_ERROR_NULL;
}
uint32_t err_code = NRF_SUCCESS;
ble_gatts_value_t gatts_value;
////////////////////////////////////////////////////////////////////////////////////////
// SENSOR n°1 //
////////////////////////////////////////////////////////////////////////////////////////
// Initialize value struct.
memset(&gatts_value, 0, sizeof(gatts_value));
gatts_value.len = sizeof(uint64_t);
gatts_value.offset = 0;
gatts_value.p_value = &custom_value;
So here's the problem:
Currently I send data that is incremented 4 features on my smartphone, so when it comes to sending data is good. Now, I would like to be able to recover this value on my central... but how ?
Thank you in advance for your assistance !