Hello, after following this tutorial https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial I have set a custom service with a custom characteristic, now I'm trying to use the function sd_ble_gatts_value_get() to get the value of that characteristic and display it on a screen (the screen job is not part of the question).
I'm using S132 with the nRF52 DK and the SDK 15.3.
So far, what I'm trying is the following:
on the timer_timeout_handler of the main.c I added:
uint32_t err_code;
uint32_t text = 0;
ble_gatts_value_t textValue;
textValue.p_value = (uint8_t*)&text;
textValue.len = 10;
textValue.offset = 0;
//sd_temp_get(&temperature);
get_text(&m_our_service, &textValue);
And the get_text() function is over our_service.c like this:
void get_text(ble_os_t *p_our_service, ble_gatts_value_t *text)
{
uint32_t err_code;
err_code = sd_ble_gatts_value_get(BLE_CONN_HANDLE_INVALID, p_our_service->char_handles.value_handle, text);
APP_ERROR_CHECK(err_code);
}
But when I run the code after the first interval of the timer I receive the error NRF_ERROR_NOT_FOUND on the call of the function.
Any hint or help on what can be wrong?