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

ble_app_rscs

I have nRF52832 running ble_app_rscs as a server, sending notification to the client every hour. I know that the client can read the values also by sending bt_gatt_read to the server and the server will reply instantly with the values. However this value corresponds to the latest measurements conducted by the server, and it could be a while ago. Is there away of sending a message from the client to server so that the server can actually do the measurements instantly? In other words can the client initiate the server to sample its sensors and update gatt instead of waiting for its timer?

Please assist. 

Parents Reply
  • This is handled on the server yes, for instance:

    attr_md.rd_auth = 1;       
    attr_md.wr_auth = 0;

    Before calling sd_ble_gatts_characteristic_add().

    My suggestion may be further improved by: So when the application receive the RW_AUTHORIZE_REQUEST, then it can execute the measurement, and write the data using sd_gle_gatts_rw_authorize_reply(). I think you can have up to 30 seconds to do this.

    Best regards,
    Kenneth

Children
Related