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

Integration of Bond Management Service in GATT Server Profile

Hi ,
I would want to establish a GATT Server application as well as integrate Bond Management Service from glucose example (ble_app_gls) in examples folder of SDK15.3.0_59ac345 into my GATT Server Application. How to integrate this service into GATT Server application. What are the dependencies which I need to take care of while integrating this service.

  • It is  err_code = pm_sec_params_set(&sec_param); function is showing the error . This error is reflected only if I change #define SEC_PARAM_BOND from 1 to 0. 

  • Hi,

    Ah, that makes sense. I forgot that you also need to change the key distribution configuration to disable it, since that only makes sense when bonding. So you should look for this part in peer_manager_init():

        sec_param.kdist_own.enc  = 1;
        sec_param.kdist_own.id   = 1;
        sec_param.kdist_peer.enc = 1;
        sec_param.kdist_peer.id  = 1;

    and replace it with this:

        sec_param.kdist_own.enc  = 0;
        sec_param.kdist_own.id   = 0;
        sec_param.kdist_peer.enc = 0;
        sec_param.kdist_peer.id  = 0;

    With this change, the nRF will still support pairing, but not bonding. If you don't want pairing support either, you should remove the peer manager. If that is your desire in tead, you can test by just comment out the call to peer_manager_init() in main() and pm_handler_secure_on_connection() in ble_evt_handler(), both in your main.c file.

Related