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

nrf24l01+: ack payload length > 1 on PRX TX'ed => Same data as first byte RX'ed on PTX.

I have two NRF24L01+ modules - I am not sure if they are fake?

One node acts as PTX and another as PRX.

On both devices i have the features auto_ack and ack_payload enabled.

I can send data between PTX and PRX with no problem.

If i use the PRX ack payload with 1 byte i have no problem in receiving this on PTX. I change the value of the payload with CMD_W_ACK_PAYLOAD command.

if i have a ack payload length > 1 byte, lets say 10 bytes - and change the data with CMD_W_ACK_PAYLOAD on the PRX i get 10 bytes back on PTX.. but all bytes are identical to first byte...

Does this make sense?

Can i read the content of the ack payload on the PRX to verify my data?

Parents Reply Children
  • Thank you for your answer.

    Yes i've changed it from 10 bytes to 2. Just for simplicity. My code is working just fine with one ACK-payload-length. But with more than one ack-payload-length, the first ack payload is copied to the entire length.

    uint8_t nrf24_Read_RxPayload(uint8_t *pBuff, uint8_t Len)
    {
      if (Len > 32)
        Len = 32;
      return nrf24_read(nrf24_SPIx, NRF24_CMD_R_RX_PAYLOAD, pBuff, Len);
    }
    
    
    
    uint8_t nrf24_read(SPI_TypeDef* SPIx, uint8_t Cmd, uint8_t *pBuff, uint8_t Len)
    {
      NRF24_CSN_LOW();
    
    
      uint8_t State = SPI_SendRecvByte(SPIx, Cmd);
    
      SPI_recv8b(SPIx, pBuff, Len);
      
      NRF24_CSN_HIGH();
    
      return State;
    }
    

    General question: Is it possible to have more than one ACK-payload byte sent (as auto response) via. Enhanced ShockBurst?

  • Yes, it is possible to send more than one byte. You can have a look in the example I attached, there are 3 bytes sending as ACK payload.

  • @ApaX: could you try to look into the example I provided in the answer above(that should be used with the nRFGo SDK ) and follow what we have there ? Especially the hal_nrf_read_multibyte_reg() function. We actually do a read for hal_nrf_read_rx_payload_width() before we read the buffer.

    The nRF24LE1 and the nRF24L01P has the same radio

Related