The type of address the stack should use for itself. Valid values are: - BLE_OWN_ADDR_PUBLIC - BLE_OWN_ADDR_RANDOM - BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT - BLE_OWN_ADDR_RPA_RANDOM_DEFAULT
direct_addr
The peer's address for directed advertising. This parameter shall be non-NULL if directed advertising is being used.
duration_ms
The duration of the advertisement procedure. On expiration, the procedure ends and a BLE_GAP_EVENT_ADV_COMPLETE event is reported. Units are milliseconds. Specify BLE_HS_FOREVER for no expiration.
adv_params
Additional arguments specifying the particulars of the advertising procedure.
cb
The callback to associate with this advertising procedure. If advertising ends, the event is reported through this callback. If advertising results in a connection, the connection inherits this callback as its event-reporting mechanism.
cb_arg
The optional argument to pass to the callback function.
Return value
0 on success, error code on failure.
Examples
ble_gap_adv_start() is referenced by 19 libraries and example projects: