I can't post other replies in this thread http://openenergymonitor.org/emon/node/10055
so I start a new one continuing here
RFM module is placed as in figure.
The response of last command is:
pi@raspberrypi ~ $ avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400
avrdude-original: Version 5.11.1, compiled on May 23 2012 at 11:08:25
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 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 4
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 | | 0% 0.0Reading | ################################################## | 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: safemode: lfuse reads as 0
avrdude-original: safemode: hfuse reads as 0
avrdude-original: safemode: efuse reads as 0
avrdude-original: safemode: Fuses OK
Re: First open energy project (Part 3)
This output confirms the serial port is working ok, the rfm2pi is connected correctly, the rfm2pi is able to respond and that the bootloader is intact. The best thing to do here is reinstall the firmware as we cannot check that.
First download the firmware
cd /home/pi
sudo service emonhub stop
git clone https://github.com/openenergymonitor/RFM2Pi
If you have an rfm12 type RFM2Pi (with a large oval metal can as per the previous image) use
or if you have rfm69 type RFM2Pi ( flat square can like this image )
cd RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328
avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RFM69CW_RF_Demo_ATmega328.cpp.hex
(that last line has wrapped and is one line from "avrdude" to "hex") assuming the upload is succesful you should just need to restart emonhub. What is the led doing ?
sudo service emonhub start
Re: First open energy project (Part 3)
pi@raspberrypi ~ $ cd RFM2Pi/firmware
pi@raspberrypi ~/RFM2Pi/firmware $ ls
boards.txt RF12_Demo_atmega328_OLED
Full_RF12demo_atmega328 RFM2Pi_RF12_Demo
Pre_compiled_ATtiny84_RF12_Demo_hex RFM69CW_RF_Demo_ATmega328
RF12_Demo_atmega328
pi@raspberrypi ~/RFM2Pi/firmware $ cd RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328
bash: cd: RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328: No such file or directory
pi@raspberrypi ~/RFM2Pi/firmware $ cd RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328
bash: cd: RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328: No such file or directory
pi@raspberrypi ~/RFM2Pi/firmware $
why?
Re: First open energy project (Part 3)
pi@raspberrypi ~/RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328 $ avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RFM69CW_RF_Demo_ATmega328.cpp.hex
avrdude-original: Version 5.11.1, compiled on May 23 2012 at 11:08:25
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 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 4
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 | | 0% 0.0Reading | ################################################## | 100% 0.02s
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 "RFM69CW_RF_Demo_ATmega328.cpp.hex"
avrdude-original: error opening RFM69CW_RF_Demo_ATmega328.cpp.hex: No such file or directory
avrdude-original: input file RFM69CW_RF_Demo_ATmega328.cpp.hex auto detected as invalid format
avrdude-original: can't open input file RFM69CW_RF_Demo_ATmega328.cpp.hex: No such file or directory
avrdude-original: read from file 'RFM69CW_RF_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
pi@raspberrypi ~/RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328 $ sudo service emonhub start
[....] Starting OpenEnergyMonitor emonHub: emonhub has been started o[.ok