nRF24 / RF24Network

OSI Layer 3 Networking for nRF24L01(+) and nRF52x on Arduino and Raspberry Pi
https://nrf24.github.io/RF24Network/
GNU General Public License v2.0
353 stars 163 forks source link

Docs: Update addressing & Title Info #223

Closed TMRh20 closed 3 months ago

TMRh20 commented 3 months ago
2bndy5 commented 3 months ago

I thought pipe 0 was used for receiving from both parents and multicasts. Saying that non-master nodes only support 4 children with multicast enabled sounds inaccurate.

TMRh20 commented 3 months ago

Hmm, nope as far as I recall pipe0 has auto-ack completely disabled after transmission, and is used only for multicast. Child nodes need to support both a multicast pipe and a parent pipe separately, so only 4 nodes with multicast enabled. It also how RF24Mesh sets up addresses (MESH_MAX_CHILDREN is 4 by default, master use MESH_MAX_CHILDREN + 1)

2bndy5 commented 3 months ago

I do remember pondering why MESH_MAX_CHILDREN defaults to 4. Maybe I'm just misremembering.

TMRh20 commented 3 months ago

Hmm now you got me thinking: https://github.com/nRF24/RF24Network/blob/master/RF24Network.cpp#L1134

Should be if (digit < 1 || digit > (NUM_PIPES )) { to allow for a 6th node...

2bndy5 commented 3 months ago

Pipe numbers are 0 based, but I thought NUM_PIPES is 1 based (for human readability).

You might be overthinking too! It is contagious.

2bndy5 commented 3 months ago

all other usage is NUM_PIPES - 1 excepts https://github.com/nRF24/RF24Network/blob/f57a95314a0235cc58855d3719f6324c2dcaee9a/RF24Network.cpp#L106-L108 but I think the decrement i-- takes care of the initial - 1.

TMRh20 commented 3 months ago

Just tested on RF24Network example to confirm and yeah it says 06 is an invalid address. Its looking at the first octal number in the address, not the pipe number here.

But there is no pipe 6, so a node 06 won't work anyway ( max of 5 nodes even with multicast disabled ) time to revise the documentation again lol.. wish I knew how my own library worked haha

2bndy5 commented 3 months ago

My memory about how all this gets implemented is getting a bit fuzzy. I think its only natural.