Hello, i'm having a lot of troubles with RF24 modules. I'm trying to use RF24 mesh but it seems not to work propely.
Hardware description:
master base welded on a PCB with modules on a removable base
Arduino nano atmega328p 5V, RF24 module nRF24L01+, voltage regulator L78L 3.3V TO-82, getting source directly from arduino 5V
Capacitor ceramic 0.02uF + electrolytic 3300uF
Slave base welded on a PCB with modules on a removable base:
Arduino pro mini 5V atmega328, RF24 module nRF24L01+, voltage regulator L78L 3.3V TO-82, getting source from L78xx 5V TO-220 getting power from a 12V line
Test description:
If i load "RF24 Test.ino" (attached) i see that the communication is OK
When i start to test other debug files (see meshTest.ino)
i have this result on slave
check Start: 1
ID: 0 - 0
ID: 1 - 5
ID: 2 - 37777777776
ID: 3 - 37777777776
ID: 4 - 37777777776
ID: 5 - 37777777776
check Start: 1
ID: 0 - 0
ID: 1 - 5
ID: 2 - 37777777776
ID: 3 - 37777777776
ID: 4 - 37777777776
ID: 5 - 37777777776
check Start: 1
ID: 0 - 0
ID: 1 - 5
ID: 2 - 37777777776
ID: 3 - 37777777776
ID: 4 - 37777777776
ID: 5 - 37777777776
check Start: 1
ID: 0 - 0
ID: 1 - 5
ID: 2 - 37777777776
ID: 3 - 37777777776
ID: 4 - 37777777776
ID: 5 - 37777777776
check Start: 1
ID: 0 - 0
ID: 1 - 5
ID: 2 - 37777777776
ID: 3 - 37777777776
ID: 4 - 37777777776
ID: 5 - 37777777776
and this one on master (randomly)
check Start: 0
Renew Start
Renew Skipped
check Start: 1
ID: 0 - 37777777777
ID: 1 - 5
ID: 2 - 37777777777
ID: 3 - 37777777777
ID: 4 - 37777777777
ID: 5 - 37777777777
check Start: 0
Renew Start
Renew Skipped
check Start: 1
ID: 0 - 37777777777
ID: 1 - 5
ID: 2 - 37777777777
ID: 3 - 37777777777
ID: 4 - 37777777777
ID: 5 - 37777777777
check Start: 0
Renew Start
Renew Skipped
check Start: 1
ID: 0 - 37777777777
ID: 1 - 5
ID: 2 - 37777777777
ID: 3 - 37777777777
ID: 4 - 37777777777
ID: 5 - 37777777777
check Start: 0
Renew Start
Renew Skipped
check Start: 0
Renew Start
Renew Skipped
This seems not logic, if slave is connected why master shows it only randomly?
I need a way to identify from the master if nodes are alive, should i test with write?
In any case i'm having a lot problems with this modules.
PS: if I modify master in this way it's also not working
for (int i = 0; i <6; i++){
char toWrite[4] = {3,2,1,2};
bool res = mesh.write(i, toWrite, 1, 4);
int add = mesh.getAddress(i);
Serial.print("ID: " );
Serial.print(i );
Serial.print(" - ");
Serial.print(add);
Serial.print(" - ");
Serial.println(res);
}
check Start: 0
ID: 0 - -1 - 0
ID: 1 - 5 - 0
ID: 2 - -1 - 0
ID: 3 - -1 - 0
ID: 4 - -1 - 0
ID: 5 - -1 - 0
check Start: 0
ID: 0 - -1 - 0
ID: 1 - 5 - 0
ID: 2 - -1 - 0
ID: 3 - -1 - 0
ID: 4 - -1 - 0
ID: 5 - -1 - 0
check Start: 0
ID: 0 - -1 - 0
ID: 1 - 5 - 0
ID: 2 - -1 - 0
ID: 3 - -1 - 0
ID: 4 - -1 - 0
ID: 5 - -1 - 0
PPS: That's crazy, i found two different documentations here and here
I update the function like
char toWrite[4] = {3,2,1,2};
int add = mesh.getAddress(i);
bool res = add > 0 ? mesh.write(toWrite, 1, 4, i) : false;
and now it seems to work, in any case mesh.checkConnection() is not
meshTest.ino (2.2 KB)
RF24 Test.ino (5.04 KB)