Hello all!
I am currently developing on the development board nRF52832, SDK16.0 and SD132v7.2.0.
My developmnet board acts as a central whereas my phone as peripheral. The idea is now that my developmnet board terminates the connection with my phone after a few seonds. My first try was to set CONN_SUP_TIMEOUT with the wish that the SD terminates the connection automatically by its own:
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(400, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(650, UNIT_1_25_MS)
#define SLAVE_LATENCY 0
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)
void init_gap_conn(void)
{
ble_gap_conn_params_t gap_conn = {0};
gap_conn.min_conn_interval = MIN_CONN_INTERVAL;
gap_conn.max_conn_interval = MAX_CONN_INTERVAL;
gap_conn.slave_latency = SLAVE_LATENCY;
gap_conn_params.conn_sup_timeout = CONN_SUP_TIMEOUT;
sd_ble_gap_ppcp_set(&gap_conn_params);
}
Please correct me if i am wrong but based on the code snippet above the connection to the peripheral should terminate after 4 s? But the problem is that the connection remains until i disconnet manually on my peripheral itself. Is there a possibility to perform a termination of the connection or do i have to do it in SW by using follwowing command:
sd_ble_gap_disconnect();
Any hint would be really appreciated.
Best regards,
Karl