Atualizando Firmware ESP8266

Encontrei estes vídeos muito simples e gostaria de compartilhá-lo com vocês. Não tem voz com sotaque, nem baboseira que nos faz perder tempo.

ESP8266 ESP-01 WiFi IOT Module Flashing or Re-flashing Firmware Update Ai Thinker version Tutorial 1. How to update or re-flashing ESP8266 ESP-01 Ai Thinker version firmware using ESP Flash Download Tool.

Default Version (Jun 5 2015):
SDK 0.9.5 (Ai-Thinker)
AT 0.21.0.0 (Ai-Thinker)

Re-flashing firmware (512KB/4Mbits flash size board version):
– The latest firmware is SDK 1.3.0 but we will flash it the same version as it is the only version that support this ESP-01 with 4Mbit of flash size. You may use the latest version if you have larger flash size.
SDK 0.9.5 (Ai-Thinker)
AT 0.21.0.0 (Ai-Thinker)

Required Firmware file and address (no 4Mbits/512kByte version support version 1.0 and above):
ai-thinker-0.9.5.2.bin (0x00000)

Item Required:
1. ESP8266 ESP-01 4Mbit/512kB version (Hardware) – http://www.aliexpress.com/wholesale?S…
2. FTDI USB to Serial UART Adapter (Hardware) – http://www.aliexpress.com/wholesale?S…
3. Jumpers (Hardware) – http://www.aliexpress.com/wholesale?S…
4. Breadboard (Hardware) – http://www.aliexpress.com/wholesale?S…
5. PuTTY (Software) – http://www.chiark.greenend.org.uk/~sg…
6. ESP Flash Download Tool (Software) – http://bbs.espressif.com/viewtopic.ph…
7. Ai-Thinker Firmware (Firmware) – http://wiki.aprbrother.com/wiki/Firmw…

Extra (For external Power Supply):
1. 3.3V 1A Voltage Regulator (AZ1117T) – http://www.aliexpress.com/wholesale?S…
2. Mini/Micro USB Breakout Board – http://www.aliexpress.com/wholesale?S…
3. Power Bank

NOTE: External power supply is required if the PuTTY or Serial Monitor unable to give response or always show an error.

Steps:
1. Prepare all the hardware required.
2. Build up all connection between ESP8266 ESP-01 and FTDI.
3. Download PuTTY Terminal Program.
4. Download ESP Flash Download Tool.
5. Download the Ai Thinker firmware.
6. Connect and check the current version of firmware using PuTTY.
7. Upload the firmware using ESP Flash Download Tool.
8. Check the uploaded version of firmware using PuTTY.

IMPORTANT NOTE:
1. External power supply is required if the PuTTY or Serial Monitor unable to give response or always show an error.
2. Ai-Thinker firmware version 1.0 and above requires at least 1MB (8Mbit) of Flash. 512kB (4Mbit) of Flash has to use older version (v0.9.5.2 – refer to alternative link below)

Official Download Link for Latest Ai-Thinker firmware:
http://bbs.ai-thinker.com/forum.php?m…

Alternative Download Link for Latest Ai-Thinker firmware:
http://www.electrodragon.com/w/ESP826…

Alternative Download Link for older version Ai-Thinker firmware:
http://wiki.aprbrother.com/wiki/Firmw…

SUBCRIBE Youtube for Channel for more Tutorial Videos:
Youtube Channel: https://www.youtube.com/channel/UCcod…

Soundtrack credits:
Jahzzar – betterwithmusic.com – CC BY-SA
Rainy_Day_Games – YouTube Audio Library

Publicado em 29 de out de 2016

ESP8266 ESP-01 WiFi IOT Module Flashing Firmware Update Espressif Version Tutorial 2. How to update ESP8266 ESP01 Espressif version firmware using ESP Flash Download Tool.

————————————–
I N F O :
————————————–
Default Version (Jun 5 2015):
SDK 0.9.5 (Ai-Thinker)
AT 0.21.0.0 (Ai-Thinker)

