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

Detecting the difference between TX and ACK payloads.

I have two nrf24l01+ modules communicating on a single channel. The "remote" does 99% of the data transmission while the "base" receives and uploads to a host. Occasionally the base station transmits a short packet.

The remote is configured to auto retransmit with the max delay(15) and count(15) plus it will reuse the current TX buffer on MAX_RT. The base is configured with a delay at slightly more than half(9) and will flush the TX buffer on MAX_RT. No data is transmitted in the ACK payload.

A data message is about 70 bytes and typically requires three nrf variable length transmissions. The data message contains a sequence number. The data itself does not change very rapidly so multiple messages are alike. Everything is working great unless the base station does a transmit gets a MAX_RT interrupt.

At which time: One or more of the 3 remote buffers is lost. or The last TX payload appears to be retransmitted.

I read a posting about the TX payload being used as the ACK payload and I could envision this being the same bug. Is there any way for the receiving module to distinguish being transmitted via the TX payload vs the ACK payload?

I am considering adding a unique sequence number and command code to every packet and implementing a protocol where packets can be retransmitted upon demand. Something I hoped the nrf24l01+ would have handled in hardware.

Parents
  • Hi,

    If I understand correctly, your problem is: The message is segmented into 3 x payloads on-air. If segment #2 fails, and receives a MAX_RT, the FIFO is flushed, and the PRX has only received a partial message.

    Please correct me if my understanding is incorrect. Q: In this case, does the base-station transmit payload-with-ACK, or does it switch over to PTX mode?

    This sounds like it has to be handled in the application. If your PRX only receives a partial message, it should detect this as a lost message, and request the whole message to be re-sent.

    The payload itself includes a small counter (2 bit field in the "Packet Control Field" of ESB RF protocol setup), which is used for distinguishing between a re-transmit and a new payload.

    If you are using ACK-payload to transmit this, I would recommend doing a polling-scheme:

    • PRX receives a dummy-payload from PTX, wait ~200 us, then upload ACK-payload.
    • PTX then sends a new payload to receive the ACK-Payload from the PRX.

    Cheers, Håkon

Reply
  • Hi,

    If I understand correctly, your problem is: The message is segmented into 3 x payloads on-air. If segment #2 fails, and receives a MAX_RT, the FIFO is flushed, and the PRX has only received a partial message.

    Please correct me if my understanding is incorrect. Q: In this case, does the base-station transmit payload-with-ACK, or does it switch over to PTX mode?

    This sounds like it has to be handled in the application. If your PRX only receives a partial message, it should detect this as a lost message, and request the whole message to be re-sent.

    The payload itself includes a small counter (2 bit field in the "Packet Control Field" of ESB RF protocol setup), which is used for distinguishing between a re-transmit and a new payload.

    If you are using ACK-payload to transmit this, I would recommend doing a polling-scheme:

    • PRX receives a dummy-payload from PTX, wait ~200 us, then upload ACK-payload.
    • PTX then sends a new payload to receive the ACK-Payload from the PRX.

    Cheers, Håkon

Children
No Data
Related