Question about nRF24L01+ Pipe Feature

Hi all. Recently started working with nRF24L01+ modules and I think the Pipes feature could be useful in my new project. But, something seems backwards with either my understanding of the feature (most likely) or its implementation (possible). Let me explain:

From my reading of the example code, you assign the nRF24L01+'s various pipes based on the receiving (TO) address. So, you know what address each packet was sent TO based on which pipe it shows up in. That's the part seems backwards and will add complexity in a mesh topology. I'd think you would assign pipes based on the sender's (FROM) address. A simple example:

Image three friends (Bob, Jim, Dave) who send letters to each other. Based on my understanding of the nRF24L01+'s pipe feature, each of these guys would have to have TWO mailboxes in front of their house each with a DIFFERENT address printed on it. When Bob writes to Dave he sends the letter to one address. But, when Jim writes to Dave he sends the letter to a DIFFERENT address. When the mailman arrives at Dave's house, he puts the letters into the appropriate box based on the TO address.

I suppose that scheme is nice if Bob or Jim forget to put a return (FROM) address on the letter. Dave can still tell who it's from by which mailbox it's in. But, it seems kind of silly for Dave to have TWO addresses (and, it gets much more complex as the number of corresponding friends grows). Also, if Bob forgets Dave's address, he can't ask Jim because he uses a DIFFERENT one to write Dave.

In my world, Bob, Jim, and Dave would each have ONE address and ONE mailbox. Everybody writes to Dave using the SAME address. When the mailman arrives at Dave's house, he puts all the letters in the ONE mailbox. Dave's wife (who implements the Pipe System) then takes the letters out of the box and puts them in different piles (pipes) based on the sender's (return) address. Dave can then tell who sent the letters based on which pile they're in.

So, what's backwards here? The nRF24L01+? My understanding of the nRF24L01+? My stupid analogy?

gfvalvo:
In my world, Bob, Jim, and Dave would each have ONE address and ONE mailbox. Everybody writes to Dave using the SAME address. When the mailman arrives at Dave's house, he puts all the letters in the ONE mailbox. Dave's wife (who implements the Pipe System) then takes the letters out of the box and puts them in different piles (pipes) based on the sender's (return) address. Dave can then tell who sent the letters based on which pile they're in.

That's not a bad analogy except for one thing. In reality Bob Jim and Dave all have apartments in the same building (the nRF24) and there is only one mail-slot on the door (the nRF24's wireless). So the address of the recipient (Bob, Jim or Dave) identifies which pile (pipe) the mail should go into.

If you think about it further, the nRF24 hears all the messages on the channel it is listening on, including those with addresses for other nRF24 modules. It is only after it has received a message that it can verify whether it is intended for itself (i.e. for one of its own pipes) or whether it is for another nRF24, in which case the message is ignored.

By the way, for many (most?) applications there is probably no need to use more than one pipe.

...R
Simple nRF24L01+ Tutorial

Thanks for the reply.

Robin2:
That's not a bad analogy except for one thing. In reality Bob Jim and Dave all have apartments in the same building (the nRF24) and there is only one mail-slot on the door (the nRF24's wireless). So the address of the recipient (Bob, Jim or Dave) identifies which pile (pipe) the mail should go into.

Yes, a different paradigm.

If you think about it further, the nRF24 hears all the messages on the channel it is listening on, including those with addresses for other nRF24 modules. It is only after it has received a message that it can verify whether it is intended for itself (i.e. for one of its own pipes) or whether it is for another nRF24, in which case the message is ignored.

That still works with my scheme, in fact my way makes it easier. The nRF24 now only has to processes messages sent to its single address. It would then sort them into pipes based on the SENDER's address.

By the way, for many (most?) applications there is probably no need to use more than one pipe.

Perhaps. But, having been a working engineer for more than 30 years, I enjoy exploring the advanced features of a new device -- if for no more than a mental exercise.

Simple nRF24L01+ Tutorial

Yup, that's where I started my study.

Bottom line is that my understanding is more or less correct and the device works the way it works.

Thanks again.

To my mind this sort of feature in a chip shows the designer doesn't understand software - the extra hardware
might seem to make some things simple, but it actually makes the driver software more complex and
all of this is trivial to do in software anyway, which is much more flexible - just provide simple low level
primitives, let the firmware/software drivers do what they want.

Often what people do is take an existing complex software framework and write a driver for a new piece
of hardware. The software already has a philosophy about how to (in this case) mesh-network, it very
unlikely the hardware designer has provided a facility that matches this well enough to use. It is very likely
the software already has basic notions of composing, sending, receiving and filtering packets, which are
extensible and free of limits like only 6 addresses, and that these are designed to be pretty general.

gfvalvo:
That still works with my scheme, in fact my way makes it easier. The nRF24 now only has to processes messages sent to its single address. It would then sort them into pipes based on the SENDER's address.

Fine - but that's not how it works :slight_smile:

...R