-->
Page 8 of 8

Re: Programming via Esp8266?

PostPosted: Tue Jan 27, 2015 1:31 am
by FPeter
neiljackson wrote:One good way to program the Arduino via WiFi using the ESP8266 would be to connect the ESP8266's Tx and Rx pins to the Arduino's Rx and Tx pins, respectively. However, making this work requires some way of resetting the Arduino so that it runs the bootloader. With a standard 9-pin serial port from a PC (or with a USB-RS232 cable (Prolific, FTDI, etc.)), this reset of the Arduino is achieved by pulling the serial port's DTR pin low. The DTR pin is connected to the Arduino's reset pin (through a capacitor). When DTR goes low, the Arduino resets, runs the bootloader, and if the PC commences programming before the half-second bootloader delay is up, programming proceeds. This is how the Arduino IDE and AVRDude work.

The problem with the ESP8266 is that it does not provide a DTR pin. The eventual solution will likely come in the form of a firmware upgrade for the ESP8266 that supports the RFC 2217 serial-port control protocol. With this (as yet notional) firmware running on the ESP8266, a virtual serial port program (like HWGroup's Virtual Serial Port) that supports RFC 2217 could be used to recreate the DTR pin functionality. When AVRDude commanded DTR to go low, the virtual serial port program would see this request and send the appropriate RFC 2217 commands to make one of the ESP8266's io pins go low. This io pin could be used just like the DTR pin of a real serial port.

Sounds really good - anybody able to modify the firmware to accept DTR commands from host side? In addition, it would be great to program from ArduinoDroid too! :)

Re: Programming via Esp8266?

PostPosted: Tue Feb 03, 2015 3:52 am
by ArnieO
I got the Bysistemasorp method running on an Uno, but ran into some issues when merging the solution into my project, containing an embedded Nano clone.
The issue is the resetting by connecting Arduino D12 to RESET. After some digging, I found that this is not a solution recommended by Atmel for resetting the Arduino by code. The "correct" solution is to use the Watchdog timer (WDT): Enable WDT, start an endless loop and just let WDT run out. The Arduino then does a full reset.
Next issue I ran into was that the bootloader on my Nano (most Nanos out of-the-box?) has an error so that it does not support WDT, so I had to update the bootloader on the Nano. (There are many descriptions on the net on how to do this using a second Arduino board.)

Re: Programming via Esp8266?

PostPosted: Fri Jul 15, 2016 4:15 am
by Checco
Hello i try to program my arduino uno with esp8266...
the result is this:
can you help me?
https://www.dropbox.com/s/09d08cfshpest ... i.jpg?dl=0

Re: Programming via Esp8266?

PostPosted: Sat Jul 23, 2016 4:57 am
by Subhajit Das
Follow this:
http://www.instructables.com/id/Wireless-AVR-Programmer-WiFi/
This method uses AVRISP. First upload succeeds with few sync errors, later ones are very stable.

Or you can use:
https://github.com/jeelabs/esp-link
This method can work with normal arduino upload. But occasionally gives problem (not robust) in my tests at least.