ESP8266/OTA: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
iT w0rX! #ff9900 |
||
| Line 3: | Line 3: | ||
* https://harizanov.com/2015/06/firmware-over-the-air-fota-for-esp8266-soc/ | * https://harizanov.com/2015/06/firmware-over-the-air-fota-for-esp8266-soc/ | ||
There is an OTA option in the Arduino IDE | There is an OTA option in the Arduino IDE. | ||
<span style="color:#ff6600;font-family:courier;font-size:24pt">'''UPDATED'''</span> | <span style="color:#ff6600;font-family:courier;font-size:24pt">'''UPDATED'''</span> | ||
This now | This now actually works with Arduino IDE 1.6.5 r5 | ||
Freshly updated documentation | |||
* https://github.com/esp8266/Arduino/blob/master/doc/ota_updates.md | * https://github.com/esp8266/Arduino/blob/master/doc/ota_updates.md | ||
Verified this working with DNS_SD_Arduino_OTA Example sketch using ESP-12e with 1MB memory. DOES NOT work with ESP-01 with 512KB memory. | |||
It's also important to know the flash memory size, ESP. | It's also important to know the flash memory size, ESP.getFreeSketchSpace() may be useful, free space must be greater than sketch size. | ||
<pre> | <pre> | ||
| Line 29: | Line 29: | ||
Serial.println(ESP.getFlashChipId(), HEX); | Serial.println(ESP.getFlashChipId(), HEX); | ||
Serial.println("Flash Size: "); | Serial.println("Flash Size: "); | ||
Serial. | |||
Serial. | Serial.printf("Sketch size: %u\n", ESP.getSketchSize()); | ||
Serial.printf("Free size: %u\n", ESP.getFreeSketchSpace()); | |||
} | } | ||
| Line 42: | Line 42: | ||
Flash ID: | Flash ID: | ||
1440E0 | 1440E0 | ||
Sketch size: 304716 | |||
Free size: 655360 | |||
</pre> | </pre> | ||
''Note: Updated to HEX formatting of | ''Note: Updated to HEX formatting of Flash ID. | ||
Revision as of 18:14, 10 November 2015
Exploring Over The Air (OTA) updates.
There is an OTA option in the Arduino IDE.
UPDATED
This now actually works with Arduino IDE 1.6.5 r5
Freshly updated documentation
Verified this working with DNS_SD_Arduino_OTA Example sketch using ESP-12e with 1MB memory. DOES NOT work with ESP-01 with 512KB memory.
It's also important to know the flash memory size, ESP.getFreeSketchSpace() may be useful, free space must be greater than sketch size.
void setup() {
Serial.begin(115200);
Serial.println("Flash Memory Stuff");
Serial.println("ESP ID: ");
Serial.println(ESP.getChipId(), HEX);
Serial.println("Flash ID: ");
Serial.println(ESP.getFlashChipId(), HEX);
Serial.println("Flash Size: ");
Serial.printf("Sketch size: %u\n", ESP.getSketchSize());
Serial.printf("Free size: %u\n", ESP.getFreeSketchSpace());
}
Serial output from an ESP-01
ESP ID: DCED75 Flash ID: 1440E0 Sketch size: 304716 Free size: 655360
Note: Updated to HEX formatting of Flash ID.