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

sdk 12.3.0 - how to return response after characteristic write is called?

Hi all,

I'm trying to return a write response in nRF sdk but so far no success.

Actually I'm still scratching my head to figure out how characteristic write works exactly in nRF sdk. Take the TPS for example, I cannot find anywhere ble_tps_tx_power_level_set is called in the SDK nor any example code although the API is defined - the compilation setup is so strict that normally if you declare an API but not using it, the compiler will issue an error. But in the TPS case, it does not complain at all.

Can someone please point me how the logic is glued together? I just want to do some parameter checking for write and return error if invalid config is given.

Thanks in advance, Carl

Parents
  • The purpose of ble_tps_tx_power_level_set() is to set the TX power level, then the client can read this and know which TX power level is used. I guess it makes sense to call it every time you change the TX power level. The server is going to call it.

    There seems to be a bug in the documentation of the API:

    Function for setting the state of the Sensor Contact Detected bit.

    This doesn't make any sense. Will report that.

    Edit 22.01.2018 - Will be fixed in SDK 15.0.0

Reply
  • The purpose of ble_tps_tx_power_level_set() is to set the TX power level, then the client can read this and know which TX power level is used. I guess it makes sense to call it every time you change the TX power level. The server is going to call it.

    There seems to be a bug in the documentation of the API:

    Function for setting the state of the Sensor Contact Detected bit.

    This doesn't make any sense. Will report that.

    Edit 22.01.2018 - Will be fixed in SDK 15.0.0

Children
No Data
Related