I am trying to get the response from server using AT commands. This is my program

#include <SoftwareSerial.h>

const byte rxPin = 2; // Wire this to Tx Pin of ESP8266
const byte txPin = 3; // Wire this to Rx Pin of ESP8266

// We'll use a software serial interface to connect to ESP8266
SoftwareSerial ESP8266 (rxPin, txPin);

void setup() {
  ESP8266.begin(115200); // Change this to the baudrate used by ESP8266
  delay(1000); // Let the module self-initialize

void loop() {
  Serial.println("Sending an AT command...");


  while (ESP8266.available()){
     String res = ESP8266.readStringUntil('\t');


My server is just sending just one string as the output.

My console is getting this kind of output? Is there a way to clean this?

Sending an AT command...

Sending an AT command...

I read thread and changed SoftwareSerial.h file. But still no luck.

Thanks in advance.

  • 1
    why do you not use a library? WiFiEsp for example? – Juraj Dec 22 '17 at 9:49
  • 2
    You can't use SoftwareSerial reliably at 115200 baud. – Majenko Dec 22 '17 at 10:08
  • @Majenko Yes, I tested even for 9600 – Sachith Muhandiram Dec 22 '17 at 10:15
  • @Juraj can you given me an example? I had been looking for this days. – Sachith Muhandiram Dec 22 '17 at 10:15
  • github.com/bportaluri/WiFiEsp – Juraj Dec 22 '17 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.