Serial2 not receiving bytes on wt32-eth01

I have two wt32-eth01 V1.2 boards and they are acting the same. Here are my issues:

I can xmit out of Serial2 fine but I cannot receive serial2 packets.
I have an o'scope on Serial2 RXD pin and I see the waveform and I also see the Serial2 LED light up indicating that my packet is at that RXD pin.
I selected a very simple example to Serial2.available() and print to the Serial monitor but I never get any bytes.
I tried different baud rates for the Serial.print statements but I never get data from RXD.

What am I doing wrong?

Posting in the wrong section?

Your topic was MOVED to its current forum category which is more appropriate than the original as it is not an Introductory Tutorial

I thought I had it fixed. I used a loopback wire on the serial2 and I finally received some bytes. I went on a walk and came back and now I cannot get it to work. I still see both Rx and Tx LEDs blinking but my simple code is not receiving any loopback bytes.

I am using an external power supply.

Do I need a resistor somewhere? My o'scope shows that the Rx signal goes from 3.3V all the way to 0V. It appears there is a strong signal.

I installed Arduino 2.0 on my Windows 11 laptop. I still cannot see that Serial2.available() > 0.

The wt32-eth01 RXD LED and my o'scope show that there is a signal there.

Is there a work-around for seeing the serial data at the Rx pin. I configured the Rx pin for a digital read and it works properly.

I found some schematics for the wt32-eth01. It appears that the designer named IO35_RXD2 coming off of the ESP32_WT32-S1 chip. I'm not sure why. The document named IO35 as an input only. I tried connecting my lookback from TXD (IO17) to this IO35 input pin but I still do not get any bytes at the serial input.

I finally got the RXD to work. I used the newer Arduino 2.0 and set the HW flow control OFF and it started reading the packets.

Hello

I have same issue, how to set HF flow control OFF?
Thank you

I use Arduino 2 IDE. I type “Serial2.” And it gives me several method options. I’m not near my computer so I can’t give you he exact method. You can also look in the header file.

I use arduino 2.0, and here is my code :

void setup() {
  // put your setup code here, to run once:
  Serial2.begin(9600);
  Serial2.setPins(35,17);
  Serial2.setHwFlowCtrlMode(2,64);
  

}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial2.available()){
    char a = (char)Serial2.read();
    Serial2.print(a);
  }

but still can't receive any data in serial2.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Got it, thank you for your advise. I have revised it

I have tried this code too:

void setup() {
  // put your setup code here, to run once:
  Serial2.begin(9600,SERIAL_8N1,35,17);
  //Serial2.setPins(35,17);
  //Serial2.setHwFlowCtrlMode();
  
  Serial2.setHwFlowCtrlMode(HW_FLOWCTRL_DISABLE);
  

}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial2.available()){
    char a = (char)Serial2.read();
    Serial2.print(a);
  }

}

But still remain the same..

Finally I solved the problem. The RX pin is GPIO5, not GPIO35.
At the beginning I refer to this pin out detail :

It tells me that RX pin is GPIO35, but I check again in the the datasheet from official distributor ( wirelestag) the RX pin is GPIO5. After I change, it works.
Here is my works code :

#include <HardwareSerial.h>

void setup() {
  // put your setup code here, to run once:
  Serial2.setPins(5, 17);
  Serial2.begin(921600, SERIAL_8N1, 5,17);
  Serial2.setHwFlowCtrlMode(HW_FLOWCTRL_DISABLE);
  

}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial2.available()>0){
    char a = (char)Serial2.read();
    Serial2.print(a);
  }

}

Thank you everyone

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.