Upgrade to latest supported (4Mbit Flash of ESP-01) Espressif version (Sep 18 2015) – Refer Important NOTES for details:
SDK 1.4.0 (Espressif Non-OS no-boot)
AT 0.50.0.0 (Espressif Non-OS no-boot – Sep 18 2015)

ESP-01 Board Flash size: 4Mbit/512KByte version

————————————–
F I R M W A R E :
————————————–
Required Firmware file and address (4Mbit/512KB version):
1. esp_init_data_default.bin (0x7c000)
2. at\noboot\eagle.flash.bin (0x00000)
3. at\noboot\eagle.irom0text.bin (0x10000)
4. blank.bin (0x3e000)
5. blank.bin (0x7e000)

————————————–
P R E P A R A T I O N :
————————————–
Item Required:
1. ESP8266 ESP-01 (Hardware) – http://www.aliexpress.com/wholesale?S…
2. FTDI USB to Serial UART Adapter (Hardware) – http://www.aliexpress.com/wholesale?S…
3. Jumpers (Hardware) – http://www.aliexpress.com/wholesale?S…
4. Breadboard (Hardware) – http://www.aliexpress.com/wholesale?S…
5. PuTTY (Software) – http://www.chiark.greenend.org.uk/~sg…
6. ESP Flash Download Tool (Software) – http://bbs.espressif.com/viewtopic.ph…
7. NON-OS ESP8266 SDK Firmware (Firmware) – http://bbs.espressif.com/viewtopic.ph…

Extra (For external Power Supply):
1. 3.3V 1A Voltage Regulator (AZ1117T) – http://www.aliexpress.com/wholesale?S…
2. Mini/Micro USB Breakout Board – http://www.aliexpress.com/wholesale?S…
3. Power Bank

————————————–
S T E P S :
————————————–
1. Prepare all the hardware required.
2. Build up all connection between ESP8266 ESP-01 and FTDI.
3. Download PuTTY Software.
4. Download ESP Flash Download Tool.
5. Download the latest Espressif Non-OS ESP8266 SDK firmware (use this SDK 1.4.0 version since this is the only version applicable for 4Mb of flash size – refer IMPORTANT NOTES below).
6. Connect and check the current version of firmware using PuTTY.
7. Upload the latest Espressif firmware using ESP Flash Download Tool.
8. Check the latest version of firmware using PuTTY.

————————————–
I M P O R T A N T N O T E S :
————————————–
1. External power supply is required if the PuTTY or Serial Monitor unable to give response or always show an error.
2. 4Mbit of Flash is not supported for SDK v1.5.0 (15_11_27) and above for both boot and non-boot mode due to large size of AT firmware (Starting ESP8266_AT_v0.51). Please use 8Mbit Flash or larger.
3. 4Mbit of Flash is only support non-boot mode for SDK v1.1.0 (15_05_22) until SDK v1.4.0 (15_09_18).
4. Please refer to README file in bin/at/ folder for another flash size.
5. If you have an upgraded version of ESP-01 with 8Mbit of flash size (Black Color), Please refer ESP-201 (8Mbit Flash size) tutorial video on how to download latest SDK firmware. Link here: https://www.youtube.com/watch?v=U8ubG…

————————————–
S U B S C R I B E :
————————————–
SUBCRIBE MakerStream YouTube Channel for more Tutorial Videos:
YouTube Channel: https://www.youtube.com/channel/UCcod…

Soundtrack credits:
Jahzzar – betterwithmusic.com – CC BY-SA – intro sound (cropped)
Rainy_Day_Games – YouTube Audio Library

Anúncios

O ESP8266+Arduino Mega como WebServer

Depois de testar o modulo com vários comandos AT (vale a pena dar uma sapeada no arquivo anexo, bem legal!), parti para fazer o modulo funcionar como Web Server. Partido que tinha aprendido, principalmante com um tutorial do blog FILIPEFLOP:

http://blog.filipeflop.com/wireless/esp8266-arduino-tutorial.html

O Circuito:

 

Webservercircuit

 

O código:

