1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Update ota_updates.md

This commit is contained in:
Ivan Grokhotkov 2015-11-30 09:14:38 +03:00
parent a6e01b8d27
commit d45fe6a3d3

View File

@ -121,8 +121,9 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota-
2. Now prepare the sketch and configuration for the upload over a serial port. 2. Now prepare the sketch and configuration for the upload over a serial port.
- Start Arduino IDE and load sketch DNS_SD_Arduino_OTA.ino available under File > Examples > ESP8266mDNS - Start Arduino IDE and load sketch DNS_SD_Arduino_OTA.ino available under File > Examples > ESP8266mDNS
![OTA sketch selection](ota-ide-sketch-selection.png) ![OTA sketch selection](ota-ide-sketch-selection.png)
**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. **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.
- Update ssid and pass in the sketch so the module can join your Wi-Fi network - Update SSID and password in the sketch so the module can join your Wi-Fi network
![ssid and pass entry](ota-ide-ssid-pass-entry.png) ![ssid and pass entry](ota-ide-ssid-pass-entry.png)
- Configure upload parameters as below (you may need to adjust configuration if you are using a different module): - Configure upload parameters as below (you may need to adjust configuration if you are using a different module):
![configuration of serial upload](ota-ide-serial-upload-configuration.png) ![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-
4. Only if module is connected to network, after a couple of seconds, the esp8266-ota port will show up in Arduino IDE: 4. Only if module is connected to network, after a couple of seconds, the esp8266-ota port will show up in Arduino IDE:
![selection og OTA port](ota-ide-ota-port-selection.png) ![selection of OTA port](ota-ide-ota-port-selection.png)
5. Now get ready for your first OTA upload by changing configuration settings as follows: 5. Now get ready for your first OTA upload by changing configuration settings as follows:
@ -145,7 +146,7 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota-
![OTA upload complete](ota-ide-ota-upload-complete.png) ![OTA upload complete](ota-ide-ota-upload-complete.png)
**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. **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.
#### ArduinoOTA #### ArduinoOTA
@ -217,15 +218,21 @@ You can use another module if it meets “Flash chip size is 2x the size of the
- Start Arduino IDE and load sketch WebUpdater.ino available under File > Examples > ESP8266HTTPUpdateServer. - Start Arduino IDE and load sketch WebUpdater.ino available under File > Examples > ESP8266HTTPUpdateServer.
- Update ssid and pass in the sketch so the module can join your Wi-Fi network. - Update ssid and pass in the sketch so the module can join your Wi-Fi network.
- Open File > Preferences, look for “Show verbose output during:” and check out “compilation” option. - Open File > Preferences, look for “Show verbose output during:” and check out “compilation” option.
![Preferences - enablig verbose output during compilation](ota-web-show-verbose-compilation.png) ![Preferences - enablig verbose output during compilation](ota-web-show-verbose-compilation.png)
**Note:** This setting will be required in step 5 below. You can uncheck this setting afterwards. **Note:** This setting will be required in step 5 below. You can uncheck this setting afterwards.
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. 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.
![Serial Monitor - after first load using serial](ota-web-serial-monitor-ready.png) ![Serial Monitor - after first load using serial](ota-web-serial-monitor-ready.png)
**Note:** Such message will be shown only after module successfully joins network and is ready for an OTA upload:
**Note:** Such message will be shown only after module successfully joins network and is ready for an OTA upload.
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. 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.
![OTA update form in web browser](ota-web-browser-form.png) ![OTA update form in web browser](ota-web-browser-form.png)
**Note:** If entering “http://esp8266-webupdate.local/update” does not work, try replacing “esp8266-webupdate” with modules 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. **Note:** If entering “http://esp8266-webupdate.local/update” does not work, try replacing “esp8266-webupdate” with modules 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.