Improving debug output for the RFM69 library

Started by amadeuspzs, September 03, 2020, 04:28:19 AM

amadeuspzs

Hello,

I'm new to the world of RFM69 having worked through ESP8266 land and looking for better range.

I'm using two RFM69CW modules: one with a Pi as a gateway and the other with an ATMega32U4 (Pro Micro) as the sensor transmitter.

I am using the example struct send sketch with ATC and requesting ACKs, but I'm getting inconsistent results. Packets get through on the gateway, but the transmitter isn't seeing the ACKs all the time.

I'd like to debug why this is happening, for example, tracking what the power levels are etc.

From looking through the source code of https://github.com/LowPowerLab/RFM69 I'm not seeing a lot of debug info available.

Has anyone dealt with this or should I just go ahead and add a whole bunch of Serial.print statements with a debug flag, so I can for example find out what power levels are used in https://github.com/LowPowerLab/RFM69/blob/master/RFM69_ATC.cpp#L176 ?

Would anyone else be interested in this sort of debugging functionality and is it worth turning this into a PR?

Cheers,

Felix

The library works, I'd like to avoid pollution with debugging needed. Please add that on your local copy.

The radios can work erratically because of many reasons, hardware and code. Unfortunately it's too hard to guess what might be wrong and these types of threads can go on forever.
I'd recommend you start with a known working board, like a Moteino, which I created for this purpose, and with known working code. Then fan out from there and see where things break and why. It's a much more deterministic way of developing a working product.