Secure Over-the-air (OTA) firmware updates for microcontrollers like ESP32 - Seminararbeit
This is a paper that was written by me at the Munich University of Applied Sciences in the course of the main seminar in the summer semester 2021. This repository incldues the paper (./latex
) and the implementation code (./demo
).
Testing
Requirements
- AWS Account
- Domain hosted in AWS Route53
- ESP32 (hardware)
- Python3.8+
- OpenSSL
- aws-cli
- terraform
- VS Code
- esp-idf extension for VS Code
Four step setup (Unix systems)
- Install the required tools
- aws-cli (also configure it with your credentials)
- terraform
- esp-idf extension for VS Code (install esp-idf with this extension)
- Open shell inside the
demo
folder and executesetup.sh
- Build & flash firmware to your ESP32
- create
./main/secrets.h
with your WiFi settings:#define WIFI_SSID <ssid> #define WIFI_PASSPHARSE <password>
- build firmware
- flash firmware to ESP32
- create
- Build & upload new firmware
- change version string inside
version.txt
- build new firmware but clean build folder before
- upload to firmware S3 bucket
- change version string inside
Now if you start monitoring your ESP32 with the old firmware you will see the ESP32 trying to connect to your configured WiFi network. After successfully connecting to the WiFi it tries to get the new firmware. If you have done everythin right you will see your device reboot wiht the new firmware.
Four step setup (Windows systems)
- Use WSL: link