ESP8266MOD - Client/AP works, Serial connection doesn't

Hello friends,

Recently I've been strugling with some issues with my new ESP8266MOD (Vendor: AITHINKER) board.

I bought it together with breakout board, soldered it and connected it to my Arduino Uno using following settings:

Arduino Uno ::: ESP8266 3v3 ::: VCC 3v3 ::: CHPD GND ::: GND TX ::: RX RX ::: TX

( -- No external Power Supply at this point -- )

Started it using Serial Monitor and it was working from start. I was able to send AT commands directly from Serial Monitor and tested a lot of options. I've configured ESP8266 to act as AP and Client at same time and it was working without any issues. Next step was for me was to be able to send controls by using regular Arduino Digital pins, SoftwareSerial for ESP8266 communication and Serial as regular command input/output. At this point I've just changed TX and RX connectivity to pins 8 and 9. This was also working fine (except some gabage characters when I try to read from serial, especially with AT+CWLAP, I get few gibberish characters). My baud rate was at this point 115200 for Serial and SoftwareSerial (ESP8266 initialization).

( -- At this point I was using external PS 3.3v -- ) I wanted to test what would be the results if I change baudrate of ESP8266 to be 9600, so, once again, I've reconnected TX and RX pins to the TX/RX pins of the Arduino Board. Changed rate to 9600 (AT+UART=9600,8,1,0,3), tried to re-connect pins to digital pins, and I couldn't read any data from SoftwareSerial any more. I was trying to connect it to RX/TX pins again but none of my AT commands were sent (or recieved), they weren't displayed in Serial Monitor, and no output was printed. From that point I was searching for solutions and tried a bunch of different things ( connecting GPIO0, GPIO15, GPIO02 of ESP8266 to VCC/GROUND... Changing Baudrates... using putty) but nothing works. When I try to call .available() method, I always get false, like the device is not inserted.

What is more strange is that I'm able to ping device from cmd (still connected to my home router) and I still see that it's active as Access Point, so I guess that device is still working. One thing that I've noticed is that once I remove ground or VCC pins from ESP8266 and put them back on, blue led blinks (and it's blinking from time to time), I get some gibberish characters (for all Baud rates).

|500x138

Also, I've noticed that when I try to send AT command only RX pin blinks (can't recall if at one point only TX blinked, but they weren't blinking both when I try to send command). When I try to upload some basic sketch to Arduino Board, they are both working and sketch gets uploaded, so I guess that pins are also working without any issues. There were no use-cases that I've seen anywhere on the forum that people had similar issues, that board was working as AP/Client but couldn't connect to it.

This module worths about 6$, and I could easily order a new one, but it really bothers me to be so helpless in a situation like this. I've spent like 15 working hours trying to figure what's going wrong. Could it be that somehow I've burnt the chip? But why is then AP/Client mode working on it.

Is there a way to diagnoze what went wrong and what is actually an issue, Arduino board or ESP8266 module? Also, is there a way to hardware reset and empty the EEPROM from ESP8266 (I've read that it's possible to do it by going from RXD to TXD of ESP8266 boards)

Best Regards, Ivan

ivand88: I was trying to connect it to RX/TX pins again but none of my AT commands were sent (or recieved), they weren't displayed in Serial Monitor, and no output was printed.

Serial Monitor is connected to RX/TX on your Arduino so you can't use it for communication with both the ESP8266 and Serial Monitor, it's one or the other.

ivand88: Is there a way to diagnoze what went wrong and what is actually an issue, Arduino board or ESP8266 module?

If you're able to upload to your Uno that would indicate that hardware serial is still working on that board but just to be sure, try this with the ESP8266 not connected to your Uno:

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("hello");
  delay(1000);
}

That should print "hello" to the Serial Monitor once a second.

It's very useful to have an FTDI breakout board or FTDI cable. This will allow you to send AT commands directly to the ESP8266 from Serial Monitor without any possibility that your Uno is causing problems.

ivand88: Also, is there a way to hardware reset and empty the EEPROM from ESP8266

ESP8266 doesn't have EEPROM, you're probably thinking of flash. You wouldn't want to "empty" the flash because that's where the AT firmware you're using to communicate and control the ESP8266 is stored. You could reinstall the AT firmware though, I'm not sure if it would help or not. You would either need to send the AT+CIUPDATE command to the ESP8266 using the Uno(which you can't do if they are not communicating) to do an OTA firmware update or you need an FTDI breakout/cable(or similar chip) to do a manual AT firmware update using the FLASH_DOWNLOAD_TOOL program available from the Espressif website.