I used GPIO39 and GPIO40 in the following test code on the Heltec LoRa 32 V3
// Heltec ESP32S3 LoRa V3 Serial1 test - for loopback test connect pin GPIO40 U1TXD to pin GPIO39 U1RXD"
#define RXD1 39
#define TXD1 40
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(9600, SERIAL_8N1, RXD1, TXD1);
Serial.println();
Serial.printf("\n\nHeltec ESP32S3 LoRa V3 serial1 test pin GPIO%d U1RXD pin GPIO%d U1TXD\n", RXD1, TXD1);
Serial.printf(" for loopback test connect pin GPIO%d U1RXD to pin GPIO%d U1TXD\n", RXD1, TXD1);
Serial.printf("RS232: ESP32S3 GPIO%d RXD1 to TTL/RS232 Rx and GPIO%d TXD1 to TTL/RS232 Tx\n", RXD1, TXD1);
Serial.printf("RS232 - loopback connect 9-pin D-type pin 2 Tx to pin 3 Rx\n");
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}
connecting GPIO39 to GPIO40 to form a loopback the Arduyino IDE serial monitor displays
Heltec ESP32S3 LoRa V3 serial1 test pin GPIO39 U1RXD pin GPIO40 U1TXD
for loopback test connect pin GPIO39 U1RXD to pin GPIO40 U1TXD
RS232: ESP32S3 GPIO39 RXD1 to TTL/RS232 Rx and GPIO40 TXD1 to TTL/RS232 Tx
RS232 - loopback connect 9-pin D-type pin 2 Tx to pin 3 Rx
loopback test 1
loopback test 2 123445676890