Function esp_idf_svc::hal::sys::esp_wifi_80211_tx

source ยท
pub unsafe extern "C" fn esp_wifi_80211_tx(
    ifx: u32,
    buffer: *const c_void,
    len: i32,
    en_sys_seq: bool,
) -> i32
Expand description

@brief Send raw ieee80211 data

@attention Currently only support for sending beacon/probe request/probe response/action and non-QoS data frame

@param ifx interface if the Wi-Fi mode is Station, the ifx should be WIFI_IF_STA. If the Wi-Fi mode is SoftAP, the ifx should be WIFI_IF_AP. If the Wi-Fi mode is Station+SoftAP, the ifx should be WIFI_IF_STA or WIFI_IF_AP. If the ifx is wrong, the API returns ESP_ERR_WIFI_IF. @param buffer raw ieee80211 buffer @param len the length of raw buffer, the len must be <= 1500 Bytes and >= 24 Bytes @param en_sys_seq indicate whether use the internal sequence number. If en_sys_seq is false, the sequence in raw buffer is unchanged, otherwise it will be overwritten by WiFi driver with the system sequence number. Generally, if esp_wifi_80211_tx is called before the Wi-Fi connection has been set up, both en_sys_seq==true and en_sys_seq==false are fine. However, if the API is called after the Wi-Fi connection has been set up, en_sys_seq must be true, otherwise ESP_ERR_INVALID_ARG is returned.

@return

  • ESP_OK: success
  • ESP_ERR_WIFI_IF: Invalid interface
  • ESP_ERR_INVALID_ARG: Invalid parameter
  • ESP_ERR_WIFI_NO_MEM: out of memory