RFM12B upgrading

cd by itself is actually a valid command. It will take the user to their home directory.

BUT, if that’s indeed the intention here, it would’ve been a good idea to say so.

The path to the script is fully qualified, so it’s doing nothing, unless it ought to be inside the script?

1 Like

That may be the case. The main point was that cd by itself is valid. :wink:

I noticed this in one of your earlier posts too. It is (I believe) due to the fact strace forks the command into 2 threads and then one fails, the second one is orphaned as the first one doesn’t complete successfully, terminating the second.

Looking at your df -h result your root files system is maxed out at 100% full. What size is the SDcard? Did you expand the filesystem with emonSDexpand? The numbers only add up to around 3.5GB so it looks like the FS has not been expanded, even if this was a 4GB card I would expect the numbers to be a little higher but an 8GB card min is recommended now.

I tried the script like you show.

No success.

Then I correct the line in the script for the path in firmware/old
than it shows:

cdpi@emonpi(rw):~$ cd
pi@emonpi(rw):~$ /home/pi/RFM2Pi/update-RFM12.sh

avrdude-original: Version 6.1, compiled on Jul  7 2015 at 10:29:47
                  Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                  Copyright (c) 2007-2014 Joerg Wunsch

                  System wide configuration file is "/etc/avrdude.conf"
                  User configuration file is "/root/.avrduderc"
                  User configuration file does not exist or is not a regular file, skipping

                  Using Port                    : /dev/ttyAMA0
                  Using Programmer              : arduino
                  Overriding Baud Rate          : 38400
avrdude-original: Using autoreset DTR on GPIO Pin 7
                  AVR Part                      : ATmega328P
                  Chip Erase delay              : 9000 us
                  PAGEL                         : PD7
                  BS2                           : PC2
                  RESET disposition             : dedicated
                  RETRY pulse                   : SCK
                  serial program mode           : yes
                  parallel program mode         : yes
                  Timeout                       : 200
                  StabDelay                     : 100
                  CmdexeDelay                   : 25
                  SyncLoops                     : 32
                  ByteDelay                     : 0
                  PollIndex                     : 3
                  PollValue                     : 0x53
                  Memory Detail                 :

                                           Block Poll               Page                       Polled
                    Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                    eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                    flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                    lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                    calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                    signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

                  Programmer Type : Arduino
                  Description     : Arduino
                  Hardware Version: 3
                  Firmware Version: 4.4
                  Vtarget         : 0.3 V
                  Varef           : 0.3 V
                  Oscillator      : 28.800 kHz
                  SCK period      : 3.3 us

avrdude-original: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude-original: Device signature = 0x1e950f
avrdude-original: safemode: lfuse reads as 0
avrdude-original: safemode: hfuse reads as 0
avrdude-original: safemode: efuse reads as 0
avrdude-original: NOTE: "flash" memory has been specified, an erase cycle will be performed
                  To disable this feature, specify the -D option.
avrdude-original: erasing chip
avrdude-original: reading input file "firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex"
avrdude-original: error opening firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex: No such file or directory
avrdude-original: input file firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex auto detected as invalid format
avrdude-original: can't open input file firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex: No such file or directory
avrdude-original: read from file 'firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex' failed

avrdude-original: safemode: lfuse reads as 0
avrdude-original: safemode: hfuse reads as 0
avrdude-original: safemode: efuse reads as 0
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
pi@emonpi(rw):~$

These errors

avrdude-original: reading input file "firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex"
avrdude-original: error opening firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex: No such file or directory
avrdude-original: input file firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex auto detected as invalid format
avrdude-original: can't open input file firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex: No such file or directory
avrdude-original: read from file 'firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex' failed

all relate to an incorrect path.

firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex

is a path only relative to the RFM2Pi folder and you are running the script from /home/pi. The absolute path should be

/home/pi/RFM2Pi/firmware/old/RFM69CW_RF_Demo_ATmega328/RFM12_Demo_ATmega328.cpp.hex

