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.

  • But we have an interfacing application which specifies to include the slave connection interval range. And as this AD type exists (0x12), and the ble_advdata_t struct contains a parameter p_slave_conn_int, I thought I would just make use of that parameter.

    However, my other question is:

    1. What could be the reason why the interval range should be added to the advertising packet when the range is also available through GAP characteristic?

    And returning back to my initial question:

    1. Are those interval ranges (GAP PPCP vs. Slave Connection Interval Range) talking about the same thing or are these different parameters/settings/... ?

    2. And if they are the same: Why do I have to set them twice? Why isn't the sofdevice just forwarding the GAP PPCP when the application requests to add the connection interval to the advertising packet?

Reply
  • But we have an interfacing application which specifies to include the slave connection interval range. And as this AD type exists (0x12), and the ble_advdata_t struct contains a parameter p_slave_conn_int, I thought I would just make use of that parameter.

    However, my other question is:

    1. What could be the reason why the interval range should be added to the advertising packet when the range is also available through GAP characteristic?

    And returning back to my initial question:

    1. Are those interval ranges (GAP PPCP vs. Slave Connection Interval Range) talking about the same thing or are these different parameters/settings/... ?

    2. And if they are the same: Why do I have to set them twice? Why isn't the sofdevice just forwarding the GAP PPCP when the application requests to add the connection interval to the advertising packet?

Children
No Data
Related