I am trying to flash 8266 using Mega 32U4, which is programmed to act as a serial relay.
This fail, and I have no idea why.
Here is the scenario:
flashing the 8266 with FTDI works like a breeze.
I then hook up the Mega32U4 => ESP like this:
3.3V => VCC
GND => GND
TX => RX
RX => TX
and upload to the Mega32U4 a serial relay program:
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
while(Serial1.available())
Serial.write((uint8_t)Serial1.read());
while(Serial.available())
Serial1.write((uint8_t)Serial.read());
}
I then attempt to use the esptool again, this time, instead of the FTDI, I have the Mega32U4 connected, but I keep getting this error:
`Connecting...
A fatal error occurred: Failed to connect to ESP8266
Any idea what I am doing wrong?