This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_ERROR_CONN_COUNT returned when setting # peripherals connection > 1

Hello, 

I have read numerous posts about  NRF_ERROR_CONN_COUNT but yet able to solve this solve, my setup is NRF52840 Dongle as central and I want to connect to multiple Heart rate sensors peripheral.

Using nRF Connect BLE app, I was able to connect 2+ peripherals but using nrf-pc-ble-driver I could not initialize the ble stack without an error.

nRF Connect BLE app:

Will automatically program connectivity software for me, its output:

14:22:23.121
Validating connectivity firmware for device with serial number C3E20E0A4F63...
14:22:23.134
Connectivity firmware is valid.
14:22:23.134
Connectivity firmware version: ble-connectivity 0.1.0+Aug-14-2018-15-12-51. SoftDevice API version: 3. Baud rate: 1000000.
14:22:23.135
Opening adapter connected to /dev/ttyACM0
14:22:23.650
Successfully opened /dev/ttyACM0. Baud rate: 1000000. Flow control: none. Parity: none.
14:22:23.651
Reset performed on adapter /dev/ttyACM0
14:22:24.212
Adapter connected to /dev/ttyACM0 opened

nrf-pc-ble-driver,

I use heart_rate_collector_v3, it is the only version that worked for me, all other api version (v2, v5, v6) did not work out of the box.

I modify the following code

#define MAX_PEER_COUNT 2            /**< Maximum number of peer's application intends to manage. */
#if NRF_SD_BLE_API <= 3
ble_enable_params.gap_enable_params.periph_conn_count = 2;
ble_enable_params.gap_enable_params.central_conn_count = 2;
ble_enable_params.gap_enable_params.central_sec_count = 2;

err_code = sd_ble_enable(m_adapter, &ble_enable_params, app_ram_base);
#else
err_code = sd_ble_enable(m_adapter, app_ram_base);
#endif

And the error came from
err_code = sd_ble_enable(m_adapter, &ble_enable_params, app_ram_base);
Related