user31049: I'm successfully running AT commands via the Serial Monitor. But now I'm issuing AT commands via Arduino code and facing problems getting the correct response.
Goal: After issuing AT commands programatically, knowing whether these run successfully or not.
Microcontroller: Arduino Uno
#include<string.h>
#include<SoftwareSerial.h>

#define OK "OK"
#define SERVER_PORT 1234
#define RX_PIN 2
#define TX_PIN 3

SoftwareSerial ESP(RX_PIN, TX_PIN);

void setup() {
  Serial.begin(115200);
  Serial.println("First serial");
  while(!Serial);
  ESP.begin(115200);
  Serial.println("Second serial");
  while(!ESP);
  //Enabling multiple connections
  ESP.println("AT+CIPMUX=1\r\n");
  while (!ESP.available());
  String muxResponse = ESP.readString();
  Serial.print("muxR:");
  Serial.println(muxResponse);
}

void loop() {
  if (ESP.available()) {
    String val = ESP.readString();
    Serial.println(val);
  }
}

After running the above code I get the response in the Serial Monitor like:
muxR:AT+CIPMUX=1


busy p../

OK

I'm getting special characters too.

user38319: change
AT+CIPMUX=1\r\n

to
AT+CIPMUX=1


31049: <p>I'm successfully running AT commands via the Serial Monitor. But now I'm issuing AT commands via Arduino code and facing problems getting the correct response.</p>

<p><strong>Goal:</strong> After issuing AT commands programatically, knowing whether these run successfully or not.</p>

<p><strong>Microcontroller:</strong> Arduino Uno</p>

<pre><code>#include&lt;string.h&gt;
#include&lt;SoftwareSerial.h&gt;

#define OK "OK"
#define SERVER_PORT 1234
#define RX_PIN 2
#define TX_PIN 3

SoftwareSerial ESP(RX_PIN, TX_PIN);

void setup() {
  Serial.begin(115200);
  Serial.println("First serial");
  while(!Serial);
  ESP.begin(115200);
  Serial.println("Second serial");
  while(!ESP);
  //Enabling multiple connections
  ESP.println("AT+CIPMUX=1\r\n");
  while (!ESP.available());
  String muxResponse = ESP.readString();
  Serial.print("muxR:");
  Serial.println(muxResponse);
}

void loop() {
  if (ESP.available()) {
    String val = ESP.readString();
    Serial.println(val);
  }
}
</code></pre>

<p>After running the above code I get the response in the Serial Monitor like:</p>

<pre><code>muxR:AT+CIPMUX=1


busy p../

OK
</code></pre>

<p>I'm getting special characters too.</p>
 38319: <p>change</p>

<pre><code>AT+CIPMUX=1\r\n
</code></pre>

<p>to</p>

<pre><code>AT+CIPMUX=1
</code></pre>
