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

Setting slave connection interval (same as GAP PPCP?)

Hi,

I'm wondering if the slave connection interval range is the same as the GAP peripheral preferred connection parameters i.e. does it make sense to do the following (GAP connection parameters have been set before):

ble_gap_conn_params_t    gapConnParams;
sd_ble_gap_ppcp_get(&gapConnParams);

p_advertising->slave_conn_int.min_conn_interval = gapConnParams.min_conn_interval;
p_advertising->slave_conn_int.max_conn_interval = gapConnParams.max_conn_interval;

Thanks

Parents
  • Hi,

    The sd_ble_gap_ppcp_get(...) is used to get the peripheral Preferred Connection Parameters.

    When you set it like this:

    gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
    gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
    gap_conn_params.slave_latency     = SLAVE_LATENCY;
    gap_conn_params.conn_sup_timeout  = CONN_SUP_TIMEOUT;
    
    err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
    APP_ERROR_CHECK(err_code);
    

    You can later use the function sd_ble_gap_ppcp_get(...) to get the parameters(gap_conn_params) that the softdevice is currently set to use.

  • Yes, this is exactly what I'm doing. I was just wondering if the slave connection interval range should be set the way I described above or if the slave connection interval range is not necessarily the same as the GAP parameters. Or: when it is/should be the same; Why is the slave connection interval range not set automatically by softdevice and one just has to say "yes, I want to add this parameter to my advertising packet or scan response"?

Reply
  • Yes, this is exactly what I'm doing. I was just wondering if the slave connection interval range should be set the way I described above or if the slave connection interval range is not necessarily the same as the GAP parameters. Or: when it is/should be the same; Why is the slave connection interval range not set automatically by softdevice and one just has to say "yes, I want to add this parameter to my advertising packet or scan response"?

Children
No Data
Related