This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

gap_params_init() vs conn_params_init();

Hello Nordic Semi team, 

I am building two BLE product. One acts a peripheral and has server capability. Other is central with client capability. 

I am trying to understand your SDK examples better (the NUS example. )

I see gap_params_init() and conn_params_init();

They seem to be similar and ultimately make a SD call sd_ble_gap_ppcp_set

Why are two different calls to sd_ble_gap_ppcp_set needed? 

Regards, 

Hari 

Parents
  • Why are two different calls to sd_ble_gap_ppcp_set needed? 

    It's not needed to set it two times, it is just that gap_params_init() and ble_conn_params_init() both can set it. The gap_params_init() will use the values set in gap_params_init() if NULL is passed in gap_params_init().

    The main task of ble_conn_params_init() is that it will monitor the connection parameters, and update the connection parameters if the current connection parameters are outside of the preferred connection parameters.

    Best regards,
    Kenneth

Reply
  • Why are two different calls to sd_ble_gap_ppcp_set needed? 

    It's not needed to set it two times, it is just that gap_params_init() and ble_conn_params_init() both can set it. The gap_params_init() will use the values set in gap_params_init() if NULL is passed in gap_params_init().

    The main task of ble_conn_params_init() is that it will monitor the connection parameters, and update the connection parameters if the current connection parameters are outside of the preferred connection parameters.

    Best regards,
    Kenneth

Children
Related