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

Dynamic switching of prefixes not working with ESB

I am using the '840 to construct a small network using the ESB stack.  In this design, a master (dongle) transmits to each slave and receives an ACK w/payload response.  The ACK payload contains all data coming from the slave (<100 bytes).  The master operates in PTX mode while the slaves are always in PRX mode.  This design uses 8 1 MS time-slots in a 120 Hz frame.  Each slave is configured with a different prefix before operation to provide for individual addressing. The master pings each slave using the assigned prefix over pipe 0, dynamically changing the prefix for each slave as it proceeds.  This design works with a single slave (no prefix changes) but stops working when prefix swapping is enabled.  I get a NRF_ESB_EVENT_TX_SUCCESS event on the master each time it sends the data query but the slave never responds (the ESB event handler never sees a NRF_ESB_EVENT_RX_RECEIVED).  Are there any constraints to when/how the prefix is changed in the '840 radio that might explain this behavior?

Parents
  • Hi,

    I am not quite sure, but make sure that the payload changes (e.g. add a counter in the payloads) this to ensure that the packet is not treated as a retransmit by the PRX (in which case it will ack to the PTX, but not inform the application on the PRX (since it is considered an retransmit)).

    Have you tried to disable, reconfigure prefix and enable again, to see if that make any difference?

    Best regards,
    Kenneth

  • I have verified that the master is hung after switching back to PTX from PRX.  In this state there is no NRF_ESB_EVENT_SUCCESS" in ESB event handler despite nrf_esb_write_payload() returning a "SUCCESS" exit code.  When there is no mode swapping I get the NRF_ESB_EVENT_SUCCESS" in the event handler after writing a payload.  I suspect it is waiting for an ACK even though I have SELECTIVE_ACK true and payload NO_ACK true.

Reply
  • I have verified that the master is hung after switching back to PTX from PRX.  In this state there is no NRF_ESB_EVENT_SUCCESS" in ESB event handler despite nrf_esb_write_payload() returning a "SUCCESS" exit code.  When there is no mode swapping I get the NRF_ESB_EVENT_SUCCESS" in the event handler after writing a payload.  I suspect it is waiting for an ACK even though I have SELECTIVE_ACK true and payload NO_ACK true.

Children
Related