Hi,
I use nRF52832 and SDK12.2
The Project is ble_central_and_peripheral and the link define is like below
#define CENTRAL_LINK_COUNT 4
Here will connect 1 HR device and 3 CSC devices
#define PERIPHERAL_LINK_COUNT 1 Here is waiting for cell phone app
Here is what my project works. When my project power on, MCU will scan 1 HR device and 3 CSC devices and make sure the ble MAC address is my target then connect those device. The result is work and I can got the datas by 4 devices notify handle.
When I press the button to disconnect 4 devices and I wait the on_ble_central_evt’s “p_ble_evt->header.evt_id” got the “BLE_GAP_EVT_DISCONNECTED” 4 times I make sure 4 devices is disconnect.
After I disconnect 4 devices and connect to those devices again. Sometimes the project will stuck on: err_code = ble_db_discovery_start(&m_ble_db_discovery[p_gap_evt->conn_handle], p_gap_evt->conn_handle); APP_ERROR_CHECK(err_code);
And I make sure the 4 devices is advertising because I use 4 nRF51 Dongle and their Led is shiny again.
And my question is: When I disconnect the 4 devices should do some more action or just call sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION); And wait on_ble_central_evt make sure device is disconnect then call sd_ble_gap_disconnect to next device and wait on_ble_central_evt again until 4 devices all in disconnect. Then I can connect those device again.
Thanks