Function esp_idf_svc::sys::wifi_prov_scheme_ble_set_mfg_data

source ยท
pub unsafe extern "C" fn wifi_prov_scheme_ble_set_mfg_data(
    mfg_data: *mut u8,
    mfg_data_len: isize,
) -> i32
Expand description

@brief Set manufacturer specific data in scan response

This must be called before starting provisioning, i.e. before making a call to wifi_prov_mgr_start_provisioning().

@note It is important to understand that length of custom manufacturer data should be within limits. The manufacturer data goes into scan response along with BLE device name. By default, BLE device name length is of 11 Bytes, however it can vary as per application use case. So, one has to honour the scan response data size limits i.e. (mfg_data_len + 2) < 31 - (device_name_length + 2 ). If the mfg_data length exceeds this limit, the length will be truncated.

@param[in] mfg_data Custom manufacturer data @param[in] mfg_data_len Manufacturer data length

@return

  • ESP_OK : Success
  • ESP_ERR_INVALID_ARG : Null argument