Use ESP32 dev board as a FTDI card to program esp8266 - Possible ?

nico0032
Posts: 1
Joined: Tue Dec 10, 2019 8:33 pm

Use ESP32 dev board as a FTDI card to program esp8266 - Possible ?

Postby nico0032 » Tue Dec 10, 2019 8:51 pm

Dear all.

I don't have an FTDI card adapter to program an esp8266 (sonoff device) BUT I have an ESP32 dev board ....

I would like to know if it's possible to use tihis ESP32 dev board (wemos lolin32 lite which include a uart adapter CH340 uart) like an FTDI card, So, I would like to:
- create a sketch for my ESP32 (see below) to :
- remap serial 1 to gpio 16/17=rx1/tx1
- pass all the serial information from serial 0 (from the uart), to serial 1
- connect my device to program (a sonoff card esp8266 or alike) to serial 1
- and use esptool as usual to program my sonoff ? esptool.py .... write_flash ...

Any link/ressources will be appreciate.

FYI I plan to use a sketch to my ESP32 inspired by
https://github.com/espressif/arduino-esp32/issues/1314

Code: Select all

void setup() {
  Serial.begin(115200); //From USB
  Serial1.begin(115200, SERIAL_8N1, 16, 17); //To Port 1
}

void loop() {  
  if (Serial.available())           // If user typed something through the USB...
  {      
    Serial1.write(Serial.read());   // Push it through Port 1
  }
  if (Serial1.available())          // If data is received through Port 1 
  {     
    Serial.write(Serial1.read()); // Push it through USB
  }
}
Regards
Nico

fetidpants
Posts: 1
Joined: Mon Jul 06, 2020 12:51 am

Re: Use ESP32 dev board as a FTDI card to program esp8266 - Possible ?

Postby fetidpants » Mon Jul 06, 2020 12:55 am

Did you make any progress on this. I want to do the exact same thing.

My dev board is Adafruit Huzzah32 ESP32 Feather with integrated SiLabs CP2104 USB-to-UART bridge.

I have found some mentions of serial passthru, but no working sketches.

Who is online

Users browsing this forum: No registered users and 70 guests