You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With version 2.0.0 LCM has arrived to a new stage with its own adaptation of rboot - rboot4lcm - which counts powercycles.
18
-
These are used to check updates, reset wifi clear or set LCM_beta or factory reset. It also gives access to the emergency mode.
13
+
These are used to check updates, reset wifi, clear or set LCM_beta or factory reset. It also gives access to the emergency mode.
19
14
Setting a value for a led_pin visual feedback is possible.
20
15
By having introduced the latest-pre-release concept in version 1.0.0, users (and LCM itself) can test new software before exposing it to production devices.
21
16
See the 'How to use it' section.
22
17
23
-
In version 2.2.x there is a new possibility for those user apps that need some configuration data to work that is specific to each instantiation.
24
-
One can set the ota_string parameter which can be parsed by the user app to set e.g. MQTT server, user and password or whatever else you fancy.
25
-
Since it is to the user app to parse it, you test whatever works for you within the cgi transfer of parameters.
26
-
Using the 'erase wifi' mode, new settings can also be set again when needed.
27
-
28
18
https://github.com/HomeACcessoryKid/ota-demo has been upgraded to offer system-parameter editing features which allows for flexible testing of the LCM code.
29
19
30
20
## Scope
@@ -34,7 +24,7 @@ This is a program that allows any simple repository based on esp-open-rtos on es
34
24
- assign app specific and device specific parameters
35
25
- update the user app over the air by using releases and versions on GitHub
36
26
37
-
## New feature version 2
27
+
## New features version 2
38
28
39
29
This new LCM code is able to load/update the bootloader from github.
40
30
The new bootloader is able to count the amount of short power cycles (<1.5s)
@@ -74,6 +64,15 @@ If `ota_count_step=="1"`
74
64
75
65
Missing or other `ota_count_step` values will be interpreted as 3
76
66
67
+
In version 2.2.5 there are two new features:
68
+
There is a new possibility for those user apps that need some configuration data to work that is specific to each instantiation.
69
+
One can set the `ota_string` parameter which can be parsed by the user app to set e.g. MQTT server, user and password or whatever else you fancy.
70
+
Since it is up to the user app to parse it, you test whatever works for you within the cgi transfer of parameters.
71
+
Also, using the 'erase wifi' mode, new settings can be set again when needed.
72
+
73
+
There also exists the possibility to set the sysparam `ota_count` to activate the 'erase wifi' etc from the user app as well.
74
+
75
+
77
76
## Non-typical solution
78
77
The solution is dedicated to a particular set of repositories and devices, which I consider is worth solving.
79
78
- Many ESP8266 devices have only 1Mbyte of flash
@@ -133,13 +132,13 @@ User device setup part
133
132
- wipe out the entire flash (not essential, but cleaner)
- (or otabootbeta.bin if enrolling in the LCM pre-release testing)
141
140
- start the code and either use serial input menu or wait till the Wifi AP starts.
142
-
- set the repository you want to use in your device. yourname/repository and name of binary
141
+
- set the repository you want to use in your device: `yourname/repository` and name of binary
143
142
- then select your Wifi AP and insert your password
144
143
- once selected, it will take up to 5 minutes for the system to download the ota-main software in the second bootsector and the user code in the 1st boot sector
145
144
- you can follow progress on the serial port or use the UDPlogger using the terminal command `nc -kulnw0 45678`
@@ -201,12 +200,6 @@ From the sector containing up to date certificates the sha384 hash has been sign
201
200
Using the available public key, the validity is verified.
202
201
From here, the files are intended to be downloaded with server certificate verification activated. If this fails, the server is marked as invalid.
203
202
204
-
```
205
-
server valid?
206
-
```
207
-
If in the previous steps the server is marked invalid, we return to the main app in boot slot 0 and we report by syslog to a server (to be determinded) so we learn that github has changed its certificate CA provider and HomeACessoryKid can issue a new certificate sector.
208
-
Now that the downloading from GitHub has been secured, we can trust whatever we download based on a checksum.
209
-
210
203
```
211
204
new boot version?
212
205
```
@@ -216,14 +209,20 @@ This will download the latest version of [rboot4lcm](https://github.com/HomeACce
216
209
new OTA version?
217
210
download OTA-boot➔0
218
211
update OTA-main➔1
219
-
checksum OK?
212
+
sig & checksum OK?
220
213
```
221
214
222
215
We verify if there is an update of this OTA repo itself? If so, we use ota-boot to self update. After this we have the latest OTA code.
223
216
217
+
```
218
+
server valid?
219
+
```
220
+
If by checking the certificates the server is marked invalid, we return to the main app in boot slot 0 and we report by syslog to a server (to be determinded) so we learn that github has changed its certificate CA provider and HomeACessoryKid can issue a new certificate sector.
221
+
Now that the downloading from GitHub has been secured, we can trust whatever we download based on a checksum.
222
+
224
223
```
225
224
OTA-main(1) updates User app➔0
226
-
checksum OK?
225
+
sig & checksum OK?
227
226
```
228
227
Using the baseURL info and the version as stored in sysparam area, the latest binary is found and downloaded if needed. If the checksum does not work out, we return to the OTA app start point considering we cannot run the old code anymore.
229
228
But normally we boot the new code and the mission is done.
0 commit comments