title: How can I get an AT response from the ESP 12S via the Arduino Mega?
body: <p>I am currently working on an AT communication project for Arduino Mega and ESP8266 ESP 12S.
  We are having some technical issues and would like to ask a question.</p>
  
  <hr>
  
  <p>First of all, the parts list I currently have is:</p>
  
  <p>Arduino Mega</p>
  
  <p>FTDI converter</p>
  
  <p>ESP 12S + Break out board (soldered)
  (<a href="https://rads.stackoverflow.com/amzn/click/com/B07N192V7Z" rel="nofollow noreferrer" rel="nofollow noreferrer">https://www.amazon.com/YwRobot-ESP-12S-Wireless-Transmissions-Compatible/dp/B07N192V7Z</a>)
  (I bought the same parts elsewhere.)</p>
  
  <p>DC to DC conveter</p>
  
  <hr>
  
  <p>The pinout at the time of the firmware update is as follows:</p>
  
  <p>PIN &lt;- Serial Adapter</p>
  
  <p>RESET &lt;-3.3V</p>
  
  <p>CH_PD &lt;-3.3V</p>
  
  <p>VCC &lt;-3.3V</p>
  
  <p>GPIO0 &lt;-3.3V</p>
  
  <p>GPIO15 &lt;-GND</p>
  
  <p>GND &lt;-GND</p>
  
  <p>RX &lt;-TX</p>
  
  <p>TX &lt;-RX</p>
  
  <p>Instead of using the four pins on the bottom, I connected directly to the pins on both sides.</p>
  
  <p>No resistance was connected at the time of connection.</p>
  
  <p>After updating the firmware, I received the following message.</p>
  
  <p>Leaving ....</p>
  
  <p>Failed to leave Flash mode</p>
  
  <p>Thus, we determined that the firmware was updated successfully.</p>
  
  <hr>
  
  <p>After that, I tried to get an AT response using a serial monitor by changing the pinout.</p>
  
  <p>The other pinout is as follows:</p>
  
  <p>PIN Serial Adapter</p>
  
  <p>RESET &lt;-3.3V (pull up)</p>
  
  <p>CH_PD &lt;-3.3V (pull up)</p>
  
  <p>VCC &lt;-3.3V (by DC to DC Conveter)</p>
  
  <p>GPIO0 &lt;-3.3V (pull up)</p>
  
  <p>GPIO15 &lt;-GND (pull down)</p>
  
  <p>GND &lt;-GND (Connected to VCC and 100nF Capacitor.)</p>
  
  <p>RX &lt;-TX (I soldered it to the breakout board so no resistors were connected at the time.)</p>
  
  <p>TX &lt;-RX</p>
  
  <hr>
  
  <p>Here is the code I used:</p>
  
  <p>&sharp; include &lt; SoftwareSerial.h ></p>
  
  <p>void setup ()
  {</p>
  
  <p>  uint32_t baud = 115200;</p>
  
  <p>  Serial.begin (baud);</p>
  
  <p>  Serial2.begin 115200;</p>
  
  <p>  Serial.print ("SETUP !! @");</p>
  
  <p>  Serial.println (baud);</p>
  
  <p>  Serial2.println ("AT \ r \ n");</p>
  
  <p>}</p>
  
  <p>void loop ()</p>
  
  <p>{</p>
  
  <p>  while (Serial2.available ()> 0)
    
  {</p>
  
  <p>    char a = Serial2.read ();</p>
  
  <p>    if (a == '\ 0')</p>
  
  <p>      continue;</p>
  
  <p>    if (a! = '\ r' &amp;&amp; a! = '\ n' &amp;&amp; (a &lt;32))</p>
  
  <p>      continue;</p>
  
  <p>    Serial.print (a);</p>
  
  <p>  }</p>
  
  <p>  while (Serial.available ()> 0)</p>
  
  <p>  {</p>
  
  <p>    char a = Serial.read ();</p>
  
  <p>    Serial.write (a);</p>
  
  <p>    Serial2.write (a);</p>
  
  <p>  }</p>
  
  <p>}</p>
  
  <p>No AT response has been received with the current serial monitor.</p>
  
  <hr>
  
  <p>So I tried again with different pinout as follows:</p>
  
  <p>PIN Serial Adapter</p>
  
  <p>VCC &lt;-5V (by DC to DC Conveter, break out board has been confirmed to operate at 5V)</p>
  
  <p>GND &lt;-GND</p>
  
  <p>RX &lt;-TX (I soldered it to the breakout board so no resistors were connected at the time.)</p>
  
  <p>TX &lt;-RX</p>
  
  <p>Even if I changed both the baud rate of the code and the baud rate of the serial monitor, I could not 
  receive a response.</p>
  
  <p>I have connected both pull up and pull down resistors and not connected resistors.</p>
  
  <p>But the result was the same.</p>
  
  <p>So I tried to upload a Blink example using FTDI Converter without using Arudino Mega.</p>
  
  <p>pinout was the same as the firmware update.</p>
  
  <p>But this didn't work either.</p>
  
  <p>Currently, Arudino Mega cannot communicate with the ESP 12S, nor can it communicate with the FTDI Converter.</p>
  
  <hr>
  
  <p>However, when the baud rate is 74880, press the reset button and the following trouble shooting is 
  output on the serial monitor.</p>
  
  <p>ets Jan 8 2013, rst cause: 2, boot mode: (3,6)</p>
  
  <p>load 0x40100000, len 612, room 16</p>
  
  <p>tail 4</p>
  
  <p>chksum 0xef</p>
  
  <p>load 0x00000000, len 0, room 4</p>
  
  <p>tail 0</p>
  
  <p>chksum 0xef</p>
  
  <p>ho 12 tail 0 room 4</p>
  
  <p>load 0x00000000, len 0, room 12</p>
  
  <p>tail 0</p>
  
  <p>chksum 0xef</p>
  
  <p>csum 0xef</p>
  
  <p>csum err</p>
  
  <p>ets_main.c</p>
  
  <hr>
  
  <p>So the question I would like to ask is:</p>
  
  <p>**1. I wonder if I pinout with the ESP 12S.</p>
  
  <ol start="2">
  <li><p>There is no need to update the firmware because it is already made for the convenience of use.
  Is there a way to get it back?</p></li>
  <li><p>There is a RST button and a PROGRAM button on the ESP 12S Break out board.</p></li>
  <li><p>What should I do if I want to solve the trouble shooting mentioned above?</p></li>
  <li><p>I want to determine if the ESP 12S is out of order. Is there a proper way to judge this?
  In addition to the attempts mentioned above, there are various ways of connecting and proceeding, so I suspect that the device is broken.</p></li>
  <li><p>I do not want to break down next time. Is there a way to connect securely?</p></li>
  <li><p>Please tell me anything else you need to point out!**</p>
  
  <p> 
  Finally, thank you for reading this long article, and thank you for your lack of communication using the translator.</p></li>
  </ol>
  
  <p>When I call Esp 12s AT, it's so eager to get an OK.</p>