nRF24L01+ Transmission failed or timed out

I am trying to use a nRF24L01+ with adapter (to hook up with 5VDC) on a nano but I cant get it to work. I have searched extensively but it seems noone has this problem. Using the GettingStarted code from the RF24 github with everything hooked up returns "Transmission failed or timed out".

The details I am getting are:

04:34:04.177 -> SPI Speedz	= 10 Mhz
04:34:04.177 -> STATUS		= 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
04:34:04.223 -> RX_ADDR_P0-1	= 0x65646f4e31 0x65646f4e32
04:34:04.223 -> RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6
04:34:04.223 -> TX_ADDR		= 0x65646f4e31
04:34:04.223 -> RX_PW_P0-6	= 0x04 0x04 0x04 0x04 0x04 0x04
04:34:04.223 -> EN_AA		= 0x3f
04:34:04.223 -> EN_RXADDR	= 0x02
04:34:04.223 -> RF_CH		= 0x4c
04:34:04.223 -> RF_SETUP	= 0x03
04:34:04.223 -> CONFIG		= 0x0f
04:34:04.223 -> DYNPD/FEATURE	= 0x00 0x00
04:34:04.223 -> Data Rate	= 1 MBPS
04:34:04.223 -> Model		= nRF24L01+
04:34:04.223 -> CRC Length	= 16 bits
04:34:04.223 -> PA Power	= PA_LOW
04:34:04.223 -> ARC		= 0

...

04:39:37.193 -> Transmission failed or timed out
04:39:38.198 -> Transmission failed or timed out
04:39:39.218 -> Transmission failed or timed out

I have tried not using the adapter ( and powering with 3.3V, of course), but I get the exact same result. I have used two different nanos and two nRF24L01+. Since I bought both transcievers at the same place, it is possible to be hardware failure, though I highly doubt it. From searching other troubleshooting topics, I think "RX_PW_P0" might explain my problem but I studied the source code and couldnt understand what it meant. Thanks

You are using two Arduinos for that test, aren't you?

Hi, @matheusab
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

Can you post a picture of your project please?
Can you post a circuit diagram?

How close have you got the NRFs apart?
Does that model come with an external aerial?

Thanks... Tom.. :smiley: :+1: :coffee: :australia:

No, I'm firstly only trying to get one of them to transmit

I will provide a picture below. However, the entire circuit is just:
CE-7
CSN-8
SCK-13
MOSI-11
MISO-12
VCC-5V (as I am using the adapter)
GND-GND

I am still trying to get one NRF to transmit, have not set up both yet.
It does come with an external antenna.

Powering the adapter with 12VDC (within allowed voltage) separately also does not help, so I dont think the problem is that it isnt drawing enough current.

Thanks! :brazil:

So your TX-nodes work perfectly, but are not able to get the acknowledgement.

How do you know it is working and not getting the acknowledgement? Couldnt it just not be transmitting?

How do you think a transmission with acknowlegdement can succeed with only the sender?
I'm quite sure that your transmitter is transmitting, probably a couple of times for each try.
But nobody answers the call.
Your conclusion is: "the transmitter does not work".

It's like testing Walkie-talkies with only one device.

Build up a receiver and then begin testing.

The breadboard connections don't work reliably, they are only good for really basic tests.

Indeed, the acknowledgement, which is transmitted by the non-existent receiver, fails to get back to the transmitter.

I understand what you say, but isnt the acknowledgement about the data being sent? This is the GettingStarted code:

bool report = radio.write(&payload, sizeof(float));      // transmit & save the report
    unsigned long end_timer = micros();                      // end the timer

    if (report) {
      Serial.print(F("Transmission successful! "));          // payload was delivered
      Serial.print(F("Time to transmit = "));
      Serial.print(end_timer - start_timer);                 // print the timer result
      Serial.print(F(" us. Sent: "));
      Serial.println(payload);                               // print payload sent
      payload += 0.01;                                       // increment float payload
    } else {
      Serial.println(F("Transmission failed or timed out")); // payload was not delivered
    }

And this is the RF24.cpp write function:

bool RF24::write(const void* buf, uint8_t len, const bool multicast)
{
    //Start Writing
    startFastWrite(buf, len, multicast);

    //Wait until complete or failed
    #if defined(FAILURE_HANDLING) || defined(RF24_LINUX)
    uint32_t timer = millis();
    #endif // defined(FAILURE_HANDLING) || defined(RF24_LINUX)

    while (!(get_status() & (_BV(TX_DS) | _BV(MAX_RT)))) {
        #if defined(FAILURE_HANDLING) || defined(RF24_LINUX)
        if (millis() - timer > 95) {
            errNotify();
            #if defined(FAILURE_HANDLING)
            return 0;
            #else
            delay(100);
            #endif
        }
        #endif
    }

    ce(LOW);

    write_register(NRF_STATUS, _BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT));

    //Max retries exceeded
    if (status & _BV(MAX_RT)) {
        flush_tx(); // Only going to be 1 packet in the FIFO at a time using this method, so just flush
        return 0;
    }
    //TX OK 1 or 0
    return 1;
}

