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!