# Nrf24l01 not working

**URL:** <https://forum.arduino.cc/t/nrf24l01-not-working/472409>\
**Category:** Networking, Protocols, and Devices\
**Created:** [July 27, 2017, 3:38pm UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409 "2017-07-27T15:38:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![huron129](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@huron129](https://forum.arduino.cc/u/huron129)\
**Post date:** [July 27, 2017, 3:38pm UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/1 "2017-07-27T15:38:01Z")

</div>

I am beginner in arduino programming. I am working with nrf24l01 but the problem i am facing is that it is not working at all with uno and nano.  
I have tried many examples available online but still the transmission between the two arduino is not happening. I have even soldered a 10uf capacitor to the modules and tried using different power source for nrf24l01.(tried these-base module,3.3v power source and a 5v 1A power source connected to base module). I am still not getting desired results please help.  
Here is the code i am currently using for recieving

```cpp
#include <SPI.h> 
#include <RF24.h
 #define CE 7
#define CSN 8
 const uint64_t ad= 0xE8E8F0F0E1LL; 
 RF24 radio(CE, CSN);
 void setup() 
{
 pinMode(8, OUTPUT); 
PinMode(7, OUTPUT);
 Serial.begin(115200); 
radio.begin(); 
radio.setChannel(108); 
radio.setDataRate( RF24_250KBPS );
 radio.setPALevel(RF24_PA_MIN);
 radio.openReadingPipe(1, ad); 
radio.startListening();
 } 
 void loop() 
{
  if(radio.available())
 {
 Unsigned long a=0; 
radio.read(&a,sizeof(a)); 
 Serial.println(a); 
delay(500);
}

```

And this code for transmitter

```cpp
#include <SPI.h> 
#include <RF24.h>
 #define CE 7
#define CSN 8
 const uint64_t ad= 0xE8E8F0F0E1LL; 
 RF24 radio(CE, CSN);
 void setup() 
{
 pinMode(8, OUTPUT); 
PinMode(7, OUTPUT);
 Serial.begin(115200); 
radio.begin(); 
radio.setChannel(108); 
radio.setDataRate( RF24_250KBPS );
 radio.setPALevel(RF24_PA_MIN);
 radio.openReadingPipe(ad); 
 } 
 void loop() 
{
 int a=100; 
radio.write(&a,sizeof(a));
delay(500);
}

```

Please help me with if there is something wrong with my code and if i need to add more to it.

---

<div class="post-metadata">

**Author:** ![monkeyisland](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@monkeyisland](https://forum.arduino.cc/u/monkeyisland)\
**Post date:** [July 27, 2017, 4:12pm UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/2 "2017-07-27T16:12:55Z")

</div>

Does any of the modules get hot.  
They are quite sensitive, without a reason my transmitter one stopped working,it had an internal short. If you check continuity between VCC and GND with a multimeter should not bleep.  
They're meant to work with 3.3v

---

<div class="post-metadata">

**Author:** ![huron129](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@huron129](https://forum.arduino.cc/u/huron129)\
**Post date:** [July 27, 2017, 4:56pm UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/3 "2017-07-27T16:56:24Z")

</div>

No they do not get hot.  
I am currently using a base module to power those nrf24l01.  
I am powering a 5v 500mA-1000mA to power the base modules.  
But still they are not working.  
I have 6-7 nrf modules but non seems to be working.

---

<div class="post-metadata">

**Author:** ![Robin2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/robin2/32/216045_2.png) [@Robin2](https://forum.arduino.cc/u/Robin2)\
**Post date:** [July 27, 2017, 6:33pm UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/4 "2017-07-27T18:33:15Z")

</div>

Have a look at this [Simple nRF24L01+ Tutorial](http://forum.arduino.cc/index.php?topic=421081)

...R

---

<div class="post-metadata">

**Author:** ![zakizakaria](https://avatars.discourse-cdn.com/v4/letter/z/838e76/32.png) [@zakizakaria](https://forum.arduino.cc/u/zakizakaria)\
**Post date:** [July 28, 2017, 12:39am UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/5 "2017-07-28T00:39:25Z")

</div>

> huron129:  
> I am beginner in arduino programming. I am working with nrf24l01 but the problem i am facing is that it is not working at all with uno and nano.  
> I have tried many examples available online but still the transmission between the two arduino is not happening. I have even soldered a 10uf capacitor to the modules and tried using different power source for nrf24l01.(tried these-base module,3.3v power source and a 5v 1A power source connected to base module). I am still not getting desired results please help.  
> Here is the code i am currently using for recieving
> 
> ```arduino
> #include <SPI.h> 
> 
> ```

#include \<RF24.h  
#define CE 7  
#define CSN 8  
const uint64\_t ad= 0xE8E8F0F0E1LL;  
RF24 radio(CE, CSN);  
void setup()  
{  
pinMode(8, OUTPUT);  
PinMode(7, OUTPUT);  
Serial.begin(115200);  
radio.begin();  
radio.setChannel(108);  
radio.setDataRate( RF24\_250KBPS );  
radio.setPALevel(RF24\_PA\_MIN);  
radio.openReadingPipe(1, ad);  
radio.startListening();  
}  
void loop()  
{  
&nbsp;if(radio.available())  
{  
Unsigned long a=0;  
radio.read(&a,sizeof(a));  
Serial.println(a);  
delay(500);  
}

> ```arduino
> 
> And this code for transmitter
> 
> ```
> 
> #include \<SPI.h\>  
> #include \<RF24.h\>  
> #define CE 7  
> #define CSN 8  
> const uint64\_t ad= 0xE8E8F0F0E1LL;  
> RF24 radio(CE, CSN);  
> void setup()  
> {  
> pinMode(8, OUTPUT);  
> PinMode(7, OUTPUT);  
> Serial.begin(115200);  
> radio.begin();  
> radio.setChannel(108);  
> radio.setDataRate( RF24\_250KBPS );  
> radio.setPALevel(RF24\_PA\_MIN);  
> radio.openReadingPipe(ad);  
> }  
> void loop()  
> {  
> int a=100;  
> radio.write(&a,sizeof(a));  
> delay(500);  
> }
> 
> ```arduino
> 
> Please help me with if there is something wrong with my code and if i need to add more to it.
> 
> ```

hi huron, check on this. super simple codes and library to communicate two arduino using nrf24l01.  
you can find download link for the library on the comment.

> **[Arduino DIY Transmitter & Receiver For Quadcopter/Drone/UAV (AT9)](http://ohhmyproject.blogspot.com/2017/06/arduino-diy-transmitter-receiver-for.html)**
>
> Arduino, Robotics, Electronics, Programming, Software, Communication

[![](https://europe1.discourse-cdn.com/arduino/original/4X/3/d/1/3d1f35d88cf465a87d04ec1c015272c8f12f8f19.jpeg "Arduino DIY Transmitter & Receiver For Quadcopter/Drone/UAV") ](https://www.youtube.com/watch?v=0YmnVZ0q0Q4&t=29s)

modify this code 🙂  
here simple codes for tx:

```arduino
#include <SPI.h>
#include <nRF24L01p.h>

nRF24L01p transmitter(7,8);//CSN,CE

void setup(){
  delay(150);
  Serial.begin(115200);
  SPI.begin();
  SPI.setBitOrder(MSBFIRST);
  transmitter.channel(90);
  transmitter.TXaddress("Artur");
  transmitter.init();
}

String message;

void loop(){
  if(Serial.available()>0){
    char character=Serial.read();
    if(character=='\n'){
      transmitter.txPL(message);
      transmitter.send(SLOW);
      message="";
    }else{
      message+=character;
    }
  }
}

```

here for rx:

```arduino
#include <SPI.h>
#include <nRF24L01p.h>

nRF24L01p receiver(7,8);//CSN,CE

void setup(){
  delay(150);
  Serial.begin(115200);
  SPI.begin();
  SPI.setBitOrder(MSBFIRST);
  receiver.channel(90);
  receiver.RXaddress("Artur");
  receiver.init();
}

String message;

void loop(){ 
  if(receiver.available()){
    receiver.read();
    receiver.rxPL(message);
    Serial.println(message);
    message="";
  }
}

```

---

<div class="post-metadata">

**Author:** ![Whandall](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/whandall/32/222457_2.png) [@Whandall](https://forum.arduino.cc/u/Whandall)\
**Post date:** [July 28, 2017, 5:55am UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/6 "2017-07-28T05:55:02Z")

</div>

@zakizakaria: Without posting your really strange library, the posted "solution" is misleading and will not compile.

---

<div class="post-metadata">

**Author:** ![silly\_cone](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@silly\_cone](https://forum.arduino.cc/u/silly_cone)\
**Post date:** [July 28, 2017, 3:32pm UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/7 "2017-07-28T15:32:33Z")

</div>

Here is some super stripped-down code that will let you test that your NRF is (1) functional, and (2) hooked up correctly. It doesn't send any data packets or anything, and is just diagnostic to see if your radio and arduino can communicate. A lot of times, half the battle is just getting the wired connections correct and reliable.

Be sure you're using the libraries specified in the code, and set your CE/CSN pins to what you're using in your setup. Run this, and post the serial output.

```cpp
#include <SPI.h> 
#include <nRF24L01.h>  //nRF2401 libarary found at https://github.com/tmrh20/RF24/
#include <RF24.h>          //nRF2401 libarary found at https://github.com/tmrh20/RF24/
#include "printf.h" 

const int pinCE = A0; 
const int pinCSN = 10;

RF24 wirelessSPI(pinCE, pinCSN);
 
const uint64_t pAddress = 0xB00B1E5000LL;            

void setup()  
{
  Serial.begin(9600);   
  printf_begin();       
  wirelessSPI.begin();          
  wirelessSPI.setAutoAck(1);          
  wirelessSPI.enableAckPayload();             
  wirelessSPI.setRetries(5,15);                 
  wirelessSPI.openWritingPipe(pAddress);        
  wirelessSPI.stopListening();
  wirelessSPI.printDetails();                  

}

void loop()  
{  
  
 
}

```

---

<div class="post-metadata">

**Author:** ![mej7000](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@mej7000](https://forum.arduino.cc/u/mej7000)\
**Post date:** [May 25, 2020, 3:51am UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/8 "2020-05-25T03:51:07Z")

</div>

This is what I was looking for. Something to diagnose the module to confirm it's actually functional. When I run this I get the following output... I've

- confirmed the connections
- tried multiple nRF24 modules - brand new
- I get the same output with no modules attached
- tried 2 different Nano's - "ATmega328P (old Bootloader)"
- Tried on-board and external 3.3v.
- If I remove the board entirely I get the same output in the Serial Monitor

STATUS = 0xff RX\_DR=1 TX\_DS=1 MAX\_RT=1 RX\_P\_NO=7 TX\_FULL=1  
RX\_ADDR\_P0-1 = 0xffffffff7f 0xffffffffff  
RX\_ADDR\_P2-5 = 0xff 0xff 0x7f 0xff  
TX\_ADDR = 0xffffffffff  
RX\_PW\_P0-6 = 0xff 0xff 0xff 0x7f 0xff 0xff  
EN\_AA = 0xff  
EN\_RXADDR = 0x7f  
RF\_CH = 0xff  
RF\_SETUP = 0x7f  
CONFIG = 0xff  
DYNPD/FEATURE = 0xff 0xff  
Data Rate = 1MBPS  
Model = nRF24L01  
CRC Length = 16 bits  
PA Power = PA\_MAX

Does anyone have any advice on how to proceed? :o

//Diagnostic Code

#include \<SPI.h\>  
#include \<nRF24L01.h\> //nRF2401 libarary found at [GitHub - nRF24/RF24: OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices](https://github.com/tmrh20/RF24/)  
#include \<RF24.h\> //nRF2401 libarary found at [GitHub - nRF24/RF24: OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices](https://github.com/tmrh20/RF24/)  
#include "printf.h"

const int pinCE = A0;  
const int pinCSN = 10;

RF24 wirelessSPI(pinCE, pinCSN);

const uint64\_t pAddress = 0xB00B1E5000LL;

void setup()  
{  
Serial.begin(9600);  
printf\_begin();  
wirelessSPI.begin();  
wirelessSPI.setAutoAck(1);  
wirelessSPI.enableAckPayload();  
wirelessSPI.setRetries(5,15);  
wirelessSPI.openWritingPipe(pAddress);  
wirelessSPI.stopListening();  
wirelessSPI.printDetails();

}

void loop()  
{

}

---

<div class="post-metadata">

**Author:** ![Robin2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/robin2/32/216045_2.png) [@Robin2](https://forum.arduino.cc/u/Robin2)\
**Post date:** [May 25, 2020, 8:05am UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/9 "2020-05-25T08:05:51Z")

</div>

Have a look at this [Simple nRF24L01+ Tutorial](http://forum.arduino.cc/index.php?topic=421081).

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.

A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. The high-power nRF24s (with the external antenna) will definitely need an external power supply. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.

...R

---

<div class="post-metadata">

**Author:** ![Whandall](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/whandall/32/222457_2.png) [@Whandall](https://forum.arduino.cc/u/Whandall)\
**Post date:** [May 26, 2020, 12:03am UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/10 "2020-05-26T00:03:50Z")

</div>

> Does anyone have any advice on how to proceed?

The diagnostic output points to bad connection/bad module.  
Most of the times it's bad wiring or flaky connections.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 11:06am UTC](https://forum.arduino.cc/t/nrf24l01-not-working/472409/11 "2021-05-06T11:06:57Z")

</div>

Closed on May 6, 2021, 11:06am UTC


