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

Is it possible to send notification even there is no change in value?

Hi,

Is it possible to send notification periodically even if there is no change in the value? I create sample code that send constant value periodically over BLE, but in nRF connect application I get only one log related to the received notification. If I change the value in each notification android app show the new value in log files.

Regards,

  • Hello,

    Yes. It is possible.

    You can test this by using the ble_app_hrs example. In the function heart_rate_meas_timeout_handler(...) in main.c just set the heart_rate to a fixed value, instead of simulating it using sensorism_measure(...).

     

    You can connect to it with nRF Toolbox or nRF Connect to see the notifications. Note that if you use nRF Connect, you need to enable the notifications for the heart_rate characteristic to see the live update.

     

    Best regards,

    Edvin

Related