I am trying to add the valid range descriptor to my measurement interval characteristic in the Health Thermometer. This is a necessary step as my measurement interval characteristic is writeable.
I notice that this particular topic has come up quite a few times over the years but so far there has been no definitive answer or example of how to implement it.
Given this lack of information I have done my best to implement the necessary code but when I check the service in the nRF Connect app there is no descriptor showing. I have no idea if I've written enough code or even put it in the right place.
I am using SDK v15.1.0 and S132 v6.1.0
The above code lies inside my services_init()
function. The p_attr.p_value
is currently only 1234 as a placeholder as I am also unsure how to format the p_value correctly, given that the struct wants a uint8_t pointer but the actual descriptor (according to the bluetooth spec) needs two uint16s.
Any assistance with this issue would be greatly appreciated!