Hi everyone, i am developing a system where i have 2 types of board, one board is a central&peripheral (lest name it BOARD1), and the other board is only a peripheral(lets name it BOARD2).
I connect to the BOARD1 peripheral with nrF Connect and send commands over NUS Service, then BOARD1 Scan for a BOARD2, and if it matches the filter it connect with the command:
err_code = sd_ble_gap_connect(&p_adv->peer_addr,
p_scan_param,
&m_scan.conn_params,
APP_BLE_CONN_CFG_TAG);Just like the ble_app_hrs_rscs_relay example. So i have this flux : APP <-> (PHE,BOARD1,CENT) <->(PHE,BOARD2)
But i dont know what command use to disconnect that specific peripheral from the central side on SDK16. I understand the disconnection from the peripheral side, basically when the peripheral connect to a peer the BLE_GAP_EVT_CONNECTED occur and you assign a m_conn_handle to your QWR instance with "nrf_ble_qwr_conn_handle_assign(&m_qwr, m_conn_handle);", and then you disconnect using "sd_ble_gap_disconnect(m_conn_handle,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);". But i dont get how to do it from the central side, when i connect the BOARD1 to the BOARD2 while i am connected from the nrF connect APP to the BOARD1, how i distinguish a Central connection from a Peripheral connection? Or assign a m_conn_handle to the Central connection?
My idea is have multiple BOARD2, and sometimes i will want to disconnect from a BOARD2 to connect to another one, but i dont get how to do it on SDK16, i need a extra handler?