what is correct length value for esp_ieee802154_transmit?

sethblue
Posts: 1
Joined: Mon Sep 16, 2024 8:45 am

what is correct length value for esp_ieee802154_transmit?

Postby sethblue » Mon Sep 16, 2024 9:11 am

Looking at esp_ieee802154_transmit from https://github.com/espressif/esp-idf/b ... ee802154.h

It's not clear what value to set for length, is it the length of (Len + MHR + MAC Payload + FCS) or (MHR + MAC Payload + FCS)?

Similarly on the receive side

/**
* @brief Transmit the given frame.
* The transmit result will be reported via `esp_ieee802154_transmit_done()`
* or `esp_ieee802154_transmit_failed()`.
*
* @param[in] frame The pointer to the frame, the frame format:
* |-----------------------------------------------------------------------|
* | Len | MHR | MAC Payload | FCS |
* |-----------------------------------------------------------------------|
* @param[in] cca Perform CCA before transmission if it's true, otherwise transmit the frame directly.
*
* @note During transmission, the hardware calculates the FCS, and send it over the air right after the MAC payload,
* so you just need to prepare the length, mac header and mac payload content.
*
* @return
* - ESP_OK on success.
* - ESP_ERR_INVALID_ARG on an invalid frame.
* - ESP_FAIL on failure due to invalid state.
*
*/
esp_err_t esp_ieee802154_transmit(const uint8_t *frame, bool cca);

ESP_Shu
Posts: 4
Joined: Fri Nov 19, 2021 6:36 am

Re: what is correct length value for esp_ieee802154_transmit?

Postby ESP_Shu » Mon Sep 23, 2024 9:16 am

It's the length of (MHR + MAC Payload + FCS).

Who is online

Users browsing this forum: No registered users and 7 guests