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.

  • We were told by Nordic that this was going to be in the current release of S110. So I do believe this is possible, however I cannot provide any help with a code example (not there yet in f/w development). Have you tried simply starting advertising while connected? I assume you have to change to un-connectable advertising first.

  • 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.

  • 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?

  • Thanks Petter. I was able to test this on S110. Is it possible to do something similar on S310? I'm basically trying to decide on my stack, so I could implement mesh networking. It seems that you cannot be a scanner and broadcaster at the same time on S110. I was looking at examples on your github page at github.com/.../. It looks like you're not using standard softdevice ble calls but accessing radio directly. I was thinking about implementing mesh with ant but i'd also like to be able to broadcast data on S310 while in connected mode, in case we decide to move mesh to bluetooth completely. Thanks.

  • 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