Some questions about esb tx/rx packet transaction

Hi all,

In nRF5 SDK User Guide, this link.

I want to know what this sentence means.

An Enhanced ShockBurst packet transaction is initiated by a packet transmission from the PTX and successfully completed when the PTX has received an acknowledgment packet (ACK packet) from the PRX.

To enable a bidirectional data link, the PRX is allowed to attach a data payload to the ACK packet. To do so, the PRX adds a packet to its TX FIFO, which is sent as the payload in the next ACK packet.

If I want to send something over RX, I must attach a data payload to the ACK packet. So I have to use the nrf_esb_write_payload(&tx_payload); to add the packet to TX FIFO, and must do this in the event handler function.

Do I understand correctly?

And I did find that RX cannot send packets directly.

Best regards,

Lurn

Parents
  • Hello,

    The easiest may be to also look at prx example in the nRF5 SDK:
    \nRF5_SDK_17.1.0_ddde560\examples\proprietary_rf\esb_low_power_prx\

    There you can find that the prx for instance is calling nrf_esb_write_payload() to send data from the prx to the ptx, this data will be attached in reverse direction on the next packet is received from the ptx. You are right that the prx can only attach packets to a packet that is first initiated by the ptx, so if the ptx expects data from the prx, then the ptx should send a packet periodically to fetch this data.

    Kenneth

Reply
  • Hello,

    The easiest may be to also look at prx example in the nRF5 SDK:
    \nRF5_SDK_17.1.0_ddde560\examples\proprietary_rf\esb_low_power_prx\

    There you can find that the prx for instance is calling nrf_esb_write_payload() to send data from the prx to the ptx, this data will be attached in reverse direction on the next packet is received from the ptx. You are right that the prx can only attach packets to a packet that is first initiated by the ptx, so if the ptx expects data from the prx, then the ptx should send a packet periodically to fetch this data.

    Kenneth

Children
Related