Connection error in nrf52-ble-app-uart-c-multilink

am using a code based on nrf52-ble-app-uart-c-multilink (https://github.com/NordicPlayground/nrf52-ble-app-uart-c-multilink)

If the central is working and the peripherals are incrementally connected, then it can connect to many devices (I have limited it to 16).

But if the peripherals stay connected (more than 4), and the central is powered on (or reset), then it will reset in every new attempt to connect with any peripheral.

i.e. endless resets.

The cause of the resey is in:

case NRF_BLE_SCAN_EVT_CONNECTING_ERROR:
{
err_code = p_scan_evt->params.connecting_err.err_code;
APP_ERROR_CHECK(err_code);
} break;

If I remove the APP_ERROR_CHECK, it doesn't reset, but it cannot connect to the reset of the peripherals. 

The only way to fix it, is to shut down all the peripherals and start connecting again incrementally. 

I recall that the advice was to increase the connection interval -

Can you explain how it affects? What should be the values if I want to connect up to 16 devices?

Thanks

Avi

  • Before commenting, the error was 11.

    I didn't try to check which of the 3 wasresponsible - just made a comment on all the 3.

    I believe there are 2 issues here:

    1) The latest version of the code (main.c) which is in the Github of SDK17 seems to have several differences with the previous versions. like I mentioned above: 

    In the latest version: BLE_DB_DISCOVERY_DEF(m_db_disc);

    While in the previous version: BLE_DB_DISCOVERY_ARRAY_DEF(m_db_disc, NRF_SDH_BLE_CENTRAL_LINK_COUNT);

    The other issue is that even the previous code that works under SDK 16, doesn't work under SDK17.

  • Avi said:
    I didn't try to check which of the 3 wasresponsible - just made a comment on all the 3.

    We really need to know which exact function returned the error And is the return value 11 or 0x11 (17)? That makes a big difference. If you want to get to the bottom of the problem, this is the path you really should follow.

    Avi said:

    1) The latest version of the code (main.c) which is in the Github of SDK17 seems to have several differences with the previous versions. like I mentioned above: 

    In the latest version: BLE_DB_DISCOVERY_DEF(m_db_disc);

    While in the previous version: BLE_DB_DISCOVERY_ARRAY_DEF(m_db_disc, NRF_SDH_BLE_CENTRAL_LINK_COUNT);

    Yes, the examples are not identical.

    Avi said:
    The other issue is that even the previous code that works under SDK 16, doesn't work under SDK17.

    Some minor porting effort is needed. As mentioned SDK 16 and SDK 17 are very similar when it comes to API, so that is not a huge task.

Related