pub unsafe extern "C" fn bt_le_adv_start(
param: *const bt_le_adv_param,
ad: *const bt_data,
ad_len: usize,
sd: *const bt_data,
sd_len: usize,
) -> i32
Expand description
@brief Start advertising
Set advertisement data, scan response data, advertisement parameters and start advertising.
When the advertisement parameter peer address has been set the advertising will be directed to the peer. In this case advertisement data and scan response data parameters are ignored. If the mode is high duty cycle the timeout will be @ref BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT.
This function cannot be used with @ref BT_LE_ADV_OPT_EXT_ADV in the @p param.options. For extended advertising, the bt_le_ext_adv_* functions must be used.
@param param Advertising parameters. @param ad Data to be used in advertisement packets. @param ad_len Number of elements in ad @param sd Data to be used in scan response packets. @param sd_len Number of elements in sd
@return Zero on success or (negative) error code otherwise. @return -ENOMEM No free connection objects available for connectable advertiser. @return -ECONNREFUSED When connectable advertising is requested and there is already maximum number of connections established in the controller. This error code is only guaranteed when using Zephyr controller, for other controllers code returned in this case may be -EIO.