This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Peripheral in a connected mode and broadcaster

For nRF51 series chips and S110, S120, S130 soft devices.

Is it somehow possible to have a connected ble peripheral while broadcasting data?

S110 spec doc says "broadcaster can run concurrently with a peripheral in a connection.". It seems that it should be possible. Is this really the case? I could not find any working code examples that do that.

Parents
  • Locky is correct, you can trigger the advertising on the BLE_GAP_EVT_CONNECTED event. The advertising type must be set to BLE_GAP_ADV_TYPE_ADV_NONCONN_IND and the advertising interval must be over 100 ms.

    Just declare a new ble_gap_adv_params_t struct, a separate advertising_init() function and start the advertising with sd_ble_gap_adv_start().

    Locky: The SoftDevice automatically stops the advertising. The BLE_GAP_EVT_CONNECTED is sent to the application after a connection is established.

Reply
  • Locky is correct, you can trigger the advertising on the BLE_GAP_EVT_CONNECTED event. The advertising type must be set to BLE_GAP_ADV_TYPE_ADV_NONCONN_IND and the advertising interval must be over 100 ms.

    Just declare a new ble_gap_adv_params_t struct, a separate advertising_init() function and start the advertising with sd_ble_gap_adv_start().

    Locky: The SoftDevice automatically stops the advertising. The BLE_GAP_EVT_CONNECTED is sent to the application after a connection is established.

Children
  • Does a BLE_GAP_EVT_CONNECTED event automatically cause Advertising to cease? I notice that most example project have a Start function but no Stop function for Advertising. It would be my assumption then that the Stack must automatically stop Advertising and thus it is up to the application to restart Advertising (unconnectable). Is this accurate?

  • If you find my answer sufficient please accept it by clicking the grey circle with a check mark in it. If you have more questions I would appreciate if you could add them separately, so they can be helpful to others, not hidden in the comments. That said, have you examined SoftDevice S130?

Related