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

nRF52840 sd_ble_gap_connect return error 18

Hello Nordic team

I am working on ble_uart_c central example on nRF52840 DK, SDK v-15.0.0. Example code working correctly I can exchange data between peripheral and central uart devices. Now, I have to integrate DFU for central device. So, after integrating DFU in ble_uart_c example, DFU working correctly nut device can not connect with ble_uart (peripheral device) and return error 18.

Here, I have attached sdk_config.h file. When I am enable "NRF_SDH_BLE_CENTRAL_LINK_COUNT" to 1 device get stuck.

Please help me to figure out the issue. I thing something ble_stack or softdevice initialization error.

Any help will be appreciated.

Regards

Raj

sdk_config.h

  • Hi Rajneesh.

    Error 18 states that maximum connection count is exceeded, you can see this in nrf_error.h, when you enable NRF_SDH_BLE_CENTRAL_LINK_COUNT to 1 device and get this error, it is because one device is already connected to the ble_uart_c.

    - Andreas

  • Thanks for the response.

    My device is not connected to any peer device then why it return "maximum connection count is exceeded" ? At least it should connect one device.

  • Hi Rajneesh.

    Have you tried debugging the project? I recommend you take a look in the infocenter, there is also a youtube intro here.

    - Andreas