This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Measurement Interval Valid Range descriptor

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! 

Parents
  • Hi Ayden, 

    Could you let me know if you have added the Measurement Interval characteristic? 

    You only add the descriptor after you add the characteristic. You can have a look at the battery_level_char_add() in ble_bas.c where we add the BLE_UUID_REPORT_REF_DESCR descriptor into the battery level characteristic.  

    Please follow what we do in the file to add descriptor. 

Reply
  • Hi Ayden, 

    Could you let me know if you have added the Measurement Interval characteristic? 

    You only add the descriptor after you add the characteristic. You can have a look at the battery_level_char_add() in ble_bas.c where we add the BLE_UUID_REPORT_REF_DESCR descriptor into the battery level characteristic.  

    Please follow what we do in the file to add descriptor. 

Children
Related