Basically im trying to communicate bewtween my ESP32 (WT32-S1) and my USB FTDI (hw-417-v1.2) when I run it in the Arduino IDE I get the error "Failed to connect to ESP32: Serial data stream stopped: Possible serial noise or corruption." Not too sure why this happens, I've plugged in the WT32 to the FTDI as follows:
WT32 RXD - FTDI TXD
WT32 TXD - FTDI RXD
WT32 GND - FTDI GND
WT32 5V - FTDI 5V
The FTDI is directly plugged into my PC and I've installed the necessary drivers as far as I know. Fair to mention its communicating serially with my arduino uni using SoftwareSerial. Here is the code ESP32 side:
#include <SoftwareSerial.h>
#define MYPORT_TX 15
#define MYPORT_RX 14
SoftwareSerial myPort(MYPORT_RX, MYPORT_TX);
void setup() {
Serial.begin(115200);
myPort.begin(115200);
}
void loop(){
Serial.println(myPort.read()); // read from software serial interface, write to hardware serial
myPort.println(Serial.read()); // read from hardware serial interface, write to software serial
}
Code Arduino uno side:
#include <SoftwareSerial.h>
SoftwareSerial serial2(5, 6); // choose pins that are not being used by anything else
void setup() {
Serial.begin(115200);
serial2.begin(115200);
}
void loop(){
Serial.println(serial2.read()); // read from software serial interface, write to hardware serial
serial2.println(Serial.read()); // read from hardware serial interface, write to software serial
}
The connection from WT32 to Arduino Uno is as follows:
WT32 GND - Uno GND
WT32 IO15 - Uno 5
WT32 IO14 - Uno 6
Main issue as said is the "Failed to connect to ESP32: Serial data stream stopped: Possible serial noise or corruption.", mentioning the rest to give you a full picture.
Cheers!
1 Answer 1
Ive solved my problem, to any other people who have this problem, make sure you use a CP2102 instead, and plug according to this:
CP2101 WT32
TXD ----- RX0
RXD ----- TX0
GND ----- GND
5V ----- 5V
Then plug the WT32 IO0 pin to GND to enter download mode, I'm personally using an external 5v PS as the WT32 needs quite a lot of power.
115200
baud? If not, you need to make sure the code matches. Edit: Hmm, though you mention SoftwareSerial works, which is interesting.