Nrf24l01 receiving random data

The connection test sketch would have shown that.
It's buried around reply #18.

I used a slightly different variant

// (slightly changed) 18 Mar 2018 - simple program to verify connection between Arduino and nRF24L01+
//  This program does NOT attempt any communication with another nRF24

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <printf.h>

#define CE_PIN   9
#define CSN_PIN 10

const byte thisSlaveAddress[5] = {'R', 'x', 'A', 'A', 'A'};

RF24 radio(CE_PIN, CSN_PIN);

char dataReceived[10]; // this must match dataToSend in the TX
bool newData = false;

void setup() {
  Serial.begin(115200);
  printf_begin();

  Serial.println(F("CheckConnection Starting"));
  Serial.println();
  Serial.println(F("FIRST WITH THE DEFAULT ADDRESSES after power on"));
  Serial.println(F("  Note that RF24 does NOT reset when Arduino resets - only when power is removed"));
  Serial.println(F("  If the numbers are mostly 0x00 or 0xff it means that the Arduino is not"));
  Serial.println(F("     communicating with the nRF24"));
  Serial.println();
  radio.begin();
  radio.printPrettyDetails();
  Serial.println();
  Serial.println();
  Serial.println(F("AND NOW WITH ADDRESS AAAxR  0x41 41 41 78 52   ON P1"));
  Serial.println(F(" and 250KBPS data rate"));
  Serial.println();
  radio.openReadingPipe(1, thisSlaveAddress);
  radio.setDataRate( RF24_250KBPS );
  radio.printPrettyDetails();
  Serial.println();
  Serial.println();
}
void loop() {}

to generate the following output

CheckConnection Starting

FIRST WITH THE DEFAULT ADDRESSES after power on
  Note that RF24 does NOT reset when Arduino resets - only when power is removed
  If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
     communicating with the nRF24

SPI Frequency		= 10 Mhz
Channel			= 76 (~ 2476 MHz)
RF Data Rate		= 1 MBPS
RF Power Amplifier	= PA_MAX
RF Low Noise Amplifier	= Enabled
CRC Length		= 16 bits
Address Length		= 5 bytes
Static Payload Length	= 32 bytes
Auto Retry Delay	= 1500 microseconds
Auto Retry Attempts	= 15 maximum
Packets lost on
    current channel	= 0
Retry attempts made for
    last transmission	= 0
Multicast		= Disabled
Custom ACK Payload	= Disabled
Dynamic Payloads	= Disabled
Auto Acknowledgment	= Enabled
Primary Mode		= TX
TX address		= 0xe7e7e7e7e7
pipe 0 ( open ) bound	= 0xe7e7e7e7e7
pipe 1 ( open ) bound	= 0x4141417852
pipe 2 (closed) bound	= 0xc3
pipe 3 (closed) bound	= 0xc4
pipe 4 (closed) bound	= 0xc5
pipe 5 (closed) bound	= 0xc6


AND NOW WITH ADDRESS AAAxR  0x41 41 41 78 52   ON P1
 and 250KBPS data rate

SPI Frequency		= 10 Mhz
Channel			= 76 (~ 2476 MHz)
RF Data Rate		= 250 KBPS
RF Power Amplifier	= PA_MAX
RF Low Noise Amplifier	= Enabled
CRC Length		= 16 bits
Address Length		= 5 bytes
Static Payload Length	= 32 bytes
Auto Retry Delay	= 1500 microseconds
Auto Retry Attempts	= 15 maximum
Packets lost on
    current channel	= 0
Retry attempts made for
    last transmission	= 0
Multicast		= Disabled
Custom ACK Payload	= Disabled
Dynamic Payloads	= Disabled
Auto Acknowledgment	= Enabled
Primary Mode		= TX
TX address		= 0xe7e7e7e7e7
pipe 0 ( open ) bound	= 0xe7e7e7e7e7
pipe 1 ( open ) bound	= 0x4141417852
pipe 2 (closed) bound	= 0xc3
pipe 3 (closed) bound	= 0xc4
pipe 4 (closed) bound	= 0xc5
pipe 5 (closed) bound	= 0xc6

