What does APP_BLE_CONN_CFG_TAG do?

I have searched through the examples and the documentation (BTW the online document links are broken - the offline documentation is nice however).

  • From what I can tell, this is a flag, always set to '1'.
  • The comments all read like this:

/**< A tag for BLE stack configuration */

  • It eventually gets pass into


/// @param[in] conn_cfg_tag  The connection to configure

  • When passed into to the advertising configuration:

ble_advertising_conn_cfg_tag_set(..., uint8_t ble_cfg_tag);

/// @param[in] ble_cfg_tag Configuration for the connection settings (see @ref ble_cfg_tag)

From what I infer, this value is associated with a BLE connection that can/may be established.

Specific questions:

  • If I am setting up multiple connections, should each of these values should be unique?
  • The default value is single connection examples seems to be '1'. So it seems this is not a zero-based index. Can I use the value zero here?
  • Are the values arbitrary, within the uint8_t range? Are there any forbidden values? 0xFF for example?
  • Other than being unique, I'm guessing this is a key for my usage by which I can keep track of a connection. Is this a correct interpretation?


Top Replies

  • Hi,

    The idea is that in some future release of the SoftDevice you might use sd_ble_gap_adv_set_configure() to set a new advertising configuration and receive a handle for it. Currently (v6.0.0) the maximum number of advertising configurations is one, which means you only have the configuration with handle 1. (But you can change that configuration runtime if you want to.) The maximum number of advertising sets supported by the SoftDevice is found in BLE_GAP_ADV_SET_COUNT_MAX.

    So it is a unique key for keeping track of an advertising configuration (not for keeping track of a connection.)


  • Thank you for the explanation!

  • Hi,

    I am using SDK 15 and MESH 2.0, and trying to merge the light switch demo with the ble_app_uart in folder ble_peripheral.

    The problem is that I found the light switch demo will call sd_ble_gap_adv_set_configure() in mesh_adv.c while ble_app_uart also will use this function to get the advertising handle.(the updating of advertising handle will still cause a Mesh error 12292 at 0x00000000 (:0), which I don't have an ideal to debug it)

    As you mentioned the maximum number of advertising handle is one for the softdevice v6.0.0. I wander if there is a way to control and pause the mash or the adv for ble_app_uart to let them work in different time intervals?


    Yi Liu