esp8266

hey all,
i have been working on esp8266 for several days and not able to move any further.
i updated the firmware using FTDI and successful but not able to connect it to arduino.

  1. I have noticed that FTDI was supplying 5.1 voltage and my esp8266 working fine. Can i connect esp8266 to arduino 5v supply?
    2)this is the procedure that i am using
    step 1: installing arduino ide
    step 2: esp8266 board manager
    step 3: changing the board to generic esp8266{512K-flash size,uploading speed of 9600,flash freq:40,CPU freq:80,Programmer:AVRISP MKll}
    step 4:coneecting esp8266 to arduino Mega,vcc,ch_pd---5v,GIO1,grnd---grnd, tx----rx,rx--tx
    step 5: uploading a blank code
    got espcomm error
    am i doing the correct way if not your suggestions costs my time.
    Thank you
    by the way i am using ESP01,arduino mega

I'm on my hour 8 of this rediculous module, and stuck on the firmware part of it. I can't figure out what version I'm to install and all the tutorials seem to be dated past 2014. I'm really confused.

You can't connect 5v, must be 3v.

DocStein99:
I'm on my hour 8 of this rediculous module, and stuck on the firmware part of it. I can't figure out what version I'm to install

What are you trying to accomplish?

Me? I would like to figure out why i was getting garbadge on the serial output when i AT+RST. I would also like to have a command set that lets me change the baud rate. I am also frustrated with a recompile & upload every 5 minutes, shuffling wires around troubleshooting either the firmware and my code.

Ideally, i would like to open a UDP socket to my linux machine from the Arduino, send and receive reliable data, using a usb nano.

DocStein99:
AT+RST

So you're using the AT firmware and wondering which version to install?

DocStein99:
I would also like to have a command set that lets me change the baud rate.

If you're using the AT firmware you can do that. From http://espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf (instruction set for Espressif ESP8266 AT firmware v1.3):

AT+UART – UART configuration
This command sets the UART configuration and writes the new configuration to the flash. It is stored
as the default parameter and will also be used as the default baudrate henceforth. [THIS API IS
DEPRECATED.]

AT+UART=<baudrate>, <databits>, <stopbits>, <parity>, <flow control>

This command is deprecated, please use AT+UART_CUR or AT+UART_DEF instead

AT+UART_CUR – current UART configuration This command sets the current UART configuration, it does not write changes to the flash. Hence there is no change in the default baud rate. AT+UART_CUR=<baudrate>, <databits>, <stopbits>, <parity>, <flow control>

AT+UART_DEF – default UART configuration
This command sets the UART configuration and saves it to flash. It is stored as the default parameter
and will also be used as the default baud rate henceforth.

AT+UART_DEF=<baudrate>, <databits>, <stopbits>, <parity>, <flow control>

I DID try "AT+UART_DEF" and "AT+UART_DEF", my module was returning "ERROR" - which was part of my main confusion.

I became confused on the part of updating the firmware. Perhaps I had been spoiled in the past, just by going to a git-hub and finding the most recent one (in ENGLISH).

Is not obviously labeled "at command set". I must sort through various online tutorials which all use different examples which have different ways to accomplish the same basic thing, sorting "esspressif" hub scrambled with CHINEESE:

"NONOS_SDK"
"IOT_PLATFORM"
AT_v0.50_on_esp_iot_sdk_v1.4.0_150918"
"esp8266_nonos_sdk_v1.5.4_16_05_20"
"ESP8266_AT_V00180902_02_baudrate watchdog added"

--

In the directory of "the most recent" firmware, there are TWO sub-directories "AT" and "AT_SDIO". At this point is a nice gamble in time for me to figure out which one does not work. The were no instructions or obvious information for me to pick, possibly due to my patience running out reading so many different readme's at this point I was really frustrated. I had to load previous versions based on the information in the year+ old tutorials, and failed with those attempts.

In each "README" warns I must load something else PRIOR to loading THAT firmware, and then go on a scavenger hunt for a bunch of other files to study and load - which is very time consuming (for me).

The nano uses software serial for 2nd UART, that I must use in order to send my debug messages back, with a great pleasure of swapping wires on a breadboard back and fourth, unplugging serial cables and such just to update my .ino project over and over again.

As of last night, I believe I loaded the most recent firmware, tested my module was able to connect to my router to obtain an IP address. I can't remember if I tested changing the baud rate.

So let me ask this, if I can't change the baud rate - I must not have loaded the at-command set? I was getting reply "OK" from "AT" and returned firmware version "AT+GMR", so I thought THAT WAS the at command set? I think there are different flavors in the same version of firmware for different at-command sets.

DocStein99:
Perhaps I had been spoiled in the past, just by going to a git-hub and finding the most recent one (in ENGLISH).

Please post a link to where you downloaded your firmware from.

DocStein99:
Perhaps I had been spoiled in the past, just by
I think there are different flavors in the same version of firmware for different at-command sets.