The layout is better in the serial monitor.

1 Like

Sorry for being inactive. Anyways, I ran the code and this is what i got:

15:17:32.693 -> FIRST WITH THE DEFAULT ADDRESSES after power on
15:17:32.739 -> Note that RF24 does NOT reset when Arduino resets - only when power is removed
15:17:32.739 -> If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
15:17:32.739 -> communicating with the nRF24
15:17:32.739 ->
15:17:32.739 -> SPI Frequency = 10 Mhz
15:17:32.739 -> Channel = 0 (~ 2400 MHz)
15:17:32.739 -> RF Data Rate = 1 MBPS
15:17:32.739 -> RF Power Amplifier = PA_MIN
15:17:32.739 -> RF Low Noise Amplifier = Disabled
15:17:32.739 -> CRC Length = Disabled
15:17:32.739 -> Address Length = 2 bytes
15:17:32.739 -> Static Payload Length = 32 bytes
15:17:32.785 -> Auto Retry Delay = 250 microseconds
15:17:32.785 -> Auto Retry Attempts = 0 maximum
15:17:32.785 -> Packets lost on
15:17:32.785 -> current channel = 0
15:17:32.785 -> Retry attempts made for
15:17:32.785 -> last transmission = 0
15:17:32.785 -> Multicast = Disabled
15:17:32.785 -> Custom ACK Payload = Disabled
15:17:32.785 -> Dynamic Payloads = Disabled
15:17:32.785 -> Auto Acknowledgment = Disabled
15:17:32.785 -> Primary Mode = TX
15:17:32.785 -> TX address = 0x0000000000
15:17:32.785 -> pipe 0 (closed) bound = 0x0000000000
15:17:32.785 -> pipe 1 (closed) bound = 0x0000000000
15:17:32.785 -> pipe 2 (closed) bound = 0x00
15:17:32.785 -> pipe 3 (closed) bound = 0x00
15:17:32.785 -> pipe 4 (closed) bound = 0x00
15:17:32.785 -> pipe 5 (closed) bound = 0x00
15:17:32.785 ->
15:17:32.785 ->
15:17:32.785 -> AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1
15:17:32.832 -> and 250KBPS data rate
15:17:32.832 ->
15:17:32.832 -> SPI Frequency = 10 Mhz
15:17:32.832 -> Channel = 0 (~ 2400 MHz)
15:17:32.832 -> RF Data Rate = 1 MBPS
15:17:32.832 -> RF Power Amplifier = PA_MIN
15:17:32.832 -> RF Low Noise Amplifier = Disabled
15:17:32.832 -> CRC Length = Disabled
15:17:32.832 -> Address Length = 2 bytes
15:17:32.832 -> Static Payload Length = 32 bytes
15:17:32.832 -> Auto Retry Delay = 250 microseconds
15:17:32.832 -> Auto Retry Attempts = 0 maximum
15:17:32.832 -> Packets lost on
15:17:32.832 -> current channel = 0
15:17:32.832 -> Retry attempts made for
15:17:32.832 -> last transmission = 0
15:17:32.832 -> Multicast = Disabled
15:17:32.832 -> Custom ACK Payload = Disabled
15:17:32.832 -> Dynamic Payloads = Disabled
15:17:32.832 -> Auto Acknowledgment = Disabled
15:17:32.832 -> Primary Mode = TX
15:17:32.879 -> TX address = 0x0000000000
15:17:32.879 -> pipe 0 (closed) bound = 0x0000000000
15:17:32.879 -> pipe 1 (closed) bound = 0x0000000000
15:17:32.879 -> pipe 2 (closed) bound = 0x00
15:17:32.879 -> pipe 3 (closed) bound = 0x00
15:17:32.879 -> pipe 4 (closed) bound = 0x00
15:17:32.879 -> pipe 5 (closed) bound = 0x00
15:17:32.879 ->
15:17:32.879 ->

Acording to the text all the way up, i suppose the connection or the module is not good.

Yes, one or both are faulty.

The second one looks just fine

