Skip to content

Commit 997a45b

Browse files
committed
Arduino IDE section - initial release
Still need to add pictures
1 parent 11340a5 commit 997a45b

File tree

1 file changed

+67
-1
lines changed

1 file changed

+67
-1
lines changed

doc/ota_updates.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,83 @@ title: OTA Update
88
* [HTTP Server](#http-server)
99
* [Stream Interface](#stream-interface)
1010

11+
## Introduction
12+
13+
OTA (Over the Air) update is the process of loading the firmware to ESP module using WiFi connection rather that a serial port. Such functionality became extremely useful in case of limited or no physical access to the module. There is no imposed protection on OTA update process. Such protection should be implemented by developer to ensure that updates are allowed only from legitimate / trusted source.
14+
15+
OTA may be done from:
16+
- Arduino IDE
17+
- HTTP server
18+
19+
In any case first firmware upload have to be done over a serial port. If OTA routines are correctly implemented in sketch, then all subsequent uploads may be done over the air.
20+
21+
The following chapters provide more details and both methods of doing OTA.
22+
23+
1124
## Basic Requirements
1225

1326
- Flash chip size is 2x the size of the sketch.
1427

1528
## Arduino IDE
1629

17-
TODO describe Arduino IDE OTA process
30+
Uploading modules wirelessly from Arduino IDE is intended for the following typical scenarios:
31+
- during firmware development as a quicker alternative to loading over a serial
32+
- for updating small quantity of modules
33+
- only if modules are available on the same network as the computer with Arduino IDE
1834

1935
#### Requirements
2036
- The ESP and the computer must be connected to the same network.
2137

38+
#### Let Us Do It
39+
40+
OTA process will be demonstrated using:
41+
- DNS_SD_Arduino_OTA.ino sketch available from Arduino IDE
42+
- NodeMCU 1.0 board with ESP-12E module
43+
44+
1. Before you begin, please make sure that you have the following installed:
45+
- Arduino IDE and ESP8266 board support as described under https://github.com/esp8266/Arduino#installing-with-boards-manager
46+
- Python 2.7.10 (do not install Python 3.5.0 that is not supported):
47+
1. Upload Python from https://www.python.org/
48+
2. Start installer
49+
3. Select “Add python.exe to Path” (see below – that option is not selected by default)
50+
4. Complete remaining steps of installation
51+
52+
53+
2. Now prepare the sketch and configuration for the upload over a serial port.
54+
55+
- Start Arduino IDE and load sketch DNS_SD_Arduino_OTA.ino available under File > Examples > ESP8266mDNS
56+
57+
[PICTURE]
58+
59+
- Update ssid and pass in the sketch so the module can join your WiFi network
60+
61+
[PICTURE]
62+
63+
- Configure upload parameters as below (you may need to adjust configuration if you are using a different module):
64+
65+
[PICTURE]
66+
67+
3. Upload the sketch (Ctrl+U). Once done open Serial Monitor (Ctrl+Shift+M) and check if the module has joined your WiFi network.
68+
69+
[PICTURE]
70+
71+
4. Only if module is connected, after a dozen (or two dozens) of seconds the esp8266-ota port will show up in Arduino IDE:
72+
73+
[PICTURE]
74+
75+
5. Now get ready for your first OTA upload by changing configuration settings as follows:
76+
77+
[PICTURE]
78+
79+
6. If you have successfully completed all the above steps, you can upload (Ctrl+U) the same (or any other) sketch over OTA:
80+
81+
[PICTURE]
82+
83+
**Note**
84+
85+
To be able to upload your sketch over and over again using OTA, you need to embed inside OTA routines. Please use DNS_SD_Arduino_OTA.ino as an example.
86+
87+
2288
## HTTP Server
2389

2490
```ESPhttpUpdate``` class can check for updates and download a binary file from HTTP web server.

0 commit comments

Comments
 (0)