I am getting no response back from an ESP8266 WIFI with Arduino Mega using library ITEADLIB_Arduino_WeeESP8266.

//serial monitor response

setup begin

FW Version:

to station + softap ok

Join AP success


single ok

setup end

create tcp ok

release tcp ok

create tcp ok

Arduino Mega Code

#include "ESP8266.h"
#include <SoftwareSerial.h>

#define SSID        "atmel"
#define PASSWORD    "bets12345"
#define HOST_NAME   "www.google.com"
#define HOST_PORT   (80)

SoftwareSerial mySerial(10, 11); /* RX:D3, TX:D2 */ ESP8266 wifi(mySerial);

void setup(void) {
  Serial.print("setup begin\r\n");
  Serial.print("FW Version:");
  if (wifi.setOprToStationSoftAP()) {
    Serial.print("to station + softap ok\r\n");
  } else {
    Serial.print("to station + softap err\r\n");
  if (wifi.joinAP(SSID, PASSWORD)) {
    Serial.print("Join AP success\r\n");
    Serial.println( wifi.getLocalIP().c_str());
  } else {
    Serial.print("Join AP failure\r\n");
  if (wifi.disableMUX()) {
    Serial.print("single ok\r\n");
  } else {
    Serial.print("single err\r\n");
  Serial.print("setup end\r\n");

void loop(void) {
  uint8_t buffer[128] = {0};
  if (wifi.createTCP(HOST_NAME, HOST_PORT)) {
    Serial.print("create tcp ok\r\n");
  } else {
    Serial.print("create tcp err\r\n");
  char *hello = "Hello, this is client!";
  wifi.send((const uint8_t*)hello, strlen(hello));
  uint32_t len = wifi.recv(buffer, sizeof(buffer), 10000);
  if (len > 0) {
    for(uint32_t i = 0; i < len; i++) {
  if (wifi.releaseTCP()) {
    Serial.print("release tcp ok\r\n");
  } else {
    Serial.print("release tcp err\r\n");
  • Have you tried a hard reset? – PhillyNJ Jul 22 '16 at 20:12

Rx and Tx properly crossed - SwSerial Rx to ESP Tx and SwSerial Tx to ESP Rx? And the connections are sound? It wouldn't be the first time "someone" thought he'd killed an ESP, only to find a missing connection from its transmitter (not that I'd know anything about that ..... ;)


Have you remembered to logic shift the ESP8266 from 3.3v to 5v?

Any by no response, do you mean no response from your web server or the board itself?

  • ya 3.3 V is ok,AT command work fine,using library ITEADLIB_Arduino_WeeESP8266,no response print back in serial monitor.as describe above. – shadab Apr 22 '16 at 13:34
  • just like we want to get version of it.Serial.println(wifi.getVersion().c_str());,no response printed. – shadab Apr 22 '16 at 13:37
  • If you send it "AT+GMR", does it respond then? – Slason Apr 22 '16 at 13:40
  • If you look in the source code for the library, wifi.getVersion() sends AT+GMR and returns it. I think the GMR command was added in a firmware update, which could mean you are running an old firmware which does not support AT+GMR – Slason Apr 22 '16 at 13:46

If you are using an ESP-01 board (which is an ESP8266 based board) You should try running the ESP8266 from an independent 3.3V power supply.

The Arduino Mega 3.3V pin only supplies up to 50mA, wheres as the ESP8266 requires up to 200mA.

Also, make sure the CH_PD and RESET pins are held high (connected to the 3.3V).

Because you're using an Arduino Mega, you might find it beneficial to use pins 16 and 17, and Serial2 instead of software serial. Internet sources indicate that they are sometimes set up with a baud rate of either 9600, 57600 or 115200. I managed to get mine working with 115200, but software serial is limited to a baud rate of 19200.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.