15:22:45.343 -> CheckConnection Starting
15:22:45.343 ->
15:22:45.343 -> FIRST WITH THE DEFAULT ADDRESSES after power on
15:22:45.343 -> Note that RF24 does NOT reset when Arduino resets - only when power is removed
15:22:45.343 -> If the numbers are mostly 0x00 or 0xff it means that the Arduino is not
15:22:45.390 -> communicating with the nRF24
15:22:45.390 ->
15:22:45.390 -> SPI Frequency = 10 Mhz
15:22:45.390 -> Channel = 76 (~ 2476 MHz)
15:22:45.390 -> RF Data Rate = 1 MBPS
15:22:45.390 -> RF Power Amplifier = PA_MAX
15:22:45.390 -> RF Low Noise Amplifier = Enabled
15:22:45.390 -> CRC Length = 16 bits
15:22:45.390 -> Address Length = 5 bytes
15:22:45.390 -> Static Payload Length = 32 bytes
15:22:45.390 -> Auto Retry Delay = 1500 microseconds
15:22:45.390 -> Auto Retry Attempts = 15 maximum
15:22:45.390 -> Packets lost on
15:22:45.390 -> current channel = 0
15:22:45.390 -> Retry attempts made for
15:22:45.390 -> last transmission = 5
15:22:45.390 -> Multicast = Disabled
15:22:45.390 -> Custom ACK Payload = Disabled
15:22:45.437 -> Dynamic Payloads = Disabled
15:22:45.437 -> Auto Acknowledgment = Enabled
15:22:45.437 -> Primary Mode = TX
15:22:45.437 -> TX address = 0x4141417852
15:22:45.437 -> pipe 0 ( open ) bound = 0x4141417852
15:22:45.437 -> pipe 1 ( open ) bound = 0x4141417852
15:22:45.437 -> pipe 2 (closed) bound = 0xc3
15:22:45.437 -> pipe 3 (closed) bound = 0xc4
15:22:45.437 -> pipe 4 (closed) bound = 0xc5
15:22:45.437 -> pipe 5 (closed) bound = 0xc6
15:22:45.437 ->
15:22:45.437 ->
15:22:45.437 -> AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1
15:22:45.437 -> and 250KBPS data rate
15:22:45.437 ->
15:22:45.437 -> SPI Frequency = 10 Mhz
15:22:45.437 -> Channel = 76 (~ 2476 MHz)
15:22:45.437 -> RF Data Rate = 250 KBPS
15:22:45.437 -> RF Power Amplifier = PA_MAX
15:22:45.437 -> RF Low Noise Amplifier = Enabled
15:22:45.484 -> CRC Length = 16 bits
15:22:45.484 -> Address Length = 5 bytes
15:22:45.484 -> Static Payload Length = 32 bytes
15:22:45.484 -> Auto Retry Delay = 1500 microseconds
15:22:45.484 -> Auto Retry Attempts = 15 maximum
15:22:45.484 -> Packets lost on
15:22:45.484 -> current channel = 0
15:22:45.484 -> Retry attempts made for
15:22:45.484 -> last transmission = 5
15:22:45.484 -> Multicast = Disabled
15:22:45.484 -> Custom ACK Payload = Disabled
15:22:45.484 -> Dynamic Payloads = Disabled
15:22:45.484 -> Auto Acknowledgment = Enabled
15:22:45.484 -> Primary Mode = TX
15:22:45.484 -> TX address = 0x4141417852
15:22:45.484 -> pipe 0 ( open ) bound = 0x4141417852
15:22:45.484 -> pipe 1 ( open ) bound = 0x4141417852
15:22:45.484 -> pipe 2 (closed) bound = 0xc3
15:22:45.484 -> pipe 3 (closed) bound = 0xc4
15:22:45.531 -> pipe 4 (closed) bound = 0xc5
15:22:45.531 -> pipe 5 (closed) bound = 0xc6
15:22:45.531 ->
15:22:45.531 ->

is it?

That looks normal.

Why don't you put the chunks of data into code tags as requested?

What code tags?

It is not readable

Ok so I will replace the non working one and let you know how it went.

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