cancel
Showing results for 
Search instead for 
Did you mean: 

How can BLE server access its own characteristics?

BMcGe.1
Associate II

I am working with the STM32WB15 controller. I have implemented a few custom BLE characteristics and I want to be able to check the value of the characteristics on the server side (not from a read request from a client device). Is there a way to access the current value of a characteristic?

1 REPLY 1
tianer2820
Associate

Try aci_gatt_read_handle_value

aci_gatt_read_handle_value((CustomContext.CustomMyTestCharHdle + CHARACTERISTIC_VALUE_ATTRIBUTE_OFFSET),
                                       0, /* charValOffset */
                                       SizeMyTestChar, /* wanted length of data */
                                       &ret_len, /* will return the actual length read */
                                       &buffer_len, /* a pointer to the length of buffer */
                                       buffer /* actual buffer */);

I found it in the AN5270 document