Another ESP8266-01 AT-Command thread...(no responses)

Title says it all..

I finally got on the bandwagon and ordered up some ESP8266 modules..

(some 01's to play with.. and a couple 12's if I ever need want to embed one into a custom PCB or something)

however.. right from the gate, I cant even get an AT command to return 'OK'..

I am currently using my old, trusty CP2012 usb programmer (that I have used many times before for custom boards, pro-mini's..etc)

I have also tried adding in/using an external power source (bench top psu) to power the ESP module as I read the CP2102 might not be able to provide enough current.

attempt 1:

ESP01 PINOUT:

GND >> GND (CP2102)
VCC >> +3.3v (CP2102)
RX >> TX (CP2102)
TX >> RX (CP2102)
CH_PD >> +3.3v (CP2102)
RST >> (tried both connected to +3.3v, connected to nothing, and DTR pin on CP2102)
GP00 >> GND (CP2102)

attempt 2:

ESP01 PINOUT:

GND >> GND (external psu) >> GND (CP2102) (all three connected)
VCC >> +3.3v (+3.3v external psu)
RX >> TX (CP2102)
TX >> RX (CP2102)
CH_PD >> +3.3v (CP2102)
RST >> (tried both connected to +3.3v, connected to nothing, and DTR pin on CP2102)
GP00 >> GND (external psu)

Using IDE 1.6.4 using Board Manager to DL the ESP board files..

(shows up in IDE... when I select Generic ESP module form boards menu.. I get/see lots of new options in there.. (I have touched them, left default)

I have even tried using the serial monitor, at all different board rates.. (still no response to any AT commands.

when I first open the serial monitor.. I also DO NOT get a ready and any other 'garbage' text in there (as expected form other reports)

At this point, I'm not sure what path to pursue? Is this an IDE set-up issue?

a connection (hardware) issue?

esp firmware issue?

I meter all points on breadboard and esp pins.. I get +3.3v

is there some other tests I can do.. to at least ensure the ESP is legit/working? (if not able to send AT commands to it as of yet?)

thanks for any advice on troubleshooting direction!

A lot of these came without AT in the firmware so you have to load firmware with it to use it.

update:

actually found this little post/tutorial:

steps, utility to use and link to a firmware to use..

thanks for the idea to check updating firmware!

You only connect GPOI0 to ground to put it in programming mode.

In programming mode, it will not respond to AT commands - different protocol. (Mind you, I do not know at present, what that is!)

I just went through this whole exercise yesterday and two weeks ago. I was waiting for USB-to-serial converter boards I bought on eBay. I bought two with FTDI chips and one with CP2102.

I have ESP-01.

For what it is worth
1.) RST pin is not connected
2.) 115200 baud rate CR+LF

@Paul_B

I thought that as well..

but its odd.. because as of right now, as I sit..

GPIO0 -is- connected to ground.. (and I'm throwing AT commands at it)

re-cap of events: (might be a fluke still?)

I had flashed some firmware to it last night... using this guide:

https://developer.mbed.org/users/sschocke/code/WiFiLamp/wiki/Updating-ESP8266-Firmware

(blindly following at best)

however, I couldnt send any AT commands to it..

found an 'AT-COMMAND' .bin (v0.9.2.2 AT Firmware.bin) file floating around and flashed it to the ESP8266-01

I closed XTCOM_UTIL..and opened up Arduino IDE.

ESP Generic module was already set.. COM port chosen..

I opened up serial monitor, and threw AT command at it..

got an 'OK' response!!

WOOT!.. thought I was in business..

There that AT command: AT+RST at it.. (got initial line return.. then sat there)..

I closed things down.. went back to Arduino IDE.. no AT commands responding...

(not sure if this was a result of the bad AT+RST command? that perhaps didnt finish?.. or because (as you mention above). GPIO0 was still connected to ground)

I tried a few times to:

get AT commands to work in Arduino IDE..

as well as going back to XTCOM_UTIL to (re)flash some firmware to it.. this time a newer firmware I found: v0.9.5.2 AT Firmware.bin

but could never seem to get it into 'programming mode again'..

go to sleep, wake up.. try again..

couldnt get XTCOM_UTIL work.. after many power up/down with GPIO0 grounded..

I added the RST line to RST on CP2102 board (dont recall if I had that connected originally or not).. and XTCOM_UTIL works again..

I again, flash firmware v0.9.5.2 AT Firmware.bin.. closed down XTCOM, opened up Arduino (both GPIO0/GND & RST/RST (high?) still in place).. open up Arduino IDE and am getting AT command responses:

AT

OK


AT+GMR

AT version:0.21.0.0
SDK version:0.9.5

OK

I'm glad I'm at this point.. however.. with your comment above, I am worried that once I get out of this initial 'programming' mode.. At commands wont work once I try it again? (but make sure the GPIO0 is NOT grounded when I go back to the Arduino IDE to send AT commands at it your saying?)

After throwing some more AT commands at it..

I have some questions about firmware..etc..

I have read things about expresif and AI_Thinker? (what are the differences if anyone knows? why use over the other?)

I sent this command to see if t was connected to anything:

AT+CWJAP?
No AP

so I tried to connect to my wi-fi in m y house:

AT+CWJAP=ssid,pwd
ERROR

ERROR

ERROR

each time...

then sent:

AT+CWMODE?
+CWMODE:2

sent this again:
AT+CWSAP?
+CWSAP:"AI-THINKER_0A6D33","",1,0

and I also see this in some crappy kindle fire I have laying on my desk (converting it to Android for some other random project).. I can even 'connect' to it.... (for whaterver thats worth?.. would that be for accessing a locally ESP hosted 'web page' or something?)

(doing a search on that.. is what lead me to find out this was ESP firmware related/variant)

sooooooo...........trying to connect to my wi-fi (network).. didnt work because, its configured to be a server right now? (is this correct?)

I send this command:

AT+CWLIF
192.168.4.2,e0:cb:1d:2a:b3:a8

and I see the kindle fire IP in the list..lol

is there a base set of tasks/things that need to be done to the ESP now?

(set an IP address? turn on/off DHCP?...etc?)

I have been using this page for the AT commands:
https://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/

anything better out there? (seems pretty decent with examples)

My "raw" ESP-01 shows

AT+GMR
AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
OK

yikes..

so I either erased and/org overwrote with an older firmware perhaps?

(guide/tutorial perhaps had a link to old .bins?)

I haven't quite started playing with these things yet, but if powering it from a USB-serial adapter, I intend to always use at least a 47 µF capacitor across the 3.3V line.

xl97:
yikes..

so I either erased and/org overwrote with an older firmware perhaps?

(guide/tutorial perhaps had a link to old .bins?)

You'll have to be the guinea pig on this, but I found Flashing ESP8266 firmware v1.5 using Arduino Uno - Yet Another Arduino Blog

Please let us know how it works out.

I have fairly new firmware it looks like, so I haven't been tempted to update the firmware just yet.

Thanks for the link..

I guess this is also part of my confusion.

There seem to be MANY flavors/variants on firmware to use? (which I'm still grasping at trying to make heads or tails of)

I see some tutorials that have to write 'several' .bin files (albeit to modified addresses) to the board..

and some where you only write 1?

Some have you off-set said addresses.. where as the single file ones just start at address x0000

Not clear about this AI_Thinker stuff vs the Expressif stuff?

Do some 'include' these AT commands I had to flash to get my stuff running? and other do not?

I dont mind being a guinea pig here... I'm just trying to understand the 'goal'..

Offers more options?
Certain firmware is used for certain projects only?

I have seen mention of things like nodeMCU.. Espresso.. something 'er other.. (javascript...etc)

I think I'm good (as far as knowing my 'items' are legit/working.. as I can now throw AT commands at it)..

but I dont mind exploring and flashing things if anyone wants to keep the communication going..etc

let me know.

(once I have a specific project/purpose in mind to work toward.. hopefully more of the firmware questions will make sense)

Keep up the good info! I'm going to be playing with a couple of these pretty soon and I need all the de-confusion I can get :slight_smile: We used to have a sign above the main computer at work years ago that said

"if we knew what we were doing, it wouldn't be research"

Seems very close to the ESP8266 state of the world currently. Lots of little tidbits out there without the underlying information of how to get there.

Why not using the ESP8266 Core for Arduino and developing your own firmware for the ESP8266-01?

I have never tried the AT commands, I directly reprogrammed the ESP8266-01.

If you have several devices, you can give it a try... :slight_smile:

I installed the ESP8266 core and I use the FTDI adapter.

In addition to your "attempt 1", I connected RTS with RST and DTR with GP0. This allows the download of your sketches from the Arduino IDE without changes on GP0.

But for the RTS - RST connection, you have to modify the FTDI adapter (see attached image)

Unfortunately you can't use the Serial Monitor as it resets DTR and RTS which holds the ESP8288 in reset.
(see here)

There is a open pull request (Set DTR and RTS in serial monitor by scottwday · Pull Request #3386 · arduino/Arduino · GitHub) but no solution so far.

That means you have to use another monitor program which allows you to control RTS/DTR like Termite for Windows or others

/Joe

JoeSto:
Why not using the ESP8266 Core for Arduino and developing your own firmware for the ESP8266-01?

I have never tried the AT commands, I directly reprogrammed the ESP8266-01.

If you have several devices, you can give it a try... :slight_smile:

I installed the ESP8266 core and I use the FTDI adapter.

I'm not a person who will 'stick to their guns' no matter what... I'm willing to try new things and if better/has an advantage, I can rescind my original opinion due to new information...

that being said.. 'make me a believer'..

What advantage does this approach hold? "WHY" would want to do this? What options/control does it give over other AT-COMMAND approaches? (more granular control over.......something?)

JoeSto:
In addition to your "attempt 1", I connected RTS with RST and DTR with GP0. This allows the download of your sketches from the Arduino IDE without changes on GP0.

But for the RTS - RST connection, you have to modify the FTDI adapter (see attached image)

my CP2102 has a RST pin (by default.. but I 'thought' that was a RST for the CP2102 itself.. and a not a RST for the device connected to it.. so I made a mod (similar to yours) to break out the DTR pin on the CP2102 board... (I never use the RST pin in normal project use)

I believe I have GPIO0 connected to GND pin on the CP2102 (same GND signal as the GND pin uses.. as I just moded the header to have another GND pin next to the default one)

and RST (on ESP) was left off.. but my last attempt to get it into 'programming mode' I needed to connect that to the RST pin on the CP2102 (which I believe is high/+3.v3) last I checked)

JoeSto:
Unfortunately you can't use the Serial Monitor as it resets DTR and RTS which holds the ESP8288 in reset.
(see here)

There is a open pull request (Set DTR and RTS in serial monitor by scottwday · Pull Request #3386 · arduino/Arduino · GitHub) but no solution so far.

That means you have to use another monitor program which allows you to control RTS/DTR like Termite for Windows or others

/Joe

\

Ahh... good to know about the serial monitor..

(I have only gotten...[well havent tried TOO much else to be fair] the serial monitor working for AT-commands.. but I suppose thats now 'REAL' serial debugging output. as the board is in 'programming mode' and responding to AT commands..etc)

so... then using a MEGA or a SoftSerial is a must?

What advantage does this approach hold? "WHY" would want to do this? What options/control does it give over other AT-COMMAND approaches? (more granular control over.......something?)

The ESP8266 is a powerful device (more speed/RAM/Flash than ATmegas). You can use it as replacement for Arduino devices (of course, only in some cases) ...and its fun to play around with…

This gives you much more possibilities for IoT topics (webserver, MQTT, aREST…)

/Joe

oh.. I know it can be used stand-alone (no Arduino).... and it can be a client or server..

question:

When you say: "ESP8266 Core"

are you referring to the "Arduino" IDE for ESP?

Or just using the (for example: v1.6.4+) IDE. but using the Board Manager to import.. and have a slew of settings to 'set'?

There are so many utilities floating around.. I cant keep them all straight yet! :slight_smile:

If not.. please provide a link to the 'core' stuff you are mentioning.

I 'believe' my current state of ESP module IS set-up to be a server already.. (you can connect to it in the available wi-fi connections list for example..... although there is no 'page/content' to be served up or anything)..

xl97:
Not clear about this AI_Thinker stuff vs the Expressif stuff?

Expressif is the IC manufacturer.

Ai_Thinker is the module maker.

Someone made the analogy of Atmel to Arduino as Expressif to Ai_Thinker.

I have seen the NodeMCU but don't know much about it. My guess at the moment is that it is a flavor of firmware.

xl97:
my CP2102 has a RST pin (by default.. but I 'thought' that was a RST for the CP2102 itself.. and a not a RST for the device connected to it.

It is. It is a blunder made by the board designer who really didn't know what he was doing.

xl97:
I never use the RST pin in normal project use

No-one ever does. It is useless.


ieee488:
I have seen the NodeMCU but don't know much about it. My guess at the moment is that it is a flavor of firmware.

It is in fact, a LUA interpreter. If you like LUA.

@xl97

I use this core: GitHub - esp8266/Arduino: ESP8266 core for Arduino

You have to follow the instructions on "Installing with Boards Manager"

After the installation additional examples for ESP8266 occur.

For the Board Manager, I use the following settings:

  • Generic ESP8266 Module
  • QIO
  • 40 MHz
  • Serial
  • 80 MHz
  • 1M (128K SPIFFS) SPI Flash File System not used AFAIK
  • Disabled (no idea what this can be used for)
  • none (in German: keine)
  • ck
  • 115200

/Joe

I have done (almost) the same..

however I did NOT update to Arduino IDE 1.6.8.. (the line above it works with 1.6.4 version.. which is what I have)

I did add the files using the Board Manager... and I have those settings in my TOOL menu when I set the board type to: Generic ESP8266 device

for now.. I just need to think of a project.. and work towards it.

Or maybe some quick-n-easy project suggestions?

I'll post steps, outcome/results..etc

**Chit-Chat:

So I grasp how to have the ESP8266 module be a server..
(its gets an IP, and you can point your device to 'it')...

*(thoughts out loud)

If there is no 'web page' on this server (ie: a page that has some HTML/CSS buttons..etc).. what good does it do?

How 'much' of a website can you have? Basic HTML/CSS? I read some mentions of javascript (Espresso or something)... which I supposed adds some sort of parser? for the js code?

Lets list out some cool/fun (heck even lame) uses for the ESP8266 module as-

a server:

  • host a minimal 'web page' that has some controls to toggle pins connected to the ESP module itself.

a client:

what are you guys using yours for? (what type of projects?)

and for those who are going to start playing around.. and particular projects in mind? (or articles read that motivated you to look into getting a few)