S115 SoftDevice for nRF54LS05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gap_adv_start()

uint32_t sd_ble_gap_adv_start ( uint8_t adv_handle,
uint8_t conn_cfg_tag )

#include <ble_gap.h>

Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).

Note
Only one advertiser may be active at any time.
If privacy is enabled, the advertiser's private address will be refreshed when this function is called. See sd_ble_gap_privacy_set().
Events generated
BLE_GAP_EVT_CONNECTEDGenerated after connection has been established through connectable advertising.
BLE_GAP_EVT_ADV_SET_TERMINATEDAdvertising set has terminated.
BLE_GAP_EVT_SCAN_REQ_REPORTA scan request was received.
Relevant Message Sequence Charts
Advertising
Directed Advertising
Peripheral Connection Establishment with Private Peer
Parameters
[in]adv_handleAdvertising handle to advertise on, received from sd_ble_gap_adv_set_configure.
[in]conn_cfg_tagTag identifying a configuration set by sd_ble_cfg_set or BLE_CONN_CFG_TAG_DEFAULT to use the default connection configuration. For non-connectable advertising, this is ignored.
Return values
NRF_SUCCESSThe BLE stack has started advertising.
NRF_ERROR_INVALID_STATEadv_handle is not configured or already advertising.
NRF_ERROR_CONN_COUNTThe limit of available connections for this connection configuration tag has been reached; connectable advertiser cannot be started. To increase the number of available connections, use sd_ble_cfg_set with BLE_GAP_CFG_ROLE_COUNT or BLE_CONN_CFG_GAP.
BLE_ERROR_INVALID_ADV_HANDLEAdvertising handle not found. Configure a new adveriting handle with sd_ble_gap_adv_set_configure.
NRF_ERROR_NOT_FOUNDconn_cfg_tag not found.
NRF_ERROR_RESOURCESEither:
  • adv_handle is configured with connectable advertising, but the event_length parameter associated with conn_cfg_tag is too small to be able to establish a connection on the selected advertising phys. Use sd_ble_cfg_set to increase the event length.
  • Not enough BLE role slots available. Stop one or more currently active roles (Peripheral or Broadcaster) and try again
  • p_adv_params is configured with connectable advertising, but the event_length parameter associated with conn_cfg_tag is too small to be able to establish a connection on the selected advertising phys. Use sd_ble_cfg_set to increase the event length.