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 Arnaud,

    I just stumbled upon your question, as I am facing pretty much the same challenge. I need a device, which primarily is in the peripheral role. However, about every once a minute, the device should also do a scan (to detect the presence of a base station nearby). Therefore, I'd need a combination of (mainly) peripheral role and (sometimes) scanning role.

    Did you succeed yet in making a scan without S120? (do you have S110 then, or no SD at all?)

    Thanks, Mike

Children
No Data
Related