Skip to content

Commit d45fe6a

Browse files
committed
Update ota_updates.md
1 parent a6e01b8 commit d45fe6a

File tree

1 file changed

+35
-28
lines changed

1 file changed

+35
-28
lines changed

doc/ota_updates/ota_updates.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ title: OTA Update
33
---
44

55
## Table of Contents
6-
* [Introduction](#introduction)
7-
* [Security](#security)
8-
* [Safety](#safety)
9-
* [Basic Requirements](#basic-requirements)
10-
* [Arduino IDE](#arduino-ide)
11-
* [Requirements](#requirements)
12-
* [Application Example](#application-example)
13-
* [Classic OTA](#classic-ota)
14-
* [ArduinoOTA](#arduinoota)
15-
* [Web Browser](#web-browser)
16-
* [Requirements](#requirements-1)
17-
* [Implementation Overview](#implementation-overview)
18-
* [Application Example](#application-example-1)
19-
* [HTTP Server](#http-server)
20-
* [Requirements](#requirements-2)
21-
* [Arduino code](#arduino-code)
22-
* [Simple updater](#simple-updater)
23-
* [Advanced updater](#advanced-updater)
24-
* [Server request handling](#server-request-handling)
25-
* [Simple updater](#simple-updater-1)
26-
* [Advanced updater](#advanced-updater-1)
27-
* [Stream Interface](#stream-interface)
28-
* [Updater class](#updater-class)
6+
* [Introduction](#introduction)
7+
* [Security](#security)
8+
* [Safety](#safety)
9+
* [Basic Requirements](#basic-requirements)
10+
* [Arduino IDE](#arduino-ide)
11+
* [Requirements](#requirements)
12+
* [Application Example](#application-example)
13+
* [Classic OTA](#classic-ota)
14+
* [ArduinoOTA](#arduinoota)
15+
* [Web Browser](#web-browser)
16+
* [Requirements](#requirements-1)
17+
* [Implementation Overview](#implementation-overview)
18+
* [Application Example](#application-example-1)
19+
* [HTTP Server](#http-server)
20+
* [Requirements](#requirements-2)
21+
* [Arduino code](#arduino-code)
22+
* [Simple updater](#simple-updater)
23+
* [Advanced updater](#advanced-updater)
24+
* [Server request handling](#server-request-handling)
25+
* [Simple updater](#simple-updater-1)
26+
* [Advanced updater](#advanced-updater-1)
27+
* [Stream Interface](#stream-interface)
28+
* [Updater class](#updater-class)
2929

3030

3131
## Introduction
@@ -121,8 +121,9 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota-
121121
2. Now prepare the sketch and configuration for the upload over a serial port.
122122
- Start Arduino IDE and load sketch DNS_SD_Arduino_OTA.ino available under File > Examples > ESP8266mDNS
123123
![OTA sketch selection](ota-ide-sketch-selection.png)
124+
124125
**Note:** This sketch is available only for 1.6.5-947-g39819f0 (of July 23, 2015) and 1.6.5-1160-gef26c5f (of Sep 30, 2015) versions of platform packages installed in Arduino IDE using https://github.com/esp8266/Arduino#installing-with-boards-manager. It was removed in [#980](https://github.com/esp8266/Arduino/pull/980) from GitHub repository.
125-
- Update ssid and pass in the sketch so the module can join your Wi-Fi network
126+
- Update SSID and password in the sketch so the module can join your Wi-Fi network
126127
![ssid and pass entry](ota-ide-ssid-pass-entry.png)
127128
- Configure upload parameters as below (you may need to adjust configuration if you are using a different module):
128129
![configuration of serial upload](ota-ide-serial-upload-configuration.png)
@@ -133,7 +134,7 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota-
133134

134135
4. Only if module is connected to network, after a couple of seconds, the esp8266-ota port will show up in Arduino IDE:
135136

136-
![selection og OTA port](ota-ide-ota-port-selection.png)
137+
![selection of OTA port](ota-ide-ota-port-selection.png)
137138

138139
5. Now get ready for your first OTA upload by changing configuration settings as follows:
139140

@@ -145,7 +146,7 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota-
145146

146147
![OTA upload complete](ota-ide-ota-upload-complete.png)
147148

148-
**Note** To be able to upload your sketch over and over again using OTA, you need to embed OTA routines inside. Please use DNS_SD_Arduino_OTA.ino as an example.
149+
**Note:** To be able to upload your sketch over and over again using OTA, you need to embed OTA routines inside. Please use DNS_SD_Arduino_OTA.ino as an example.
149150

150151

151152
#### ArduinoOTA
@@ -217,15 +218,21 @@ You can use another module if it meets “Flash chip size is 2x the size of the
217218
- Start Arduino IDE and load sketch WebUpdater.ino available under File > Examples > ESP8266HTTPUpdateServer.
218219
- Update ssid and pass in the sketch so the module can join your Wi-Fi network.
219220
- Open File > Preferences, look for “Show verbose output during:” and check out “compilation” option.
221+
220222
![Preferences - enablig verbose output during compilation](ota-web-show-verbose-compilation.png)
223+
221224
**Note:** This setting will be required in step 5 below. You can uncheck this setting afterwards.
222225

223226
3. Upload sketch (Ctrl+U). Once done open Serial Monitor (Ctrl+Shift+M) and check if you see the following message displayed, that contains url for OTA update.
227+
224228
![Serial Monitor - after first load using serial](ota-web-serial-monitor-ready.png)
225-
**Note:** Such message will be shown only after module successfully joins network and is ready for an OTA upload:
229+
230+
**Note:** Such message will be shown only after module successfully joins network and is ready for an OTA upload.
226231

227232
4. Now open web browser and enter the url provided on Serial Monitor, i.e. http://esp8266-webupdate.local/update. Once entered, browser should display a form like below that has been served by your module. The form invites you to choose a file for update.
233+
228234
![OTA update form in web browser](ota-web-browser-form.png)
235+
229236
**Note:** If entering “http://esp8266-webupdate.local/update” does not work, try replacing “esp8266-webupdate” with module’s IP address. For example, if your module IP is “192.168.1.100” then url should be “http://192.168.1.100/update”. This workaround is useful in case the host software installed in step 2 does not work. If still nothing works and there are no clues on Serial Monitor, try to diagnose issue by opening provided url in Google Chrome, pressing F12 and checking contents of “Console” and “Network” tabs. Chrome provides some advanced logging on these tabs.
230237

231238

@@ -241,7 +248,7 @@ You can use another module if it meets “Flash chip size is 2x the size of the
241248

242249
![Serial Monitor - after OTA update](ota-web-serial-monitor-reboot.png)
243250

244-
Just after reboot you should see exactly the same message “HTTPUpdateServer ready! Open http:// esp8266-webupdate.local /update in your browser” like in step 3. This is because module has been loaded again with the same code – first using serial port, and then using OTA.
251+
Just after reboot you should see exactly the same message “HTTPUpdateServer ready! Open http:// esp8266-webupdate.local /update in your browser” like in step 3. This is because module has been loaded again with the same code – first using serial port, and then using OTA.
245252

246253
Once you are comfortable with this procedure go ahead and modify WebUpdater.ino sketch to print some additional messages, compile it, locate new binary file and upload it using web browser to see entered changes on a Serial Monitor.
247254

0 commit comments

Comments
 (0)