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

Disconnection happen when calling ble_advertising_start function

Hi to all,

I am developing an app based on nordic NRF52840 soc and i want to implement a peripheral device that can connect to multiple central devices in same time and i heard that nordic soft device can handle this. so i am using s140 and SDK15.1. 

at first i starting to advertise and then connecting to device from central and until here every thing works well, but just after calling ble_advertising_start function for new advertisement and new connection previous connection suddenly interrupted and disconnected. i saw this in sniffer that NRF52840 did not respond to central device after that. i use below function to advertising:

err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);

now can any one help to solve the problem, how can i advertise while i am in connection without disrupting establish connection?

thanks.

  • Hi,

    It is no problem advertising while you are in an active connection, but if the advertising is connectable you must have configured the SoftDevice to handle two connections.

    What is the error code returned from the call to ble_advertising_start()? Assuming this is there the error is that will typically tell you much about what has happened. You will get the error printed to the log directly if you enable logging and build with DEBUG defined (either define it in the processor definition list yourself or just select the Debug build configuration if you are using Segger Embedded Studio).

Related