Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Do I need to keep advertising once connected?

Hi,

I don't find an answer to my question and maybe I'm missing the basic of the BLE communication here. I need to transmit data as fast as possible to ONE central device thanks to a Characteristic with Notify.

So my first attempt was to fast advertising non-stop (without timeout). But I'm wondering, should I keep advertising when the connection is established?

Because in my ble_evt_handler function I only got :

case BLE_GAP_EVT_CONNECTED:
    NRF_LOG_INFO("Connected");
    m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;

    break;

So it keeps advertising for potential other central device while notifying my Characteristic?

Is it possible to stop advertising while connected and dedicate the speed to only Notify the Characteristic?

Thanks for the clarification

Parents
  • Hi!

    In general when posting a question, information like what device you are using, SDK version, SD version, if you are using an example in our SDK etc, is useful information when helping to solve your question.

    If you want your device to keep advertising after you connected to your central is up to you.

    If you are using an example in our SDK, it will most likely stop advertising when a connection is established,
    and you will have to start advertising again yourself.

    Cheers,
    Joakim.

  • Hi Joakim,

    Thank you for your fast answer and sorry for the lack of informations. I'm using a nRF52832 with SDK14.2, SD132 with SEGGER.

    My code is based on the ble_app_blinky but I don't find where it stop advertising once connected.

    EDIT : Because in the code, there is :

    #define APP_ADV_TIMEOUT_IN_SECONDS      BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED

Reply Children
No Data
Related