it would be better if you use that path rather than changing the working directory.

1 Like

i correct the script

now i become this

avrdude-original: reading input file "/home/pi/RFM2Pi/firmware/old/RFM12_Demo_ATmega328.cpp.hex"

avrdude-original: error opening /home/pi/RFM2Pi/firmware/old/RFM12_Demo_ATmega328.cpp.hex: No such file or directory

avrdude-original: input file /home/pi/RFM2Pi/firmware/old/RFM12_Demo_ATmega328.cpp.hex auto detected as invalid format

avrdude-original: can't open input file /home/pi/RFM2Pi/firmware/old/RFM12_Demo_ATmega328.cpp.hex: No such file or directory

avrdude-original: read from file '/home/pi/RFM2Pi/firmware/old/RFM12_Demo_ATmega328.cpp.hex' failed

when i look in the directory firmware old i see
pi@emonpi(rw):old$ dir
Full_RF12demo_atmega328  Pre_compiled_ATtiny84_RF12_Demo_hex  RF12_Demo_atmega328  RF12_Demo_atmega328_OLED  RFM2Pi_RF12_Demo

there is no file RF12_Demo_atmega328.cpp.hex

i tried on onother SD after git clone RFM2Pi but there is also no such file

after changing the script update-RFM12.sh in


#!/bin/bash
sudo service emonhub stop
avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:/home/pi/RFM2Pi/firmware/old/RF12_Demo_atmega328/RF12_Demo_atmega328.cpp.hex


sudo service emonhub start

and running it, now its working.

Many thanks for the patience and support

My bad! I simply corrected the path you used from relative to absolute, without checking it was all valid. I guess I had assumed you copied it from an earlier post that was correct, but the path was relative to the repo folder we were discussing.

Glad you got there in the end.

Hello Paul,

I need help again. The new image runs good. It receives the input from node 15.

Unfortunately there are 2 other EmonTX with node 13 and 14 but I don’t become the inputs from these. On the other Pi these inputs come in.

Where can I find the description for setting the Emonhub config.

If you look at the emonhub.conf on the Pi that works, and copy the data for nodes 13 & 14 from that to the second Pi, it should work. The nodes setting looks a little like this:

[[10]]
    nodename = emontx1
    [[[rx]]]
       names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacode = h
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p

[[10]] is the Node ID - you must have both 13 & 14 and you must not have another 13 & 14.
All the other lines will be copied from the ‘good’ Pi.

The full data: emonhub/configuration.md at emon-pi · openenergymonitor/emonhub · GitHub

Hello Paul,

I found several Emonhub.config on my old working image but thy al look incomplete.

Now I set my node numbers in the emonhub script names EmonTX 1 and 2 and it works now.

What wonders me now is that the node 15 isn’t show up in the Emonhub config.

The nodess list up til nr 25 but there is no number 15

You only need a configuration for the Node IDs that you use. If you do not have a Node 15 transmitting data, you do not need a Node 15 in emonhub.conf.

|Node 15| |2s|||||
|Node emontx2| |2s|||||
|Node emontx1| |1s|||||

I know but i get the input from node 15

I do not understand your notation:

What is that?

If you have data from a NodeID = 15, what device is Node 15 and what data is it sending? If you have already in your emonhub.conf file another node specification that matches your Node 15, then copy that.

Sorry for the late reacting.

I have 3 EmonTX running. Node numbers 13, 14 and 15.

Now I see them all when I log in to the Pi ip

What’s wonders me is that in the Emonhub conf there is no node 15

The “standard” NodeID’s have changed over the years, so it is possible that your emonTx and your emonhub.conf have got out of step.

Your solution is to simply copy the setting for an emonTx - ideally one that is working - and change the NodeID to “15”:

[[15]]
    nodename = emontx3
    [[[rx]]]
       names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
       units =W,W,W,W,V,C,C,C,C,C,C,p