I did a long overdue update of my EmonBase yesterday, and now I can not get it up running again.
After the update, I do not get inputs from any of my RF nodes, neither in the local EmonCMS nor in EmonCMS.org. I can get it to post PV data collected by the Bluetooth connection to EmonCMS.org, but no local input.
When I look in the EmonHub - log, the only suspect thing I see is this:
2017-12-02 16:09:17,200 INFO MainThread Creating EmonHubJeeInterfacer ‘RFM2Pi’
2017-12-02 16:09:17,251 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2017-12-02 16:09:19,296 WARNING MainThread Device communication error - check settings
Seems the RF radio is not starting, any ideas? I’m no linux wizard, so please be gentle
Unfortunately, that did not do it - same warning. If it had worked, I would probably also have had to update the EmonTX’s to 38400 to get communication going.
No - we’re referring to the serial comms between the RFM12Pi and the Pi, not the radio channel itself.
Try 57600 (that is what my old RFM12Pi wants).
Failing that, try all the baud rates in turn until it talks.
Did a fresh SD install (v. 10/2017) w. stock config file. Tried 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, and 115200 - no luck unfortunately. Maybe I should download an older version and see if that works.
What exactly is your hardware: An RFM2PI, and RFM12Pi or RFM69Pi, and which radio module, RFM12B or RFM69CW?
(Mine is an RFM12Pi with an RFM69CW - just to confuse everyone.)
The firmware is probably compiled for the RFM69, if you have an RFM12B, if definitely won’t work and you’ll need to change #define RF69_COMPAT 1 to #define RF69_COMPAT 0 and recompile & reload the RFM??Pi.
The fact emonhub tried starting the serial connection at 9600 baud tells us the RFM2Pi you had was an rfm12b based device (assuming it worked previously and hadn’t changed that setting in emonhub.conf).
If you used the “Update emonBase” button from the emonCMS admin page you will have written the rfm69cw firmware to the RFM2Pi (see the Update EmonPi Button or Update EmonBase Button? thread for more detail) and as Robert says
There is already a compiled RFM2Pi FW for the rfm12b based devices, there just isn’t a update routine for it, try…
Bingo! That worked a treat - seems everything is up running again. Thank you Paul and Robert for all your patience and competent debugging.
First I just pushed the update button, but when my problems persisted, I resorted to downloading a fresh image. It seemed to work fine except for the radio issues. Anyhow, now I’m warned that my HW is “outdated” and that I need to be careful before updating in the future.
All you need to do is make a habit of using the “Update emonPi” button NOT the “update emonBase”, the difference in upload baud between the 8MHz RFM2Pi’s and the 16MHz emonPi board will cause the firmware upload to fail whilst everything else updates as expected.
Sorry to interrump but I’ve also botched my RF Module, the problem it’s if I go on directory /home/pi/RFM2Pi and use the update-RFM12.sh it all seems to work but I got the error
Or you could just use the “update emonbase” button from within emoncms. The initial issue caused when using a rfm12 is because the updater just overwrites the firmware with the rfm69 version, so in this case it would revert the incorrectly installed rf12 to the original rf69 version.
As a sidenote, the strace: |autoreset: Broken pipe messages are nothing to worry about, they are there on a successful upload too. Glad you are sorted now.