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

S120 softdevice on nRF51822 : How to alternate between scanning and advertising

Hi,

On a nRF51822 (QFAAG0) with S120 softdevice (using the recent PCA 10001 v2.2.0 board), i'm trying to perform these operations successively:

  • a simple RSSI scan
  • stop scanning
  • start advertising

Refering to this topic : Can nRF51822 support both central and peripheral roles?, it's apparently not possible, but why offering peripheral functions on S120 then, like sd_ble_gap_adv_data_set(), instead of on S110 only?

Unsure of that, i gave it a try (a bit stubborn).

Scanning works well, but i can't manage to initialize advertising data properly using sd_ble_gap_adv_data_set() function, using ble_advdata_set() from ble_advdata.h library, based on the board/pca10001/s110/ble_app_proximity example

I get the following error: NRF_ERROR_NOT_SUPPORTED

Before going further, i'd like to know if it's potentially possible to alternate between these 2 operations on S120 ? If yes, is it possible to fill up the data field of the advertisement frame since it must contain the device name (referring to sd_ble_gap_adv_data_set notes) ?

Thanks in advance, Arnaud

Parents Reply
  • Hi, I am also in this situation where I need to primarly act as a peripheral, but on a regular basis scan for advertisements from another peripheral. I too was hoping the S120 would allow this operation but unfortunately it appears does not. I don't need all of the functionality of a central, just to be able to scan for advertisements (I am planning on having my information broadcast in the advertisement on the other sensor). Vaio, Arnaud, any guidance on your success would be appreciated. Thanks, Scott

Children
No Data
Related