Hi Steve
You are not the first and unlikely to be the last user to do that. it is IMO a mistake that is far too easy to make and the consequence is a huge headache at best.
Take a look at the "Unable to see emonTx inputs " thread for more info on this.
Basically the wiki is a bit out of date and the RFM2Pi repo has been moved around, plus there is a glitch in the emonSD that prevents the rfm2pi repo from being updated on the SD when the update routine runs. The actual firmware you need to install hasn’t been changed in a while but the location has, so we/you can either just download the correct firmware and try to install it “manually” or fix the repo on the SD so it updates and the firmware’s correct location is then known for the command line to work, I would probably go with the latter.
However based on the findings towards the end of the linked discussion, there is also a possible issue with running the avrdude command, I only mention this in case it doesn’t work when tried, IMO if you managed to install the wrong firmware it should be just as possible to install the correct one, It could also have been a bad connection so please ensure the RFM2Pi is seated correctly and try not to remove and refit it too often.
Changing the baud and/or using the “v” command will not work when the wrong firmware is installed as the initial setup will not complete the “wrong RFM module” will not initialize and the firmware will stall before reaching the point of listening to the serial port.
Firstly SSH in and try this one command
sudo avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400
This will try and communicate with the RFM2Pi without uploading anything, just to check we have good comm lines.
If that was successful,
(here’s an example output from a emonpi so the details will differ but essentially the same, ignore the “strace” errors, that’s normal)
pi@emonpi(ro):~$ avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-original: Device signature = 0x1e950f
avrdude-original: safemode: Fuses OK (E:00, H:00, L:00)
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
avrdude-original done. Thank you.
strace: |autoreset: Broken pipe
you can try a firmware update with the following, it will (hopefully) fix and update the firmware repo then stop emonhub and upload the firmware, then restart emonhub.
rpi-rw
sudo chown pi:pi -R RFM2Pi
cd RFM2Pi
git pull
cd firmware/old/RF12_Demo_atmega328
sudo service emonhub stop
sudo avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
sudo service emonhub start
At this point you can check the LED on the rfm2pi, hopefully it will be giving an occasional flash, you can check data is passing through emonhub (if you have set the com_baud = 9600
in emonhub.conf) with
tail -f /var/log/emonhub/emonhub.log
if there is data flowing you should see some inputs in emoncms update, if not, try stopping emonhub and testing with minicom again.