/*************************************************************************

* Web Server with ESP8266

* Based on: FILIPEFLOP http://blog.filipeflop.com/wireless/esp8266-arduino-tutorial.html

* Adapted by Marcelo Jose Rovai

**************************************************************************/

#define esp8266 Serial2

#define CH_PD 4

#define speed8266 115200 // This is the speed that worked with my ESP8266

#define DEBUG true

void setup()

{

  esp8266.begin (speed8266);

  Serial.begin(9600);

  reset8266(); // Pin CH_PD needs a reset before start communication

  sendData(“AT+RST\r\n”, 2000, DEBUG); // reset

  sendData(“AT+CWJAP=\”ROVAI TIMECAP\”,\”mjr747@1\”\r\n”, 2000, DEBUG); //Connect network

  delay(3000);

  sendData(“AT+CWMODE=1\r\n”, 1000, DEBUG);

  sendData(“AT+CIFSR\r\n”, 1000, DEBUG); // Show IP Adress

  sendData(“AT+CIPMUX=1\r\n”, 1000, DEBUG); // Multiple conexions

  sendData(“AT+CIPSERVER=1,80\r\n”, 1000, DEBUG); // start comm port 80

}

void loop()

{

  if (esp8266.available()) // check if 8266 is sending data

  {

    if (esp8266.find(“+IPD,”))

    {

      delay(300);

      int connectionId = esp8266.read() – 48;

      String webpage = “<head><meta http-equiv=””refresh”” content=””3″”>”;

      webpage += “</head><h1><u>MJRoBot ==> WebServer (ESP8266) </u></h1><h2>Arduino Pin: “;

      webpage += “D8 status ==> “;

      int a = digitalRead(8);

      webpage += a;

      webpage += “<h2>Arduino Pin: D9 status ==> “;

      int b = digitalRead(9);

      webpage += b;

      webpage += “<h2>Arduino Pin: A0 data ===> “;

      int c = analogRead(0);

      webpage += c;

      webpage += “</h2>”;

      String cipSend = “AT+CIPSEND=”;

      cipSend += connectionId;

      cipSend += “,”;

      cipSend += webpage.length();

      cipSend += “\r\n”;

      sendData(cipSend, 1000, DEBUG);

      sendData(webpage, 1000, DEBUG);

      String closeCommand = “AT+CIPCLOSE=”;

      closeCommand += connectionId; // append connection id

      closeCommand += “\r\n”;

      sendData(closeCommand, 3000, DEBUG);

    }

  }

}

/*************************************************/

 // Send AT commands to module

String sendData(String command, const int timeout, boolean debug)

{

  String response = “”;

  esp8266.print(command);

  long int time = millis();

  while ( (time + timeout) > millis())

  {

    while (esp8266.available())

    {

      // The esp has data so display its output to the serial window

      char c = esp8266.read(); // read the next character.

      response += c;

    }

  }

  if (debug)

  {

    Serial.print(response);

  }

  return response;

}

/*************************************************/

// Reset funtion to accept communication

void reset8266 ()

{

  pinMode(CH_PD, OUTPUT);

  digitalWrite(CH_PD, LOW);

  delay(300);

  digitalWrite(CH_PD, HIGH);

}

A web Page:

Note que o endereço da pagina é o segundo IP que aparece no Serial monitor com o comando AT+CIFSR na fase de Set-up (veja a copia do Serial monitor abaixo): 

+CIFSR:STAIP,”10.0.1.2″

Webserverpage

A saída no Serial Monitor:

1. A conexão com o modulo esp8266

 

SerialConxion

2. A comunicação:

SerialOngoingcomm

Eu fiz um pequeno vídeo para dar uma visão do WebServer funcionando:

ESP8266 como webserver

Documento legal com dicas de comandos AT para configurar o esp8266:

ESP8266_WiFi_Module_Quick_Start_Guide_v_1.0.4.pdf

Fonte:  http://labdegaragem.com/profiles/blogs/o-esp8266-como-webserver-usando-o-mega?xg_source=msg_mes_network