Notifications
Clear all

Troubleshooting IRF24L01


Fritigern
(@fritigern)
Active Member
Joined: 2 months ago
Posts: 6
Topic starter  

please help.

I'm trying to make two arduinos communicate as in the joystick car video. I'm using the downloaded sketches from Radiohead. The sketches pass the "verify" test.

When I load any of the server sketches onto any board the serial monitor tells me "init failed". As I get no reports of messages sent and not received, I presume this means the irf and connector card are not working. I have had this result when trying with every one of my receive/transmit cards on one of the connector cards, and most on two of the others. Even I do not believe that these components can have such a terrible reliability that every one fails to work out of the box.

Troubleshooting- All my jumper leads conduct electricity. The three arduinos, (a Uno and two nanos) will run other sketches. 

Nothing in the sketches gives a clue what to do when the serial monitor tells you initialisation has failed.

Any suggestions?

 

Thanks

 


Quote
Fritigern
(@fritigern)
Active Member
Joined: 2 months ago
Posts: 6
Topic starter  

PS

despite the dozens of combinations I have tried, every single one has given me "init failed".

Ta


ReplyQuote
Will
 Will
(@will)
Noble Member
Joined: 7 months ago
Posts: 1084
 

@fritigern 

What versions of the libraries are you using ?

Have you read ...

https://forum.arduino.cc/t/simple-nrf24l01-2-4ghz-transceiver-demo/405123


ReplyQuote
robotBuilder
(@robotbuilder)
Noble Member
Joined: 3 years ago
Posts: 1100
 

@fritigern 

Nothing in the sketches gives a clue what to do when the serial monitor tells you initialisation has failed.

Trouble shooting, the fun part of programming and electronics 🙂

A start might be to post the code you are using and the actual wiring.

I started with using two PCs communicating via the Arduino's IDE Serial Monitor.

I can't find the rx code must be on some microSD card somewhere.

//Include Libraries
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

//create an RF24 object
RF24 radio(9, 8);  // CE, CSN

//address through which two modules communicate.
const byte address[6] = "00001";

void setup()
{
  radio.begin();
  
  //set the address
  radio.openWritingPipe(address);
  
  //Set module as transmitter
  radio.stopListening();
}

void loop()
{
  //Send message to receiver
  const char text[] = "Hello Great World";
  radio.write(&text, sizeof(text));
  
  delay(1000);
}

 

coms

 

This post was modified 2 months ago by robotBuilder

ReplyQuote
Fritigern
(@fritigern)
Active Member
Joined: 2 months ago
Posts: 6
Topic starter  

 

@Will, @RobotBuilder,

Thank you both for replying. I resolved to read the linked page after I had screens hotted, photographed etc what was happening.

In a rollercoaster of wasted time I went from the server printing it had heard from the client but the client not hearing the reply, to the server not printing anything at all to the server hearing the client once when I changed its card for one with an aerial. Putting an aerial card on the client made no change so now I have a client that prints that is sending but not getting a reply, and a server that over three hours has printed that it has received hello world once and sent a reply (which the client didn't hear) and has had one communication from the client but apart from those two or three lines the server's serial monitor has been blank. This is the case with unmodified Radiohead nrf24 server/client sketches and the nrf24_reliable_datagram_server/client sketches.

This is the last server print

2214.735 -> ⸮⸮⸮⸮⸮⸮`xf⸮⸮⸮fx怘⸮init failed
2236.971 -> init failed
2238.548 -> init failed

  I am using Macs, whichI know are not massively reliable with Arduino IDE, but even Macs are not 100% reliable at anything (except being expensive).

have I mentioned I hate computers?

troubleshooting is fine if you win, but not having known good components, sketches or even operating systems does turn a systematic process into a frustrating time consuming struggle.

I'll read the page and try one of the Arduinos on Windows.

Thanks


ReplyQuote
frogandtoad
(@frogandtoad)
Prominent Member
Joined: 3 years ago
Posts: 834
 

@fritigern 

As per @robotbuilder advice, please post the problem code, including library version and any other pertinent information that may help.

No one can help you without it.


ReplyQuote
Fritigern
(@fritigern)
Active Member
Joined: 2 months ago
Posts: 6
Topic starter  

OK about five more hours wasted and a tiny bit of progress

I tried simple sketches from the link above, as follows

As the article does nit use the adaptors I used this to wire the arduinos

Screenshot 2021 12 06 at 12.07.12

As before they refused to communicate, the client reporting

Screenshot 2021 12 06 at 15.17.17

 with no further comment ever.

The server reports this in an infinite loop

 

Screenshot 2021 12 06 at 15.18.53

UNTIL I pul the lead from MISO out of Pin12.

When I do that the client finds its ears and reports

Screenshot 2021 12 06 at 15.21.28

But the Server is unchanged.

I saw some pin changes the first time I had the problem, but none applied to Nanos.

Is there an alternative pin to 12 I should use?

OR can I edit a library file to tell it to use a different pin and hope it works? if so which library file?

is there any application that I can run on each nano to check it works? and having validated them, an application to run to check the IRF24L01s and then the adaptors?

 

Thanks for any suggestions

 

 


ReplyQuote