Direct RFM69 to Pi via SPI

So far with both the emonPi and the rfm69pi boards, we’ve interfaced with the RFM69cw radio module via a microcontroller in the middle. Others have however taken a different and simpler approach of linking the Pi to the RFM69cw module directly e.g: rpi-rfm69 · PyPI (wrapper for the low power labs library)

With our in progress shift away from using the JeeLib library towards using hardware buffering and a native packet format, the code for reading packets from the module is also much simplified… or at least I’ve finally been able to get my head around it, thanks in large part to @Robert.Wall for extracting just the bare minimal code required.

I’ve now ported the code that I had recently ported to the AVR-DB microcontrollers into an EmonHub interfacer that can read from the RFM69cw module via SPI directly and it seems to work well. I had made a little PCB to test this a while back, it’s only an RFM69cw module with one capacitor and one resistor:

Here’s the emonhub interfacer code for anyone interested:
Comparing master...rfm69_spi_pi · openenergymonitor/emonhub · GitHub

The intention is to use this direct approach in the next emonPi v2 board so that we can shift the radio overhead off the AVR chip and it may provide more flexibility and options for making the most of the RFM chip.

1 Like

That sounds good.

To start, I don’t know much about the details of RFM69 communication, so my comment below may not be practical!

I have read the Sparkfun RFM69 tutorial ( https://learn.sparkfun.com/tutorials/rfm69hcw-hookup-guide), which also uses the LowPowerLabs library. In the section on ‘Acknowledgements’ the tutorial mentions that the library can automatically resend a message a fixed number of times until it either receives a successful acknowledgement or fails.

Would it be possible or practical to use the automatic resend facility to (hopefully) improve the integrity of the RFM69 link?

I looked very hard at LowPower library when working on the emonPiCM. The emonPiCM
You can read my reasons for not using it there.

@Robert.Wall Thanks for the quick reply, and the explanation of why the LowPowerLabs library can’t be used.