ESP32 C3 UART receiving problem

Hi everyone I’m testing my uart pins: if i connect the UART0 tx to the UART1 Rx and run this code

#define RXp1 4
#define TXp1 5


void setup() {
  // put your setup code here, to run once:
 
  Serial1.begin(115200, SERIAL_8N1, RXp1, TXp1);
  Serial.begin(115200);
  Serial.println("Mesaj Gönderildi");
  
 // Serial2.begin(115200, SERIAL_8N1, RXp2, TXp2);
}
void loop() {
    static String deneme;
    static bool one_shot=0;

    if(Serial1.available() && one_shot==0)
    {

     delay(1);
     deneme = Serial1.readString();
     one_shot=1;
     Serial.println("ilk defa girildi");
    }

    //Serial.println("Message Received: ");

   // Serial.println(Serial1.readString());
   // Serial.begin(115200,SERIAL_8N1, RXp1, TXp1);

    Serial.println(deneme);


    delay(100);
}

it works as i expected but if i connect the UART1 Tx to the UART0 Rx and run this code:


#define RXp1 4
#define TXp1 5



void setup() {
  // put your setup code here, to run once:
 
  Serial1.begin(115200, SERIAL_8N1, RXp1, TXp1);
  Serial.begin(115200);
  Serial1.println("Mesaj Gönderildi");
  
 // Serial2.begin(115200, SERIAL_8N1, RXp2, TXp2);
}
void loop() {
    static String deneme;
    static bool one_shot=0;
    delay(10);
    if(Serial.available() && one_shot==0)
    {

     delay(1);
     deneme = Serial.readString();
     one_shot=1;
  
     Serial1.println("ilk defa girildi");
    }

    //Serial.println("Message Received: ");

   // Serial.println(Serial1.readString());
   // Serial.begin(115200,SERIAL_8N1, RXp1, TXp1);

    Serial.println(deneme);


    delay(100);
}

I cant get any output.

To be honest: It’s like a search game that’s no fun and takes time. What is the difference between the two codes? I can’t recognise one. Your code is not self-explanatory and contains no explanatory comments, again something that costs unnecessary time.

Why do you change the default PINs of the ESP32-C3 for Serial1?
The pins you are using are the standard pins of the ESP32-C6. But you have an ESP32-C3 ?! That makes no sense.

But maybe it is all related to this: Esp32c serial screen works but serial commands wont work

I am still waiting for further information from you to be able to help you.
I therefore suggest solving your other problem first.

So it works until you upload a broken sketch and then stops working? Hmm. If it works like you expect, maybe stay with that one?

That’s just disrespectful to volunteers trying to help. Please try to ask better questions.

> 
10c11
<   Serial.println("Mesaj Gönderildi");
---
>   Serial1.println("Mesaj Gönderildi");
17,18c18,19
< 
<     if(Serial1.available() && one_shot==0)
---
>     delay(10);
>     if(Serial.available() && one_shot==0)
22c23
<      deneme = Serial1.readString();
---
>      deneme = Serial.readString();
24c25,26
<      Serial.println("ilk defa girildi");
---
>   
>      Serial1.println("ilk defa girildi");