bool RF24::write(const void* buf, uint8_t len)
{
    return write(buf, len, 0);
}

I have now added a reciever on another computer, TX details:

19:05:58.984 -> SPI Speedz	= 10 Mhz
19:05:58.984 -> STATUS		= 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
19:05:58.984 -> RX_ADDR_P0-1	= 0x65646f4e31 0x65646f4e32
19:05:58.984 -> RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6
19:05:59.031 -> TX_ADDR		= 0x65646f4e31
19:05:59.031 -> RX_PW_P0-6	= 0x04 0x04 0x04 0x04 0x04 0x04
19:05:59.031 -> EN_AA		= 0x3f
19:05:59.031 -> EN_RXADDR	= 0x03
19:05:59.031 -> RF_CH		= 0x4c
19:05:59.031 -> RF_SETUP	= 0x03
19:05:59.031 -> CONFIG		= 0x0e
19:05:59.031 -> DYNPD/FEATURE	= 0x00 0x00
19:05:59.031 -> Data Rate	= 1 MBPS
19:05:59.031 -> Model		= nRF24L01+
19:05:59.031 -> CRC Length	= 16 bits
19:05:59.031 -> PA Power	= PA_LOW
19:05:59.031 -> ARC		= 0
19:05:59.077 -> Transmission failed or timed out

RX details:

19:03:38.137 -> SPI Speedz	= 10 Mhz
19:03:38.169 -> STATUS		= 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
19:03:38.169 -> RX_ADDR_P0-1	= 0x65646f4e31 0x65646f4e32
19:03:38.169 -> RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6
19:03:38.169 -> TX_ADDR		= 0x65646f4e31
19:03:38.169 -> RX_PW_P0-6	= 0x04 0x04 0x04 0x04 0x04 0x04
19:03:38.169 -> EN_AA		= 0x3f
19:03:38.169 -> EN_RXADDR	= 0x02
19:03:38.169 -> RF_CH		= 0x4c
19:03:38.169 -> RF_SETUP	= 0x03
19:03:38.169 -> CONFIG		= 0x0f
19:03:38.169 -> DYNPD/FEATURE	= 0x00 0x00
19:03:38.169 -> Data Rate	= 1 MBPS
19:03:38.169 -> Model		= nRF24L01+
19:03:38.169 -> CRC Length	= 16 bits
19:03:38.228 -> PA Power	= PA_LOW
19:03:38.228 -> ARC		= 0

This is what Nordic Semiconductors call their Schockburst technology. It is a layer below the library functions.

The transmission is considered valid if it get to the the receiver, the receiver checks it using a cyclic redundancy code test, requests retransmissions if necessary, and sends an acknowledgement back to the transmitter.

Do you still get the bad return code on the transmitter now that you have installed a receiver ?

Wow, did not know there was more after CRC. Thanks

Yes. Nothing appears on the reciever end, and the transmitter is still returning "Transmission failed or timed out"

Well, really you don't even have to know it. It should all happen in the background.
Generally, with these transceivers, if the configuration is correct, the problems are related to insufficient power. Especially so with the modules in the picture which include, in addition to the basic NRF24L01 chip, a power amplifier stage and antenna.
Breadboards, as has been pointed out, are rather poor for these things.

Noted, will try to connect them directly and use a 12VDC power supply for the modules. I hope it works :((

Ok, update time. I ruled out possible power issues and poor connections. However, I managed to get it working by not requiring an acknowledgement to move on. This is really bad since I might lose information in the process, but necessary. For some reason the handshake does not happen. Thanks for pointing out that the transmitter was working well and for all the info provided.

If any of you from the future are having the same problem, try the code on this topic: Probleme mit nRF24 Funkmodul . I ignored it initially since it is in german, but a simple google translate worked well enough. Please let me know if someone figures out why this problem might happen.

1 Like

What does that mean?

Can you run the transmitter alone without giving error messages?
Can you transmit data between two nodes?
Does it work in both directions?
Can you send data in both directions in one sketch?

Some NRF24L01 clones/fakes are know to have problems with "ack"

1 Like

Yes, the radio.write works normally.

Yes, I can read what the other node is writing. This means I can bypass completely the ACK and do it manually, but I dont think it will be necessary for my project.

Yes, I have tested both ways and it works fine.

Have not tested this yet, but I'm pretty sure it would work, since it works in both directions.

So then there should be no reason to disable Acknowledgements.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.