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

How to stop advertising ?

Hi,

I am testing **ble_app_uart example in the path of nRF51-SDK\nRF51_SDK_9.0.0_2e23562\examples\ble_peripheral\ble_app_uart\pca10028\s110 \arm5_no_packs\ble_app_uart_s100_pca10028.

I want to start and stop advertising manually on a certain condition.

ble_advertising_start(BLE_ADV_MODE_FAST) works for advertising . But I can't stop it.

I tried several ways, still in trouble.

I need help.

Thanks.

Parents
  • Hi guys,

    just wanted to say that our team has found a way to stop the advertising and terminate an active connection by adding:

    init.config.ble_adv_on_disconnect_disabled = true;

    in the "static void advertising_init(void)" function (in the ble_app_uart example) and then this

    sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);

    in the place where the stopping has to occur.

    I'm using nRF5_SDK_17.0.2_d674dde, and s132, and nrf52832.

    I hope this helps!

    L. B.

Reply
  • Hi guys,

    just wanted to say that our team has found a way to stop the advertising and terminate an active connection by adding:

    init.config.ble_adv_on_disconnect_disabled = true;

    in the "static void advertising_init(void)" function (in the ble_app_uart example) and then this

    sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);

    in the place where the stopping has to occur.

    I'm using nRF5_SDK_17.0.2_d674dde, and s132, and nrf52832.

    I hope this helps!

    L. B.

Children
Related