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

How to use HTS to notify temperature instead of indicate ?

As per the example, HTS only the "indicate" property is mandatory. But, I want to use Notify and Read property. The example suggests using the intermediate temperature in order to use Notify property in the temperature measurement. Is there any alternative approach to it?

Thanks in advance!

Parents
  • Hi,

    I'm not sure if I understand your question, but to use notification you can change this line in the function hts_measurement_char_add() ble_hts.c

    char_md.char_props.indicate = 1;
    

    to

    char_md.char_props.notify = 1;
    

    and to enable reading change this:

    attr_md.read_perm  = p_hts_init->hts_meas_attr_md.read_perm;
    

    to e.g. this

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
    

    If you make these changes though, your device will no longer comply with the HTS profile.

Reply
  • Hi,

    I'm not sure if I understand your question, but to use notification you can change this line in the function hts_measurement_char_add() ble_hts.c

    char_md.char_props.indicate = 1;
    

    to

    char_md.char_props.notify = 1;
    

    and to enable reading change this:

    attr_md.read_perm  = p_hts_init->hts_meas_attr_md.read_perm;
    

    to e.g. this

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
    

    If you make these changes though, your device will no longer comply with the HTS profile.

Children
Related