There are two different AT firmwares I know of, Espressif and AI-Thinker. They are both similar but my understanding is the AI-Thinker firmware has AT commands to control the GPIO on the ESP8266. The commands have also changed over time. The command references I provided above are for Espressif AT firmware 1.30.

Link to the "latest" firmware (as of today is 2-12-2017)

In the list, is:

  • Non-OS SDK Patch
  • Non-OS SDK (Latest Version: 2.0.0)
  • Non-OS SDK (Latest Version: MBEDTLS)
  • RTOS SDK

In each of the 4 libraries to download - I did not recognize ANY of the terms "Non-OS, SDK, MBEDTLS, RTOS"

Nothing clearly labeled "AT COMMAND SET" or "NOT THE AT COMMAND SET". Anyone is faced with either a "trial-and-error" method of guessing, or a "read each and every document" method. After browsing the directory structure of the 4 "latest releases" the directory tree gets even more confusing, since none of the current google-search tutorials explain what these different flavors are.

Link to the tutorial that was most helpful for me - to update firmware

I tried to download and run the firmware from the above tutorial link, which seemed to bring me straight back to the original firmware loaded on my 8266 when I tested the first time, with the same bugs and still unable to set the baud rate.

Does anyone want to read the instructions? Good! They're HERE! Sort through this 3-PAGEDN list of documents and pick out which one to use:

List of documents for the 8266 - (3 PAGEDN)

I am interested in learning the 8266 and know what my options are. The esp8266 lacks a REVISED "quick start" guide, and the same fun-friendly "hello world" & "blink" guides, that I am was used to following when doing ANY new Arduino project up and tested, in a timely manner.

NUMBER ONE! The 8266 is a 3.3v device!!!! If it is still working you are very lucky. Power AND signal pins work at 3.3v NOT 5v/
Now
There are several (if not many) ways to program the 8266. First of all most modules are shipped with the "AT command set" firmware, using the AT commands you describe. You should be able to communicate via the serial TX/RX pins using a FTDI or similar USB converter. If your converter does not have a 3.3v option, you need to do some level converting. If any of your GPIO pins are to interface with a 5v device again you need to do some level converting. Using the AT command firmware, you should see responses discribed in the documentation for the firmware (most likely AI Thinker) vendor.

If you are trying to update the firmware to another platform, again there are several ways to go. You can use the Arduino IDE to directly upload sketches to the module. KEEP IN MIND that when you do this you no longer have the original firmware (IE the AT command set).

You can also go the way of NodeMcu and upload a Lua interpreter that allows you to use the Lua language to write and upload programs ("sketches" in Arduino lingo). This method uses a different IDE than the Arduino IDE.

All this being said, it would help to know just where you are and your intention, in order to help. Do you simply want to use the at commands or upload custom firmware? But again I have to remind you THE 8266 IS A 3.3V DEVICE.
You can find specs here https://cdn-shop.adafruit.com/datasheets/ESP8266_Specifications_English.pdf

DocStein99:
In the list, is:

  • Non-OS SDK Patch
  • Non-OS SDK (Latest Version: 2.0.0)
  • Non-OS SDK (Latest Version: MBEDTLS)
  • RTOS SDK

The one you want is "Non-OS SDK (Latest Version: 2.0.0)". The firmware is located at ESP8266_NONOS_SDK/bin/at in that file. I agree it's just stupidly confusing how Espressif does things. Them being Chinese is not the issue, it's just a complete lack of organization. Pretty scary to think this is a major company. There are volunteer run open source projects that are much better organized. They used to do separate AT firmware releases but then stopped and it was only by some luck that I realized they now just release the AT firmware only as a part of the Non-OS SDK. They are trying to use a forum software for completely non-forum usage, just idiotic. Then there's the link "GO TO GITHUB for LATEST SDK", OK, cool I can do that, I like GitHub. But wait, it's the RTOS SDK and I wanted Non-OS. Why the hell didn't they say it's the RTOS SDK from the start??!!! Now what's the difference between the "at" firmware and the "at_sdio" firmware? Of course Espressif doesn't bother with any documentation.

DocStein99:
Does anyone want to read the instructions? Good! They're HERE! Sort through this 3-PAGEDN list of documents and pick out which one to use:

List of documents for the 8266 - (3 PAGEDN)

Actually there's a better page for documentation now:

I like that page much better than their "forum system" of organization but it's still a weird journey of many clicks through obscure links just to get to that page.

I notice they now have a non-forum style page for the SDKs:

So I guess they finally realized it was time to ditch the forum system for a real website. There's a section for AT too but it's empty so you would still need to somehow know that the latest AT firmware is bundled with the Non-OS SDK.

