I am aware of the limitation but would like to know why and if there is a way around it? Thanks.
Why the 26 nodes limit?
(4 posts) (3 voices)-
Posted 1 month ago #
-
I'm no rf12 expert but since JC is on holiday I'll give my 2 cents:
First of all: the concept of node id's is something JC's RF12 lib creates. You could make your own rf12 lib which allows for more node id's. But the easier way would be for you to just add your own bigger "node id's" in the first byte(s) of your payload;-) Not exactly the same but probably sufficient for some scenarios.
In contrast, the groupid is something which is implemented by the RF12 chip itself.
JC designed the packets in his RF12 lib to have 1 header byte, 1 length byte, then payload and followed by 2 CRC bytes. The header consists of 3 protocol bits and 5 node id bits. In 5 bits you can but 32 possible values:
0 is reserved for broadcast
1..26 are suggested for normal nodes
27..30 are suggested for special nodes (but nothing prevents you from using it the way you like, expect for perhaps future incompatibilities if JC decides to do something with those)
31 seems reserved? (although I cannot see the rf12 code do something special in that case)
Posted 1 month ago # -
As stef007 suggests, the easiest thing to do is to make your own 'node id' as the first byte / word of the payload.
The RF12 lets the user define their own sync byte to signal valid transmissions. JC has cleverly used this as a way of implementing groups. The downside is that a node can't listen across groups as it's hardware sync.
Personally I'd be very pro a v2 rf12 library that addresses the following. This would be incompatible with current JeeNodes, but they can be easily reprogrammed. If firmware version was printed out over serial at power up, that would make it even easier.
*1 byte source address (it's currently either / or)
*1 byte destination address (it's currently either / or) //node can use one or both. destination chooses to accept messages for it or ones for it from a specific address
*group byte as separate byte or otherwise omit (lets units communicate across groups if wanted)
Posted 1 month ago # -
Oh I see. I think 1 byte each is a sensible choice. I am just starting with PIC programming but I'll see if I can manage to modify rf12 to do that. Thanks!
Posted 1 month ago #
Reply
You must log in to post.
