Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK references ble_adv_legacy_enabled, but does not seem to exist.

The nRF5 SDK references a field ble_adv_legacy_enabled in the ble_adv_config_modes_t structure (see http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fstructble__advertising__init__t.html&anchor=a608be739421d5c94df234f35a035eb73), but that field does not seem to exist.  Is this a documentation error?  Do I need to set a special bit to get Bluetooth 4 to work?

  • I found a reference to ble_adv_legacy_enabled here in the ble_adv_directed_high_duty_enabled boolean. I believe this bool references the legacy layer which supports deprecated API (search for legacy here). I have asked internally about this & will get back to you soon.

  • Hi Matir, this is a documentation error, you don't need to set a special bit to get Bluetooth 4 to work.

    At some point when we added extended advertising, we decided that "extended advertising" would just be called "advertising" and "non-extended advertising" was dubbed "legacy advertising". Before release we decided to undo this and not use the term legacy (so today "extended advertising" is called "extended advertising" and "non-extended advertising" is just called "advertising").

    Unfortunately this comment in the header file slipped into the release. I'm sorry for the confusion.

    I made a pull request to replace it with the following:

    /**< Enable or disable high duty direct advertising mode. Can not be used together with extended advertising. */

    (For anyone curious, the fact that they can't be used together is Bluetooth spec, and not our design.)

    For high duty advertising, the goal is usually to reconnect two devices as fast as possible. This heavily loads the air traffic with advertising packets, but the scanner only needs to get one packet to initiate the connection. If we added extended advertising to the mix, the scanner would need to also read the advertising data which is now offloaded to a data channel. That would guarantee a reconnect to take more time. I believe that is why it is not supported.

    Note that you can combine extended advertising with the "low duty cycle" directed advertising that was introduced in Bluetooth 4.1 without problems.

Related