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

advertising auto-restart

I am trying to understand the following, hopefully someone can explain:

AFAIK, BLE advertising is stopped as soon as the limit of the SD is reached, AKA the PERIPHERAL_LINK_COUNT in the examples.

To me it seems like the advertising is stopped automatically by the SD, so there seems to be alink somewhere internally.

When one device disconnects, advertising has to be restarted manually though through the ble_evt_handler callback.

So: why can the advertisement be stopped by the SoftDevice, but not started again automatically?

Also, what is the limit for central and peripheral connections with s130?

What happens, when i try to start advertising, while a client is connected? I suppose i get some error regarding the client limit?

  • why can the advertisement be stopped by the SoftDevice, but not started again automatically?

    Yes, the application needs to restart the advertising with sd_ble_gap_adv_start(). By doing this, we let the application decide if it wants to start the advertising again or not. This leaves the developers with better flexibility on how they want their application to behave.

    Also, what is the limit for central and peripheral connections with s130?

    The S130 SoftDevice can be configured with one connections as a Peripheral and up to eight connections as a Central.(link)

    Note that with the S132/S140 SoftDevice for the nRF52-series you can have up to 20 links, freely configurable roles.

    What happens, when i try to start advertising, while a client is connected? I suppose i get some error regarding the client limit?

    If you have exceeded the maximum numbers of connections, you will get the NRF_ERROR_CONN_COUNT error, telling you that the limit of available connections has been reached; connectable advertiser cannot be started.

  • thank you, I really appreciate nordics communication with developers.

Related