I made some changes to the RFM69 library to support 10bit node addresses, and you should see version 1.3.0 available in your Arduino IDE Library Manager. Previously the standard was a 1byte (8bits) address for sender and receiver, a total of 2 bytes used in each packet for addressing. I wanted to avoid using another 2 bytes to increase addressing to 16bit (65k addresses) because having that many nodes is impractical, and 2 more bytes is an “expense” most users won’t need. So I used the bottom 4 bits of the CTL byte, to add 2 bits to each of the existing to/from address bytes. The network addresses are kept at 1byte (8bit).
This yields an address space of 1024 total addresses. Address 0 is now reserved for the BROADCAST address, and you are left with 1023 possible addresses. A gateway is suggested to be kept at address 1 and the rest of the nodes should occupy incremental addresses.
There should be no impact on anyone not using more than 255 nodes as before. One required change for those wanting to use addresses larger than 1 byte (255) is they need to use uint16_t variables in their sketch. I’m looking forward for constructive feedback and any bug reports at this time. The ListenMode part of the code (which is experimental) was left untouched and it only supports 8bit addressing as before.
Here is the latest RFM69 packet header structure including a breakdown of the CTL byte:
Other important updates:
- The BROADCAST address was changed to 0 (from 255 previously).
- The previous RFM69 v1.2.0 included SPI Transactions, another important change to the library.
- After it was brought up in the forum that Moteino AVR sketches compile to larger sketch size than Arduino, I recently released a new AVR Moteino Boards definition (based on Arduino 1.6.23 AVR boards) which results in significant compiled size reductions for all Moteino sketches, please give this a try. In Arduino IDE’s Boards Manager you should be able to easily upgrade to the latest version.