SWAT-engineering / kiwi-air-monitor

Kiwi monitor is an open source CO2/Humidity/Temperature sensor intended for monitoring the quality of the air in a room. Kiwi was created to support teachers with a notification to ventilate their classroom.
https://www.kiwimonitor.nl/
GNU General Public License v3.0
10 stars 2 forks source link

Add OTA support #8

Closed DavyLandman closed 4 years ago

DavyLandman commented 4 years ago

Progress: OTA works, but requires a custom HTTP server, and at a later stage will need some work to enable either signing of firmware or https.

Custom HTTP server needs to determine which version of the firmware to offer to which client, in order to avoid re-flashing the same version multiple times.

Alternativly, encode the the version in the filename, so that you send a request like:

GET /update-from-v1.0.0.bin
DavyLandman commented 4 years ago

Finished.

Update url is fixed in flash, is a regular http server no need for https.

We send the MD5 of the firmware via mqtt, and we compare that to the current flashed firmware, if it is different, we download the updated firmware, and only flash it if it's the correct md5.