You can do an OTA firmware update of the AT firmware via AT command, which should be very easy (I haven't tried it) but they don't immediately make the latest AT firmware available for OTA updates so if you're into the new and shiny then you have to go through the hassle of the manual update.

For reasons unknown, there were replies on this thread I didn't see the first time I was posting, and now are visible.

I'm using a 3.3v FTDI 1232 board, and the 3.3v jumper pin is selected. I had to wire myself my own carrier board last night to help me load the firmware, the wireless breadboard driving me crazy. (When are they going to invent the automatic copper circuit board printing machines that are as reliable as the inkjet printers?).

Here is my firmware version output

OK
AT+GMR

AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(656edbf)
compile time:Jul 19 2016 18:43:55
OK

Looks like your AT firmware is up to date. Congratulations! I know that's a confusing process the first time through.

Does AT+UART_DEF or AT+UART_CUR still give you an ERROR message?

I accidentally set the baud wrong:

AT+UART_DEF=19200,8,1,0,3

the "3" at the end means put the flow control in RTS/CTS, instead of 'NO FLOW" control. The chip is wasted now, I can't get anything out of it. Good thing these dumb things aren't expensive, I buy them 5 at a time.

On to the next chip. By now I think I have the firmware downloading procedures complete. Without completely reading a 200 page manual and learning the entire thing from back to back, I kind of just wing-it or I'll never get anything done.

Anyway. Here is suspicous output from at+rst:

AT+RST


OK

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 2408, room 16 
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0 
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0 
tail 8
chksum 0xd8
csum 0xd8

2nd boot version : 1.6
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

ŒâÜ[00]ì8[02]‚nÀä¾[12]rÜØònãb[0C][18]ŒlŽÃl`[1B]ľ[1C]r’8[1B]GÆl[12] #[0C][18]€[0C][1C]r[18][02]ŒâÜçI8‚ì[1C]ò[1B] ±[0C][18]€[0C][1C]r[18][02]ŒâÜçI8‚[0C]Žû[1B]0±[0C][18]€l[1C]r[18][02]r[18][02]Ž[1B]Ã9lÀÄž[1B]bßä[0C][18]ŒŒbàÄbà[04]‰œlŽÜlœ[18]bÜ[1C][12]bÀä¸~’nà[12]nÜ’Ü[18][02]Ä[00][04][18]lÛûÁnÀ$Žâ[0C][18]Œ[0C][1C]‚ŒŽ[00]l[1C]žŒ[1F]’[0C][1F]ì[0C]ŽÀl`[1B][04]¾`[12][02]ÄÜ’ÜÄb[0C][18]‚[0C][1C]’lŽ8[0C][18]€[02]ß[00]Œž[1B]bßä[0C][18]‚[0C][1C]|Œ[1C]r[18][02]r[18][02]
ready

Did you try flashing the AT firmware to the "wasted" chip again? I guess it's safer to use the "AT+UART_CUR" command to test first but I don't think it should be possible to do permanent damage via the AT commands.

DocStein99:
By now I think I have the firmware downloading procedures complete. Without completely reading a 200 page manual and learning the entire thing from back to back, I kind of just wing-it or I'll never get anything done.

I had so much trouble the first time and found such poorly written tutorials that I wrote myself some detailed instructions for the whole process so I'd never have to go through that again.

DocStein99:
Anyway. Here is suspicous output from at+rst:

When I was messing with the AT firmware it was with those shields that connect the ESP8266 to the Arduino's pins 0 and 1 so I never really saw much of the output, it just worked. My recent ESP8266 projects have been programming it directly. So I can't say if that's abnormal to see what you're seeing but as long as it's working for you I wouldn't worry about it.

Ok. I didn't try to upload (or as the chineese directions say "DOWNLOAD") the firmware to the esp8266 yet, but thats a good idea - hopefully I can rescue it.

Ok, so now I'm about 5 days into getting nothing accomplished yet, I opened up my original project I actually wanted to do before this huge distraction. I want to open a UDP socket, to connect to my linux machine. Already running into trouble with confusing arduino libraries, I think they expect me to use that all-in-one processor/wifi combo thing.

Is it possible to use the UDP feature outside of that combo-chip board - or will I have to invent this whole library myself and start from scratch, and learn the entire UDP signalling language and write a library to convert serial uart to UDP?

This is the library I use with the AT firmware. It's pretty much the same API as the Arduino Ethernet and WiFi libraries. It does UDP:

Ok I found the library. Now I'm back facing the same issue with softwareSerial can't handle 115200 baud.

I do have one of these all-in-one wifi modules, but I wasn't planning to try and use that until I figured out exactly what's going on with the mini module first It's clear I'm just going to be opening up another revolving door scavenger hunt to get THAT to work.

Wow, I got the baud command to work, now the UDP test program works WITHOUT another scavenger hunt! This is awesome. Thank you so much for the guidance.

Pro tip for the WiFiESP library: The author of the library has debug output turned on by default. This might be useful for troubleshooting but it also wastes a lot of memory and slows things down. So once you have it working you should disable the output as shown here: