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

Changing ESB pipe number dynamically

I want to change the pipe linking the PTX and PRX dynamically. The command to do this is sent from the PRX in the data payload of an ACK.

I can successfully change the PTX->PRX pipe by doing this in the PTX:

    tx_payload.pipe = NewPipe;
    rx_payload.pipe = NewPipe;

The data payloads from the PTX now go through the new pipe, and the PRX receives them, and correctly identifies the sender by the new pipe.

But then when I try to send a another "Change Pipe" command in the ACK on the new pipe, the PTX doesn't seem to see it.

What else do I need to do to get the ACK coming back to the PTX on the new pipe?

I am using the nRF52840 DK as the PTX, and the nRF52840 Dongle as the PRX.

Parents
  • Hi Damon

    The ACK payload implementation in the nrf_esb library is a bit restricted if you are using multiple pipes. 

    Could you try to flush the TX fifo before you upload the ACK payload to the new pipe?

    The ACK payload feature should work fine if you only have packets on the same pipe in the buffer, but won't work well if you have multiple packets for different pipes loaded. 

    Best regards
    Torbjørn

Reply
  • Hi Damon

    The ACK payload implementation in the nrf_esb library is a bit restricted if you are using multiple pipes. 

    Could you try to flush the TX fifo before you upload the ACK payload to the new pipe?

    The ACK payload feature should work fine if you only have packets on the same pipe in the buffer, but won't work well if you have multiple packets for different pipes loaded. 

    Best regards
    Torbjørn

Children
Related