Hello,
we have a problem with a BLE connection state function. We are working with an NRF52832 device and SDK 14. The device itself works in central and peripharel mode. Since we have another device with SDK 15.2 with a working DFU Mode and buttonless bootloader we tried to convert the functions to SDK 14. But at the Event "Bootloader Enter Prepare" the function for "ble_conn_state_for_each_connected" is missing . What would be the best alternativ function in SDK 14 ? We tried "ble_conn_state_n_connections" but that wont really work.
case BLE_DFU_EVT_BOOTLOADER_ENTER_PREPARE: { NRF_LOG_INFO("Device is preparing to enter bootloader mode."); // Prevent device from advertising on disconnect. ble_adv_modes_config_t config; advertising_config_get(&config); config.ble_adv_on_disconnect_disabled = true; ble_advertising_modes_config_set(&m_advertising, &config); // Disconnect all other bonded devices that currently are connected. // This is required to receive a service changed indication // on bootup after a successful (or aborted) Device Firmware Update. uint32_t conn_count = ble_conn_state_for_each_connected(disconnect, NULL); //uint32_t conn_count = ble_conn_state_n_connections(); //disconnect(conn_count,NULL); //ble_conn_state_n_connections NRF_LOG_INFO("Disconnected %d links.", conn_count); break; }
Best regards
Oliver