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

ble_hts_is_indication_enabled always false on re-connection

Hi,

I'm developing a peripheral that expose the HTS service. I have the on_hts_evt event handler to handle BLE_HTS_EVT_INDICATION_ENABLED and BLE_HTS_EVT_INDICATION_DISABLED to start and stop a timer that sends temperature value. Suppose I enable indication from central side (a smartphone) ... it works great ... the indication is enabled and the temperature value is received (on the central). Suppose I disconnect from peripheral without disabling indication first. When I reconnect, handling the DM_EVT_LINK_SECURED event in the device_manager_evt_handler event handler, I use the ble_hts_is_indication_enabled to check if indication is enabled (I get the code from ble_app_hts example). However, the above function returns always false even if as I said I disconnected from peripheral without disabling the indication.

Why ?

Thanks, Paolo.

Parents
  • Hi Paolo,

    It's normal that the function return code was false (0) because 0 = NRF_SUCCESS. Meaning the function returns successfully.

    The output of the function is the value of "is_indication_enabled" not the return code of the function.

  • My test here showed that is_indication_enabled = 0x01. Could you double check ? Do you have the indication after you reconnect and press the button ?

Reply
  • My test here showed that is_indication_enabled = 0x01. Could you double check ? Do you have the indication after you reconnect and press the button ?

Children
No Data