Now I am trying to make a Pi working for local Logging. Therefore have a second Pi whit a RFM112B.
I can’t get inputs on the Pi. The led on the RFM12B is not blinking but burns continued.
Therefore I tried to update the RFM12B following next lines.
Upgrading RFM12Pi Firmware Direct from the Pi
Since the Raspberry Pi lacks a DTR pin that makes it oh-so-easy to upload your hex files into the avr, we need this hack to make it just as easy. Thanks to JCW from JeLabs for working this out and Martin Harizanov for implementing it for the RFM12Pi.
You cannot use a file compiled for the RFM69CW for a RFM12B.
Are you certain that you have an RFM12B? There are pictures here.
Although the commands you use in the sketch are the same, the code that the library supplies is totally different. If you do have the RFM12B, you must either find and use the older compiled file for the RFM12B, or you must compile the file from the source code yourself, after you have changed the line #define RF69_COMPAT 1
to #define RF69_COMPAT 0
This is the switch that tells the library to use the correct instructions for the RFM12B.
When you have uploaded the correct version, you must not update your emonPi using the “emonPi Update” button, you must always use the “emonBase Update” button. This will cause the update of the radio module to fail, which is exactly what you want, otherwise the RFM12B code that you loaded will be overwritten, and you will have to start again.
Its become a little complicated for me. I have the RFM12B for sure.
I look for a old image off the emoncms which i could use for the update.
could i find that somwhere?
but they might be well out of date, versioning didn’t start until well into the rfm69 fw’s and the repo has been reshuffled so the dates may not indicate the era of the code. These early fw’s were also prone to dropout’s, I re-compiled the rfm12/rfm2pi fw with versioning and using the latest libs in the Feeds stop updating thread on the old forum but the links for all the attachments were all lost in the move to this new forum, it might be found in forum-archive/sites/default/files at master · openenergymonitor/forum-archive · GitHub but I can’t see anything familiar and only 2/3rds of the list is displayed (github restrictions, need to clone to see the full list), but I will keep an eye open for a local copy too and post it here if I find it.
i have now the image 26oct17 loaded. in the directory
RFM2Pi/firmware/old/
i see several files,
Full_RF12demo_atmega328 Pre_compiled_ATtiny84_RF12_Demo_hex RF12_Demo_atmega328 RF1
root@raspberrypi:/home/pi/RFM2Pi/firmware/old/RF12_Demo_atmega328# avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
strace: fork: Cannot allocate memory
root@raspberrypi:/home/pi/RFM2Pi/firmware/old/RF12_Demo_atmega328# avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO
This is not a fault I’ve come across before, a quick web search suggests it is as the error suggests, out of RAM resources.
What model Pi is this and what other services are you running? is it an emonSD?
Have you tried rebooting the Pi incase there are phantom tasks running cusing a shortage of memory? Or try running top in another ssh window whilst doing the update to see what is using the resources.
I doubt it is the reason, but I have never tried this command as root either, have you tried running it as Pi? Using sudo if required.
It’s not unusual to see multiple “avrdude-original: Using autoreset DTR on GPIO Pin 7” messages so don’t worry too much about that until you get some other activity.
Are you saying your rfm2pi works for a while then stops? If so the firmware has been loaded and you have another issue causing it to stop, the fw will not change unless you use the wrong update button or reboot a fresh emonSD (firstboot) with the rfm2pi attached.
That is a very good question, a question worthy of a good answer, but AFAIK there isn’t a good reason, but I have to say that although it isn’t an easy fix, I’m not aware of anyone having the troubles you are seeing.
Are you stopping the emonhub service when trying to upload from the Pi?
I had one Pi completely working for several years with remote logging
Then I start to make the other work for local log. That’s where my problem starts and one RFM2B stopped working. I surely have started a new image with the RFM on board. Did not know that’s a problem.
Sorting out my problem, I put the good RFM12B in the Pi with a new image to see if the input shows up. No success. Then I push the emonBase Update Butten. Since then, my second RFM12B stopped working. The green led is continuously on.
root@raspberrypi:/home/pi/RFM2Pi/firmware# cd
root@raspberrypi:~# /home/pi/RFM2Pi/update-RFM12.sh
[ ok ] Stopping OpenEnergyMonitor emonHub: emonhub has been stopped ok.
strace: execl: /bin/sh: Cannot allocate memory
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so' from /etc/ld.so.preload cannot be preloaded: ignored.
/bin/sh: error while loading shared libraries: libc.so.6: failed to map segment from shared object: Cannot allocate memory
[ ok ] Starting OpenEnergyMonitor emonHub: emonhub has been started ok.
root@raspberrypi:~# [ ok ] Starting OpenEnergyMonitor emonHub: emonhub has been started ok.
bash: [: missing `]'
root@raspberrypi:~# avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-orig