RFM2Pi Packet discarded as the RSSI format is invalid

Hi, I’ve started a fresh install of emonPI from the SD card image.

I’m using an RFM2PI board with the RFM69 chip.

I keep getting logs of…

2017-01-05 21:05:47,797 WARNING RFM2Pi Packet discarded as the RSSI format is invalid: [‘OKX’, ‘0A150033002D002C0D’, ‘(3A)’]

I’m using an emonTx v2 board with RFM12 module to transmit (using this sketch https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV2/emonTx_CT123) compiled using platformio.

Is this an issue due to the newer versions of JeeLib I’m using ?

It looks like the rfm2pi is outputting in hex-mode, try sending “0x” or just “x” to the rfm2pi over serial to exit.

I’ll try that tonight, although this was a straight build from the SD card, plus an emonPI “update” via the scripts in emonCMS - so I’m surprised the settings are incorrect.

I cannot explain how it came about, whether it is a mis-build or a stray setting, but when hex-mode is used it prefixes with “OKX” in place of “OK” and the data (including node id) is output as one continuous block of hex, for the sketch you link that outputs 4 ints, that would fit with the string of 18 hex chars, the rssi is separate but also in hex and the fact it is not an int has caused the error message you see as the rssi is parsed before the payload in emonhub.

I’m not 100%, but I don’t think the rfm69pi is automatically updated by the emonpi update, I believe the “updaterfm69pi.sh” script needs running manually.

Could you please clarify what should be done exactly ?
I’m running the CM firmware on an emonTxV3.4 and i’m getting the same message on the emonHub log.
Should the change be on the emonTxV3.4 or somewhere on the RFM2Pi firmware ?

The emonTx V3.4 sends a byte stream comprising the data as variables in a ‘C’-language struct. And the RSSI value is the Received Signal Strength Indicator, nothing to do with the emonTx. So it cannot be the emonTx that is appending a ‘X’ character.

It is the receiver (the RFM12Pi/RFM2Pi/RFM69Pi or the Atmel 328P in the emonPi) that converts the byte stream to the decimal digits representation that you see in the emonHub log, and appends the RSSI value.
What you should see in the log is something like:

OK 15 68 122 1 0 64 96 0 0 0 0 0 0 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 245 7 48 117 48 117 0 0 0 0 (-81)

Actually it’s just a lesser used/known rfm2pi setting.

Using a serial console via a ssh session, e.g. miniterm. Writing 0x to the rfm2pi board will switch off hex mode and normal decimal output should resume.

You will need to stop the emonhub service whilst connecting to the rfm2pi and the baud will depend on the rfm2pi model or “vintage”, if unsure you can check emonhub.conf for the correct baud.

If you need any more detailed steps for any part just ask, each step is quite easy, just not a well trodden or documented path.

Incidentally, if you write a v to the rfm2pi it will respond with a list of available commands and hex mode should be listed there. It may help understand what it is you are changing.

1 Like

Thanks for the clear description and the clean steps.
Thank you

1 Like