Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

Hello, I just updated my emonpi but it seems that AVR's flashing is failing. I get this error :

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: 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 "/home/pi/emonpi/Atmega328/emonPi_RFM69CW_RF12Demo_DiscreteSampling
​  /compiled/emonPi_latest.hex"
avrdude-original: input file /home/pi/emonpi/Atmega328/emonPi_RFM69CW_RF12Demo_DiscreteSampling
​  /compiled/emonPi_latest.hex auto detected as Intel Hex
avrdude-original: writing flash (32768 bytes):

Writing | #################################################  | 98% 2.80s
avrdude-original: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10
avrdude-original: stk500_cmd(): programmer is out of sync

I tried to run it manually after stopping emonhub but if fails with the same error. It always fails at 98%

Any idea where this error can come from ?

Thanks.

JS

 [Long lines wrapped & font size reduced for legibility. Moderator (RW)]

glyn.hudson's picture

Re: Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

Are you using a RasPi3? This is a known issue, I'm working ona fix? Have you any clues as to what could be the issue? 

What image build are you running? 

$ ls /boot | grep emonSD
glyn.hudson's picture

Re: Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

Seems like this is not a RasPi3 specific issue. It seems to affect Pi2s also after a rpi-update

Have you ran an update or rpi-update? 

pb66's picture

Re: Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

See "BEWARE BEFORE UPDATING !!!".  If it's the same as I'm seeing, even emonhub cannot write to emonpi/rfm2pi.

Paul

glyn.hudson's picture

Re: Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

Hi Paul, I've figured it out. This is a separate issue from the serial port issue after update. The AVR upload issue was caused by a corrupted emonPi V2.4 .hex file

glyn.hudson's picture

Re: Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

The corrupted V2.4 .hex file on emonPi firmware github that was causing this issue has now been fixed. Please try emonPi update again and confirm it flashes successfully for you. Sorry for the hassle. 

jsroques's picture

Re: Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10

Hello Glyn,

With to the new hex file, it works now :-)

Thanks you !

JS

Comment viewing options

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