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

Loosing radio packets

I have a setup with one transmitter and three receivers. The transmitter (nRF24L01+) sends a message to the receivers (nRF52832, using SDK v15.3.0) every 10 seconds. The receivers are in RX all the time, except when a packet has been received, it will be processed before it returns to RX again.

This is running without any issues for a random amount of time, then suddenly one, two or all of the receivers do not receive the message. If halting the code when the receiver has not received any message, sometimes it reports CRC error (looking inside nrf_esb.c), and sometimes not.

When a given received loses the packet appears to be totally random, so I suspected noise to be the issue, but I would assume that this would affect all three receivers the same ?

Any suggestions ?

Parents
  • For this to work you need to disable ack, else a combination of the following case may occur:

    2 receives the packet, 1 doesn't receive the packet due to noise or interference

    2 receivers ack the packet, 1 now receive the ack

    1 ack the ack, 2 now receive the ack

    2 ack the ack, 1 receive the ack

    ..

    This may end in an endless loop, can this be the case?

    For the nRF24L01+ make sure to check all irq sources for each transmission, since it is possible to receive RX_DR even for a transmitter. Also make sure to always read out the packet length if there is an RX_DR irq, and if the length exceed 32bytes you need to flush the rx fifo before next transmission or reception may occur.

    Best regards,
    Kenneth

  • On the nRF24 the EN_AA register is set to 0, disabling auto-ack on all pipes. On the nRF52, selective_autoack is set to true, and in the tx payload, the noack is also set to true, so ACK should be turned off right ?

  • Your configuration should avoid the problem I described yes.

    What CRC length do you have? Does the packet content from TX to RX change between each transmit?

    Best regards,
    Kenneth

  • I'm using esb, so the CRC is 16 bit isn't it ? esb stack handles this..

    The content changes slightly, a packet counter increments between each transmission.This is what I use to determine if all receives lost the same payload.

    Noise or signal interference could of course be the issue, but I would think this would cause all receivers to loose the payload,not just some of them.. So really at a loss why this is happening.. Been looking at the errata and cannot find anything here that would explain it. The errors surrounding the radio should already be handled by the SDK.

  • When you call nrf_esb_init() there is a parameter in nrf_esb_config_t that configure CRC length.

    Are you calling nrf_esb_read_rx_payload() until NRF_ERROR_NOT_FOUND?

    Best regards,
    Kenneth

  • Yes, the CRC is set to 16 bit, I used the NRF_ESB_DEFAULT_CONFIG so didn't see it at first glance..

    Currently I'm just caling nrf_esb_read_rx_payload() one for each NRF_ESB_EVENT_RX_RECEIVED event. Is it possible for esb to receive two payloads before issuing the event ?

Reply Children
Related