nRF24 / RF24Mesh

OSI Layer 7 Mesh Networking for RF24Network & nrf24L01+ & nrf52x devices
http://nrf24.github.io/RF24Mesh
GNU General Public License v2.0
422 stars 154 forks source link

Cannot connect to master node #166

Closed tomcatGu closed 4 years ago

tomcatGu commented 5 years ago

I'm tring to build a mesh network.The master node run on raspberry3B+.The other nodes run on arduino nano. Here is debug information from arduino node: ...... 227914: NET Sending id 1358 from 04444 to 0100 type 194

227915: MAC Sending to 0100 via 0100 on pipe 0

227918: NET Pipe 0 on node 0100 has address cccccccecc

228062: NET Sending id 1359 from 04444 to 0100 type 194

228063: MAC Sending to 00 via 00 on pipe 0

228065: NET Pipe 0 on node 00 has address ccccccccc3

228188: NET Sending id 1360 from 04444 to 0100 type 194

228188: MAC Sending to 01 via 01 on pipe 0

228191: NET Pipe 0 on node 01 has address cccccc3ccc

228327: NET Sending id 1361 from 04444 to 0100 type 194

228328: MAC Sending to 010 via 010 on pipe 0

228331: NET Pipe 0 on node 010 has address cccccc33cc

228486: NET Sending id 1362 from 04444 to 0100 type 194

228487: MAC Sending to 0100 via 0100 on pipe 0

228489: NET Pipe 0 on node 0100 has address cccccccecc

228666: NET Sending id 1363 from 04444 to 0100 type 194

228667: MAC Sending to 00 via 00 on pipe 0

228670: NET Pipe 0 on node 00 has address ccccccccc3

228800: NET Sending id 1364 from 04444 to 0100 type 194

228801: MAC Sending to 01 via 01 on pipe 0

228804: NET Pipe 0 on node 01 has address cccccc3ccc

228810: MAC Received on 0 id 1348 from 00 to 04444 type 128

228813: NET message 0005

228956: NET Sending id 1365 from 04444 to 0100 type 194

228957: MAC Sending to 010 via 010 on pipe 0

228959: NET Pipe 0 on node 010 has address cccccc33cc

229078: NET Sending id 1366 from 04444 to 0100 type 194

229079: MAC Sending to 0100 via 0100 on pipe 0

229081: NET Pipe 0 on node 0100 has address cccccccecc

229211: NET Sending id 1367 from 04444 to 0100 type 194

229211: MAC Sending to 00 via 00 on pipe 0

229214: NET Pipe 0 on node 00 has address ccccccccc3

229332: NET Sending id 1368 from 04444 to 0100 type 194

229334: MAC Sending to 01 via 01 on pipe 0

229336: NET Pipe 0 on node 01 has address cccccc3ccc

229465: NET Sending id 1369 from 04444 to 0100 type 194

229465: MAC Sending to 010 via 010 on pipe 0

229468: NET Pipe 0 on node 010 has address cccccc33cc

229610: NET Sending id 1370 from 04444 to 0100 type 194

229611: MAC Sending to 0100 via 0100 on pipe 0

229614: NET Pipe 0 on node 0100 has address cccccccecc

229774: NET Sending id 1371 from 04444 to 0100 type 194

229775: MAC Sending to 00 via 00 on pipe 0

229777: NET Pipe 0 on node 00 has address ccccccccc3

229809: MAC Received on 0 id 1351 from 00 to 04444 type 194

229810: NET message 0005

229812: MAC Received on 0 id 1359 from 00 to 04444 type 194

229816: NET message 0005

229819: MAC Received on 0 id 1367 from 00 to 04444 type 194

229823: NET message 0005

229839: NET Sending id 1371 from 04444 to 00 type 195

229840: MAC Sending to 00 via 00 on pipe 0

229842: NET Pipe 0 on node 00 has address ccccccccc3

230079: NET Sending id 1371 from 04444 to 00 type 195

230080: MAC Sending to 00 via 00 on pipe 0

230082: NET Pipe 0 on node 00 has address ccccccccc3

230319: NET Sending id 1371 from 04444 to 00 type 195

230320: MAC Sending to 00 via 00 on pipe 0

230322: NET Pipe 0 on node 00 has address ccccccccc3

230622: NET Sending id 1372 from 04444 to 0100 type 194

230623: MAC Sending to 01 via 01 on pipe 0

230626: NET Pipe 0 on node 01 has address cccccc3ccc

230770: NET Sending id 1373 from 04444 to 0100 type 194

230771: MAC Sending to 010 via 010 on pipe 0

230773: NET Pipe 0 on node 010 has address cccccc33cc

230827: MAC Received on 0 id 1371 from 00 to 04444 type 128

230827: NET message 0005

230940: NET Sending id 1374 from 04444 to 0100 type 194

230940: MAC Sending to 0100 via 0100 on pipe 0

230943: NET Pipe 0 on node 0100 has address cccccccecc

231135: NET Sending id 1375 from 04444 to 0100 type 194

