Skip to content

Commit 11340a5

Browse files
committed
Fix some typos
1 parent adb0dac commit 11340a5

File tree

1 file changed

+28
-36
lines changed

1 file changed

+28
-36
lines changed

doc/ota_updates.md

+28-36
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,45 @@ title: OTA Update
77
* [Arduino IDE](#arduino-ide)
88
* [HTTP Server](#http-server)
99
* [Stream Interface](#stream-interface)
10-
10+
1111
## Basic Requirements
1212

13-
- Flash chip size is 2x the size of the sketch
14-
13+
- Flash chip size is 2x the size of the sketch.
14+
1515
## Arduino IDE
1616

1717
TODO describe Arduino IDE OTA process
1818

1919
#### Requirements
20-
- The ESP and the Computer must be connected to the Same network.
21-
20+
- The ESP and the computer must be connected to the same network.
2221

2322
## HTTP Server
2423

25-
the ```ESPhttpUpdate``` class can check for updates and download a binary file form a HTTP web server.
26-
It is possible to download updates from every IP or domain address on the Network or Internet.
27-
24+
```ESPhttpUpdate``` class can check for updates and download a binary file from HTTP web server.
25+
It is possible to download updates from every IP or domain address on the network or Internet.
2826

2927
#### Requirements
3028
- web server
3129

32-
3330
#### Arduino code
3431

35-
##### simple updater
32+
##### Simple updater
3633

37-
the Simple Updater downloads the File every time the function is called.
34+
Simple updater downloads the file every time the function is called.
3835

3936
```cpp
4037
ESPhttpUpdate.update("192.168.0.2", 80, "/arduino.bin");
4138
```
4239

43-
##### advanced updater
40+
##### Advanced updater
4441

45-
Its possible to point to a script at the server.
46-
If a version String is delivered to the Function this String will be send to the server.
47-
A Server side Update check is now possible.
42+
Its possible to point update function to a script at the server.
43+
If version string argument is given, it will be sent to the server.
44+
Server side script can use this to check if update should be performed.
4845

49-
the Server can return a binary file for update (Header 200)
50-
or it return header 304 to notify the ESP that no Update is needed.
46+
Server side script can respond as follows:
47+
- response code 200, and send the firmware image,
48+
- or response code 304 to notify ESP that no update is required.
5149

5250
```cpp
5351
t_httpUpdate_return ret = ESPhttpUpdate.update("192.168.0.2", 80, "/esp/update/arduino.php", "optional current version string here");
@@ -59,23 +57,23 @@ switch(ret) {
5957
Serial.println("[update] Update no Update.");
6058
break;
6159
case HTTP_UPDATE_OK:
62-
Serial.println("[update] Update ok."); // may not called we reboot the ESP
60+
Serial.println("[update] Update ok."); // may not called we reboot the ESP
6361
break;
6462
}
6563
```
6664

6765
#### Server request handling
6866

69-
##### simple updater
67+
##### Simple updater
7068

71-
for the simple Updater the Server only needs to deliver the binary file for update.
69+
For the simple updater the server only needs to deliver the binary file for update.
7270

73-
##### advanced updater
71+
##### Advanced updater
7472

75-
for advanced update management a Script needs to run at the Server side, for example a PHP script.
76-
at every Update request the the ESP sends some informations in the Header to the Server
73+
For advanced update management a script needs to run at the server side, for example a PHP script.
74+
At every update request the the ESP sends some information in HTTP headers to the server.
7775

78-
example Header data:
76+
Example header data:
7977
```
8078
[HTTP_USER_AGENT] => ESP8266-http-Update
8179
[HTTP_X_ESP8266_STA_MAC] => 18:FE:AA:AA:AA:AA
@@ -87,10 +85,9 @@ example Header data:
8785
[HTTP_X_ESP8266_VERSION] => DOOR-7-g14f53a19
8886
```
8987

90-
with this information the script now can check if a update is needed.
91-
It is also possible to deliver different binary´s based on the MAC address for example.
88+
With this information the script now can check if a update is needed. It is also possible to deliver different binaries based on the MAC address for example.
9289

93-
script example:
90+
Script example:
9491
```php
9592
<?PHP
9693

@@ -118,10 +115,10 @@ if(!check_header('HTTP_USER_AGENT', 'ESP8266-http-Update')) {
118115
header($_SERVER["SERVER_PROTOCOL"].' 403 Forbidden', true, 403);
119116
echo "only for ESP8266 updater!\n";
120117
exit();
121-
}
118+
}
122119

123120
if(
124-
!check_header('HTTP_X_ESP8266_STA_MAC') ||
121+
!check_header('HTTP_X_ESP8266_STA_MAC') ||
125122
!check_header('HTTP_X_ESP8266_AP_MAC') ||
126123
!check_header('HTTP_X_ESP8266_FREE_SPACE') ||
127124
!check_header('HTTP_X_ESP8266_SKETCH_SIZE') ||
@@ -152,11 +149,6 @@ header($_SERVER["SERVER_PROTOCOL"].' 500 no version for ESP MAC', true, 500);
152149
```
153150

154151

155-
## Stream Interface
156-
157-
TODO describe Stream Interface update proccess
152+
## Updater class
158153

159-
```cpp
160-
ESP.updateSketch(client, length);
161-
```
162-
154+
TODO describe Updater class

0 commit comments

Comments
 (0)