Motetino R2 send and receive sketches as shipped? (SOLVED: 433 vs 915 MHz)

Started by jbeale, October 09, 2013, 02:26:36 AM

jbeale

Yesterday I was impressed by the performance of my pair of Moteino (915 MHz, R2) boards, using the send and receive nodes as shipped.

Today I just tried loading the send and receive sketches from github, specifically:
https://github.com/LowPowerLab/RFM12B/tree/master/Examples/Send
https://github.com/LowPowerLab/RFM12B/tree/master/Examples/Receive
and I notice this is different code. For example the packet data is longer, the LED does not blink on the Tx node, and I am getting much worse performance. I see many cases of BAD-CRC even over very short paths, when with the as-shipped code it was solid over 6x as far. Is the as-shipped code available somewhere online?

EDIT: Wait, cancel that! I see a problem: radio.Initialize(NODEID, RF12_433MHZ, NETWORKID);
probably should be RF12_915MHZ for my hardware, I'm guessing...

...recompile and re-upload... yes that is a whole lot better, at a range of 13 meters indoors through three walls, only one CRC error out of 2100 packets, length from 1..88 bytes.  Configuring the right frequency band does matter. :)

Felix

Yep ... that's a pitfall many don't see, matching the code settings with the hardware radio. I probably didn't do a good enough job of documenting the code.
Thanks jbeale for creating this thread so others can find it.
One day I hope to have time to revisit all the code examples.
I'm even thinking of refactoring/renaming all the RFM12B lib to match the RFM69. Then they would be almost seamless and examples could be used interchangeably. But never enough time...