This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

IEEE 802.15.4 ACK Frame seems to get lost

I am developing an IEEE 802.15.4 Application on the nRF52840 using the Radio Driver (v1.8.0). I have a problem with the transmit call function. Very often in nrf_802154_transmitted_timestamp_raw(...) p_ack is NULL even when there was an ACK frame. So I check p_frame if the ACK request Bit was set and if it was I assume that we received an ACK, otherwise nrf_802154_transmit_failed(...) would have been called. The problem with this is, that I don't know if the pending bit was set in the ACK frame. In Wireshark I can see the ACK frames and that they are sent within 500us. Can you give me advice where the ACK frame could have ended and if I could access it anyways?
void nrf_802154_transmitted_timestamp_raw(const uint8_t *p_frame, uint8_t *p_ack, int8_t power, uint8_t lqi, uint32_t time) {
  if (p_ack != NULL) {
    /* ACK received, check if pending bit is set */
    ack = (p_ack[FRAME_PENDING_OFFSET] & FRAME_PENDING_BIT) ? IEEE802154_ACK_PENDING : IEEE802154_ACK_NO_PENDING;
    nrf_802154_buffer_free_raw(p_ack);
  } else {
    if ((p_frame[1] & 0x20) == 0x20) {
      /* the ACK frame seem to have been lost */
      ack = IEEE802154_ACK_NO_PENDING;
    } else {
      /* no ACK requested */
      ack = IEEE802154_ACK_NO;
    }
  }
}
Parents
  • Hello,

    I am not sure I understand your reasoning. (I have not tried to set it up like this on this level). Do you have any projects that you used to conclude with this? And how do you expect it to work? Also, do you have a sniffer trace of this? Do you see from the sniffer trace that the packets require ACKs? And does the sniffer trace contain any ACKs?

    Best regards,

    Edvin

  • I threw the debugger onto the problem and checked the NRF_RADIO register in both cases. The Registers differ in 4 values. When I receive an ACK frame:

    EVENTS_DEVMISS: 0x00000001
    EVENTS_CCASTOPPED: 0x00000000
    RXCRC: 0x000028b4
    RSSISAMPLE: 0x0000001c

    When the ACK is NULL the values are

    EVENTS_DEVMISS: 0x00000000
    EVENTS_CCASTOPPED: 0x00000001
    RXCRC: 0x000096f5
    RSSISAMPLE: 0x0000001b

    RXCRC and RSSISAMPLE need to be different, maybe the two events help finding the problem.

Reply
  • I threw the debugger onto the problem and checked the NRF_RADIO register in both cases. The Registers differ in 4 values. When I receive an ACK frame:

    EVENTS_DEVMISS: 0x00000001
    EVENTS_CCASTOPPED: 0x00000000
    RXCRC: 0x000028b4
    RSSISAMPLE: 0x0000001c

    When the ACK is NULL the values are

    EVENTS_DEVMISS: 0x00000000
    EVENTS_CCASTOPPED: 0x00000001
    RXCRC: 0x000096f5
    RSSISAMPLE: 0x0000001b

    RXCRC and RSSISAMPLE need to be different, maybe the two events help finding the problem.

Children
Related