231136: MAC Sending to 00 via 00 on pipe 0

231138: NET Pipe 0 on node 00 has address ccccccccc3

231252: NET Sending id 1376 from 04444 to 0100 type 194

231254: MAC Sending to 01 via 01 on pipe 0

231256: NET Pipe 0 on node 01 has address cccccc3ccc

231376: NET Sending id 1377 from 04444 to 0100 type 194

231376: MAC Sending to 010 via 010 on pipe 0

231379: NET Pipe 0 on node 010 has address cccccc33cc

231510: NET Sending id 1378 from 04444 to 0100 type 194

231511: MAC Sending to 0100 via 0100 on pipe 0

231514: NET Pipe 0 on node 0100 has address cccccccecc

231658: NET Sending id 1379 from 04444 to 0100 type 194

231659: MAC Sending to 00 via 00 on pipe 0

231661: NET Pipe 0 on node 00 has address ccccccccc3

231783: NET Sending id 1380 from 04444 to 0100 type 194

231783: MAC Sending to 01 via 01 on pipe 0

231786: NET Pipe 0 on node 01 has address cccccc3ccc

231840: MAC Received on 0 id 1371 from 00 to 04444 type 128

231841: NET message 0005

231922: NET Sending id 1381 from 04444 to 0100 type 194

231923: MAC Sending to 010 via 010 on pipe 0

231926: NET Pipe 0 on node 010 has address cccccc33cc

232080: NET Sending id 1382 from 04444 to 0100 type 194

232081: MAC Sending to 0100 via 0100 on pipe 0

232083: NET Pipe 0 on node 0100 has address cccccccecc

232260: NET Sending id 1383 from 04444 to 0100 type 194

232261: MAC Sending to 00 via 00 on pipe 0

232263: NET Pipe 0 on node 00 has address ccccccccc3

232393: NET Sending id 1384 from 04444 to 0100 type 194

232394: MAC Sending to 01 via 01 on pipe 0

232397: NET Pipe 0 on node 01 has address cccccc3ccc

232549: NET Sending id 1385 from 04444 to 0100 type 194

232550: MAC Sending to 010 via 010 on pipe 0

232552: NET Pipe 0 on node 010 has address cccccc33cc

232671: NET Sending id 1386 from 04444 to 0100 type 194

232672: MAC Sending to 0100 via 0100 on pipe 0

232674: NET Pipe 0 on node 0100 has address cccccccecc

232804: NET Sending id 1387 from 04444 to 0100 type 194

232804: MAC Sending to 00 via 00 on pipe 0

232807: NET Pipe 0 on node 00 has address ccccccccc3

232855: MAC Received on 0 id 1371 from 00 to 04444 type 128

232856: NET message 0005

232926: NET Sending id 1388 from 04444 to 0100 type 194

232927: MAC Sending to 01 via 01 on pipe 0

232929: NET Pipe 0 on node 01 has address cccccc3ccc

233058: NET Sending id 1389 from 04444 to 0100 type 194

233058: MAC Sending to 010 via 010 on pipe 0

233061: NET Pipe 0 on node 010 has address cccccc33cc

233203: NET Sending id 1390 from 04444 to 0100 type 194

233204: MAC Sending to 0100 via 0100 on pipe 0

233207: NET Pipe 0 on node 0100 has address cccccccecc

233367: NET Sending id 1391 from 04444 to 0100 type 194

233368: MAC Sending to 00 via 00 on pipe 0

233370: NET Pipe 0 on node 00 has address ccccccccc3

233496: NET Sending id 1392 from 04444 to 0100 type 194

233496: MAC Sending to 01 via 01 on pipe 0

233499: NET Pipe 0 on node 01 has address cccccc3ccc

233643: NET Sending id 1393 from 04444 to 0100 type 194

233644: MAC Sending to 010 via 010 on pipe 0

233646: NET Pipe 0 on node 010 has address cccccc33cc

233814: NET Sending id 1394 from 04444 to 0100 type 194

233814: MAC Sending to 0100 via 0100 on pipe 0

233817: NET Pipe 0 on node 0100 has address cccccccecc

233858: MAC Received on 0 id 1375 from 00 to 04444 type 194

233859: NET message 0005 ...... Is somewhere broken?

tomcatGu commented 5 years ago

I test helloworld_rx.py on RPi and helloworld_tx.ino on nano. The program on RPi shows : payload length 8 Received payload 795 at 1592000 from 01 payload length 8 Received payload 796 at 1594000 from 01 payload length 8 Received payload 797 at 1596000 from 01

But the arduino side shows "send... failue". So strange.

tomcatGu commented 5 years ago

I found out why the arduino node couldn't connect to the master node or connect very slowly. At line 211 : uint32_t timer=millis(), timeout = 125; and line 355 in RF24Mesh.cpp: while(millis()-timr<225) These values of timeout are too small to cause that the node has no time to receive the message. By increasing timeout value to more than 1s the node connect to mesh very quickly.