1
votes

I bought a new ESP8266 WIFI module (8pins) and flashed firmware (from https://raw.githubusercontent.com/nodemcu/nodemcu-flasher/master/Win32/Release/ESP8266Flasher.exe) it using arduino Duemilanove correctly. I have gone through many troubleshooting steps, but on reset module does give some gibberish response, but no Ready/OK response from "AT" command.

Red LED of module is always on but Blue light is off.

Steps taken :-

  1. To supply enough current i used Beaglebone 3V3 supply as module Vcc. But i'm not able to receive any response from AT commands.

  2. Arduino Tx (5V) has brought down to 3v3 using voltage divider and connected to Rx

  3. In Flash settings ensured baud rate was 115200 and all settings correct
  4. Module is working fine presumably as tried with 2 more modules same thing

Here's my connections:

//////////////////////////////////////////////////////////////////////////////
    ///////                         CONNECTIONS              ////////
    /////////////////////////////////////////////////////////////////////////////
    /*
    ESP8266 VCC -> BeagleBone 3.3
    ESP8266 GND -> Common GND (Arduino & BeagleBone)
    ESP8266 CH_PD -> 3K resistor -> VCC
    ESP8266 RST -> VCC or pin 13(arduino)
    GPIO CAB BE LEFT OPEN OR TIED HIGH
    ESP8266 Tx -> pin2 (Arduino software serial Rx)
    ESP8266 Rx <- Voltage Divider <- pin3 (Arduino software serial Tx)
    */

Here's my code

#define esp8266 Serial2
#define CH_PD Vcc // but needs a narrow low pulse
#define speed8266 9600 // This is the speed that worked with my ESP8266
void setup()
{
 esp8266.begin (speed8266);
 Serial.begin(9600);
 reset8266(); // Pin CH_PD need a reset before start communication
}
void loop()
{
 while(esp8266.available())
 { Serial.write(esp8266.read()); }
 while(Serial.available())
 { esp8266.write(Serial.read()); }
}
/*************************************************/
// Reset funtion to accept communication
void reset8266 ()
{
 pinMode(CH_PD, OUTPUT);
digitalWrite(CH_PD, LOW);
 delay(300);
 digitalWrite(CH_PD, HIGH);
}

Here's the output on Serial Monitor Arduino Serial Monitor Output

Kindly help me what am i doing wrong ? I don't want to use another FTDI chip while arduino already have it.

1
In my experience, this kind of gibberish (not silence) is typical of an incorrect serial port setting: baud rate, data bits, parity, stop bit. Some documentation for this module state "8N1" with a baudrate of 115200, while other (such as the " NURDspace Wiki (Schematic, Datasheet, & More!)" linked from sparkfun goes to this https://nurdspace.nl/ESP8266, which states a baud rate of 57600. This other, French documentation here goes with 9600... this really is hobbyist stuff... - jbm
(following) so I'd try other baud rates, from 115200 (does not seem to work), to 57600, then 38400, 19200, and finally 9600. - jbm
I've tried all baud rates, same result. And it isn't gibberish, the weird data appears only once during resetting otherwise it's complete silence nothing responding. Sometimes during testing it's not gibberish but some Fatal exception (0) or checksum0x0000 rooms 0 tail 8... Kind of thing.. - aditgupta100
I only have experience with the straight gcc compiler for the ESP (please specify which module next time) but my first guess would be that the chip is fried. Assuming you have properly tested different baud rates and parity settings to no avail random noise is spit out when the chip is fried. Only reason I know this is because it happened to one of my ESP03 a while back. I could still flash the chip but multiple GPIO would behave randomly, serial coms were complete garbage, and I think my ADC stopped working if I recall. All in all, it's a 2$ chip you may have accidentally shorted. oh well. - arduic

1 Answers

2
votes

At the moment I can only give you a part answer (seems I can't comment yet :) ).

The gibberish is normal when starting/resetting the ESP, it's just the boot code which outputs a boot message at 74880 baud (Which is basically the default baud rate 115200, but because the ESP starts at a lower cpu frequency, the baud rate is also lower, boot frequency is 26 mhz, normal frequency is 40 mhz, 26/40 * 115200 = 74880. If you can set your serial client to 74880 baud you should see the message, but it's an odd baudrate, so it might be hard or impossible to set.

So gibberish on reset is good! It means the ESP is working and happy, the problem is with your software (as you determined yourself too).

I assume your code is on the Arduino side? The big question is what is flashed on the ESP, and what it's expected bahaviour is. From your question I'm not 100% sure what you did flash on it..

I think you might've flashed nodemcu on it though, which would not respond to AT commands, try to flash the 'original' AT rom from Espressif Systems on it?