steps to run
- clone the code
git clone git@github.com:sushenghua/IoT_Firmware_MQTT_Updater.git
- setup config.py set WORKING_PATH to the full path of folder containing this file
WORKING_PATH = 'fullPahtOfThisDirectory'
-
prepare CA files (follow Certificates in mosquitto to learn how to generate CA files and configurate them in the mosquitto broker. A handy script to generate CA files can be found at here) and copy 'ca.crt' into 'ca' foler.
-
prepare firmware bin file. For example, if the new binary named SensorApp.bin, version 1.10, board version 1.36, run the following script will generate description file for this binary to be used in 'firmware_updater.py'
python gen_description.py -v 1.10 -r 1.36 -b SensorApp.bin
- run the program
python firmware_updater.py