ESP8266-01S Stopped responding after second launch Here's the code:

#include &lt;SoftwareSerial.h&gt;
#define RX 6
#define TX 5

String AP = "...";
String PASS = "...";

SoftwareSerial esp8266(RX,TX); 

void setup() {
  Serial.begin(9600);
  Serial.println("Setup started");

  esp8266.begin(115200); // Change this to the factory baudrate used by ESP8266
  delay(1000);

  Serial.println("Setting BAUDRATE to 9600");
  esp8266.println("AT+IPR=9600");
  esp8266.begin(9600);
  delay(500);
  Serial.println("Setup finished");

  reset();
  connectWifi();
}

//reset the esp8266 module
void reset() {
  Serial.println("Resetting...");
  esp8266.println("AT+RST");
  delay(3000);

  if (esp8266.find("OK"))
    Serial.println("Module Reset");
  else
    Serial.println("Module Reset Failed!!!");
}

//connect to your wifi network
void connectWifi() {
  Serial.println("Connecting to Wifi...");
  String cmd = String("AT+CWJAP=\"") + AP + "\",\"" + PASS + "\"";
  esp8266.println(cmd);
  delay(4000);
  Serial.println("Checking Wifi...");
  int ctr=0;
  while(!(esp8266.find("OK"))) {
    if(esp8266.find("ERROR")) {
      Serial.println("Cannot connect to wifi...");
      break;
    }
    delay(50);
    ++ctr;
    if(ctr&gt;10){
      Serial.println("Cannot connect to wifi...");
      break;
    }
  }
  Serial.println("ConnectWifi finished");
}


The ESP8266-01S wires are as follows:


GND to arduino ground
3v3 to arduino 3v3
RX to arduino pin 5
TX to arduino pin 6
EN to arduino 3v3


The thing worked for one time, and when I re-compiled and sent it again without any changes or even button presses, it stopped working. Furthermore, if I connect ESP module directly through arduino rx and tx and connect arduino reset to ground, I still don't get anything. The led on the esp is blinking during data transfers, but everything else doesn't change and I get no response at all.
You need to re-flash your AI Thinker firmware. AT+IPR kills certain versions of the firmware.

Install the latest version of the firmware and use AT+UART_DEF=9600,8,1,0,0 and AT+UART=9600,8,1,0,0. (The former sets the default baud rate, the latter the current baud rate).

You can read more here.