RFM12Pi installation error: "input file RF12_Demo_atmega328.cpp.hex auto detected as invalid format"

Hello everyone...

I have plugged my RFM12Pi in my GPIO ports and I'm following (using raspbian) instructions to install from here:

http://wiki.openenergymonitor.org/index.php?title=RFM12Pi_V2

I got to:

avrdude -v  -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex

but I get this in return:

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
done with autoreset
                  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.05s

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 "RF12_Demo_atmega328.cpp.hex"
avrdude-original: input file RF12_Demo_atmega328.cpp.hex auto detected as invalid format
avrdude-original: invalid input file format: -1
avrdude-original: read from file 'RF12_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

What is wrong?

Thanks!
 

ukmoose's picture

Re: RFM12Pi installation error: "input file RF12_Demo_atmega328.cpp.hex auto detected as invalid format"

Your input file RF12_Demo_atmega328.cpp.hex has been detected as invalid format.  Have you tried re-downloading it and trying again?

ltpitt's picture

Re: RFM12Pi installation error: "input file RF12_Demo_atmega328.cpp.hex auto detected as invalid format"

Totally right!

I've deleted the folder and downloaded it again from git.

Now it hangs when I run:

avrdude -v  -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex

I can wait even for 10 minutes and nothing happens.

If I open another console and I do:

ps aux | grep avrdude

I get an incredibly long list of process that looks more or less like the few I paste here:

root      8740  0.4  0.1   1936   532 pts/1    S+   22:24   0:00 strace -o |autoreset -eioctl /usr/bin/avrdude-original -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
root      8745  0.2  0.1   1756   516 pts/1    S+   22:24   0:00 /bin/sh /usr/bin/avrdude-original -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
root      8754  1.0  0.3   5292  1696 pts/1    S+   22:24   0:00 sudo strace -o |autoreset -eioctl /usr/bin/avrdude-original -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
root      8771  1.0  0.1   1936   524 pts/1    S+   22:24   0:00 strace -o |autoreset -eioctl /usr/bin/avrdude-original -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
root      8773  0.0  0.0    368    92 pts/1    R+   22:24   0:00 /bin/sh /usr/bin/avrdude-original -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RF12_Demo_atmega328.cpp.hex
(SNIP)

What am I doing wrong?
I just read the tutorial from the 1st post and follow it row by row...

ps
Investigating further I've found out that simply digiting:

avrdude

hangs up my pi...

ltpitt's picture

Re: RFM12Pi installation error: "input file RF12_Demo_atmega328.cpp.hex auto detected as invalid format"

I gave up using the Raspberry (probably I did something wrong installing avrdude there) and used my usbtinyisp to program the little thing:

C:\Users\Pitto\Desktop\rf12\RF12_Demo_atmega328>avrdude -c usbtiny -p ATMEGA328P
-U flash:w:RF12_Demo_atmega328.cpp.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "RF12_Demo_atmega328.cpp.hex"
avrdude: input file RF12_Demo_atmega328.cpp.hex auto detected as Intel Hex
avrdude: writing flash (7530 bytes):

Writing | ################################################## | 100% 4.78s

avrdude: 7530 bytes of flash written
avrdude: verifying flash memory against RF12_Demo_atmega328.cpp.hex:
avrdude: load data flash data from input file RF12_Demo_atmega328.cpp.hex:
avrdude: input file RF12_Demo_atmega328.cpp.hex auto detected as Intel Hex
avrdude: input file RF12_Demo_atmega328.cpp.hex contains 7530 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.28s

 

avrdude: verifying ...
avrdude: 7530 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

I hope now I'll be able to use it :)

Thanks again!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.