Hello together,
i know, there are similar questions about "Reading Characteristic Value", but i don't get a solution for me. My Problem: I use nRF51DK with SD130 and the Example Project from the Characteristics Tutorial. I added 1 service and 2 characteristics with each 5 bytes.
Service: UUID: 0x2800 Handle: 0x000C
Char Decl. UUID: 0x2803 Handle: 0x000D
Char Value: UUID: 0x0001 Handle: 0x000E Array: 01-02-03-00-00
Char2 Decl. UUID: 0x2803 Handle: 0x000F
Char2 Value: UUID: 0x0002 Handle: 0x0010 Array: 00-00-00-00-00
I set the permissions for read and write and i can read out and change the values with my smartphone. Now i want to do something with this 10(2x5) bytes from the peripheral device. And here is my problem. I need them at different times while running, not only when writing/written, and i dont get it, to read these bytes out.
I tried this in the main loop for a simple test to read the value 01-02-03-00-00 of Char1:
ble_gatts_value_t * temp;
memset(&temp, 0, sizeof(ble_gatts_value_t));
err_code = sd_ble_gatts_value_get(BLE_CONN_HANDLE_INVALID, 0x000E, temp);
APP_ERROR_CHECK(err_code);
But i only get the err_code 0x00000010.
I hope u understand what i mean/need. Perhaps you can help me. Thanks a lot.