Yes, this is an interesting project. I have an “old” EmonTx board in the basement and doing firmware updates proved to be an hassle… unscrewing, screwing, etc…
I decided to buy a few Wemos mini boards. These are quite compact and include the programmer. You need a special driver for Windows. Then, I made a quick project consisting of monitoring my gas consumption. I upload the data on emoncms.org through my second router located nearby. So far, so good.
In this thread, Glyn mentionned ESP8266AVRISP sketch. I had a look. In short, I did not manage to upload any sketch via Wifi to my “end destination” !
Did you manage to?
What I have done:
Upgrade Arduino IDE to 1.6.10. Avrdude doesn’t work with 1.6.9 in Windows for this specific task.
My schema: Wemos board is connected to an Arduino UNO via the SPI pins. There is a level translator (14050) on MISO pin because Wemos is 3.3 V.
Once wemos is loaded with the Arduino_Wifi_AVRISP sketch, it is ready to accept data:
I am getting this:
Arduino AVR-ISP over TCP
IP address: 192.168.0.19
Use your avrdude:
avrdude -c arduino -p <device> -P net:192.168.0.19:328 -t # or -U ...
My avrdude command: (I put avrdude.conf and the hex file in the same folder)
avrdude -v -C avrdude.conf -c arduino -p atmega328 -P net:192.168.0.19:328 -U flash:w:Blink.cpp.hex:i
By the way, it’s the first time I use avrdude on the CLI. I am getting all kind of information but nothing is really positive…
avrdude: Version 6.3, compiled on Jun 22 2016 at 16:05:21
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "avrdude.conf"
Using Port : net:192.168.0.19:328
Using Programmer : arduino
avrdude: ser_drain(): read error: ParamÞtre incorrect.
avrdude: ser_drain(): read error: ParamÞtre incorrect.
avrdude: ser_drain(): read error: ParamÞtre incorrect.
AVR Part : ATmega328
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
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 4728160
Firmware Version: 0.2
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10
avrdude done. Thank you.
Am I missing something?
Thanks for your help.
Walter