Thank you- I tried the first part, and nothing happens.
Looking at the board, one of the solder joints does look a bit dry. I will
get the iron out and touch them all up to be sure.
I did previously hit the “emonbase update” button on emoncms local. But
since then I have redone the SD card image. Will this have written onto the
RFM12B as well? Having said that, I don’t think it worked before I hit
update.
When you say to try putting another sketch onto the RFM12Pi, how would this
be done (through the Pi, or another means?)
Yes! this would have most definitely have been the cause of the issue if it hadn’t already not worked, so you may have more than one issue now.
Yes, sorry another way of saying “installing firmware”. The RFM2Pi board’s software is referred to as firmware in a more general term, but also refered to as a “sketch” in Arduino speak.
What Glyn and I have tried walking you though (above) is installing a firmware to the RFM2Pi via the Pi. The firmware is in “hex file” form which is the result of compiling the “sketch” in an IDE (Integrated Development Environment).
Are you able to link the Rx and Tx pins of the Pi’s GPIO together using a female-female link wire or something similar?
Obviously the Pi should be powered down whilst removing the RFM2Pi and fitting the link, but once powered up you can test the Pi’s serial port lines, connectors and port mapping all in one go by using minicom, anything written to the serial port should echo back and be displayed by minicom.
If I’ve understood right, the object here will be to see if the Pi is functioning correctly, i.e, what signals is it sending to the RFM12Pi.
I have another Pi with another RFM12Pi module on it, which is working fine. I just removed the RFM12Pi and replaced it with the one that doesn’t seem to work. I get the same problem- green led stays on, not picking up any nodes.
So surely this says that the Pi is fine, and the issue is with the RFM12Pi or the RFM12B module?
Then the test on the Pi you suggested isn’t needed?
If there is no response from the suspect RFM2Pi then it looks like the first Pi MIGHT be ok but the “linked pin test” or moving the known good RFM2Pi to the first (suspect?) Pi would confirm the Pi is ok (or not)
If there is a response from the suspect RFM2Pi when on the known good Pi, that would suggest there is also a problem with the first Pi.
Can you confirm, was that from the suspect rfm2pi on the known good Pi?
Don’t worry about the strace: |autoreset: Broken pipe they are an unavoidable annoyance from using pipe and appear even during a fully successful upload. The important part is it is clearly communicating with the device bootloader which means you can install a firmware.
[edit] If this is the suspect rfm2pi on the known good Pi, you could continue with the previously suggested steps
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 which point the “suspect rfm2pi” should start receiving data as the known good rfm2pi was. Then if that is the case, return the “now fixed rfm2pi” back to it’s original “suspect” Pi and see if that works, if not we need to focus on that.
So have you already installed a new FW? or just tested as per your log above? that has just read the chip details not uploaded FW. see the [edit] part of my last post
Just saw your reply. Yes, I did this, using the commands you gave earlier in the thread. The green LED light is now permanently off. No inputs can be seen on emoncms (which they can with the fully working RFM2Pi.).
I’m now going to try the working RFM2Pi on the ‘dodgy’ Pi.
Ok, so the working RFM2Pi doesn’t seem to work on the dodgy Pi (using sudo avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 causes SSH to freeze, as in previous cases.)
Did you restart emonhub on the good Pi after loading FW to RFM2Pi?
You should also be able to use minicom and confirm the rfm2pi is reponding to commands like “v” for the firmware version etc. Do you run the stock rfm network setting? ie group 210 and 433Mhz, emonhub only set those at start up or after the conf is edited.
Ensure “quiet = false” is set in [[RFM2Pi]] [[[runtimesettings]]] in emonhub.conf too, that may help see more data.
ok that doesn’t sound good. Do you have a spare SDcard ? or can you confirm the SDcard image in the suspect Pi is absolutely stock? you haven’t altered anything at all?
The SD card was written earlier in the week, but I did change the config file- there are two settings to do with HDMI which I altered so that it would display on a VGA display. This was so I could access the pi without knowing it’s IP address (the pi is on my officr network and I wasn’t sure how to find the IP address; fing didn’t work).
Sorry gents. I’m confused, and you probably are too. I decided to go back to the beginning again to try and get my head around things;
Setup 1. Pi (working) + RFM2Pi (working)
Bizarrely, this didn’t see to work to start with. No inputs were being recorded. Then, apparently for no reason, it started working. Sometimes there is no input for over a minute. Is this normal? Possibly a separate issue!
Setup 2. Pi (working) + RFM2Pi (dodgy)
Contrary to my previous post, this is now working as well as setup 1, giving me input readings every few seconds. However, as I write, there has been over 4 min gap between two inputs. Is this normal?
I’m guessing putting the correct firmware onto the RFM2Pi seemed to do the job.
Setup 3. Pi (dodgy) + RFM2Pi (working)
Now working! However, when I do the avrdude test command (stopping emonhub before, and start after), I still get no response.
Setup 4. Pi (dodgy) + RFM2Pi (dodgy)
Working! Same as setup 3, though- no response to the avrdude test.