Stuck with ESP-12E

Hello, friends.

I would rather to overcome this by my own, but here I am asking for help. :frowning:

I'm trying to use an ESP-12E as WiFi shield for Arduino (I know it has a higher potential, but I need all I/O's from my Mega). So, my saga started...

I set the pins as the datasheet recommends for normal mode (as we can see here: http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf) and then I tried to check the communication with the ESP by sending AT commands using following code (Got no response):

#include <SoftwareSerial.h>
SoftwareSerial ESPserial(15, 14); // RX | TX
 
void setup() 
{
    Serial.begin(19200);     // communication with the host computer
    //while (!Serial)   { ; }
 
    // Start the software serial for communication with the ESP8266
    ESPserial.begin(19200);  
 
    Serial.println("");
    Serial.println("Remember to to set Both NL & CR in the serial monitor.");
    Serial.println("Ready");
    Serial.println("");    
}
 
void loop() 
{
    // listen for communication from the ESP8266 and then write it to the serial monitor
    if ( ESPserial.available() )   {  Serial.write( ESPserial.read() );  }
 
    // listen for user input and send it to the ESP8266
    if ( Serial.available() )       {  ESPserial.write( Serial.read() );  
    }
}

Changed the ESP, and tried with a different one. Nothing changed. Still "mute".

So, after reading some experience reports, I noticed the ESP-12E might be "hollow", I mean, without the default firmware (or carrying something like the bareMinimum sketch). Then I tried to flash some firmware using arduino as FDTI controller (I do not have the converter right now). First, uploaded the BareMinimum to Arduino, and then, as the datasheet recommends, I've put the GPIO0 and GPIO2 to high (after this, the LED of ESP stopped blinking when powered up; in first situation, normal mode, it blinks twice), put the ESP RX to Mega RX, and ESP TX to Mega TX (through a logic converter), and followed these steps: Yet Another Arduino Blog: Flashing ESP8266 firmware v1.5 using Arduino Uno

Got the "chip sync failed response" with my two ESP's. Tried all Baud Rates...

So, now I'm unable to communicate with ESP and to flash a new ROM.

Here's my initial configuration:

ESP - ARDUINO
Vcc - 3.3v
GND - GND
GPIO15 - GND
GPIO0 - GND
GPIO2 - 3.3v
RST - 3.3v
CH_EN - 3.3v
TX - 14
RX - 15 (using TTL step down).

PS - I'm using pins 14 and 15 in this sketch, properly described in code.

For flashing mode, it is (changes in red):
ESP - ARDUINO
Vcc - 3.3v
GND - GND
GPIO15 - GND
GPIO0 - 3.3v
GPIO2 - 3.3v
RST - 3.3v
CH_EN - 3.3v
TX - TX (using TTL step down).
RX - RX (using TTL step down).

The only recommendation I'm not following is to provide an external power source exclusive to ESP because in the ESP datasheet it shows that the maximum DC current is 170mA, and the Arduino can provide up to 200mA (am I right?). For this, I have a 9V source plugged to assure the "full power". (Could be this the problem?)

What I'm missing?
Is there a "debug" from the ESP led behaviour?

Any guidance here would be more than welcome!
Thank you!

GPIO0 goes to GND for flashing

Hello.

Wow! Are you sure? Because in the datasheet it is marked as HIGH (see image attached, or page 8 of the document: http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf;Is there any chance that this document is wrong?).

Thank you!

*** EDIT ***

After your comment, I've searched for "GPIO0 function", and got the following information:

So, it might be a misinterpretation of mine (or from the person that elaborated the datasheet I used as reference)...

I'll try your suggestion! Thank you very much!

You need to figure out what words you're going with.

"Normal" booting, like running whatever program you've got on there as it should, could be called "boot from flash"
which is not the same as
"flashing firmware" or "uploading sketch" or "writing program to the board" or whatever else you want to call it.

I highly doubt you saying "flashing mode" means "normal operation". It sounds to me like you're trying to upload code. That's programming, that's GPIO0 LOW.

Hello!

After my previous embarassment in misunderstanding the meaning of the running modes names, I decided to use my Uno as FDTI controller to check if everything is OK with the ESP (running it in normal mode, with GPIO0 high).

Well, now I can "hear" the ESP using a serial monitor when it boots up (I'm using Termite; see boot message below) with the Baud Rate of 19200.

TØ[13]cÄԖ›sBǯXBéßœÿ\eÂ[12]ô[19]óá[15]ÇÑ8ÕŠáŸø[1B]Çü|_R[14]ëÐø[1B]Û[13]ÂzD–¾[18]cS[15]kt[13]AßW¹S[1D][13]–xÆ[18]rSüÿ
Ai-Thinker Technologyðg.

ready

But after that I'm unable to get inteligible responses from AT tests... I only get "garbage", suggesting the baud rate is wrong. But I tried all the rates, and none of them give me a response that I could understand. (tried "AT" and "AT+GMR").

Also tried to flash a new firmware using the ESP DOWNLOAD TOOL, but got "chip sync response" every try... double and triple checked the GPIO0 on low, and the flash set-up (crystal frequency, QIO, Flash size, etc...).

Is this supposed to be that complicated, or I'm unlucky? Every step I try to make give me a different problem.

Have any of you had a similar experience? :frowning:

*** UPDATE ***

Apparently it was a "luck" issue. I've got another ESP, and now it's fine.

Thank you!