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

How to advertise as non-connectable when using the advertising module?

After switching to the BLE advertising module in SDK 16.0.0 (on an nRF52 board) and using it for over 3 months I am now discovering that no matter how I configure the advertising module, it always makes the device advertise as 'connectable'.

I read elsewhere in this forum that this is a known 'feature' and that I need to explicitly override the design/implementation.

1. Is this accurate/correct ?

2. If yes, then what needs to be changed?

Cheers
RMV

  • Hi

    Can you provide a link to where you found this information? I think it is outdated, as I.E. the ble_app_beacon in SDK 16.0.0 is nonconnectable. You should be able to make any advertising device nonconnectable by changing the GAP advertising type to either BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED or BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED.

    This is done in the advertising_init() function in our SDK example projects.

    Best regards,

    Simon

  • Hi Simon

    My question was specifically to the use of the 'advertising module' and I found out (after stepping through the code) that no matter how I set up the advertising property, the module overrides it to 'connectable, scannable'.

    I think I will revert to setting up the advertisement using the SoftDevice API directly.

    I wish the documentation had been clearer and more specific i.e. that the module WILL OVERRIDE the advertising flags -- would not have gone down this path three months back. 

    RMV

  • HI Simon

    Feel free to mark this ticket as 'closed'.

    Just to be clear, I will be using the 'advertising module' for connectable advertisements just not for the non-connectable variants.

    Cheers
    RMV

Related