I am creating a procedure for uploading firmware created in Mongoose OS to an ESP32. The procedure should look like this:
- Upload the test firmware.
- Test the electronics on a functional tester.
- Retrieve the ESP32 MAC number through the testing software using the ‘mos call Sys.GetInfo’ command.
- Enable flash encoding.
- Upload the production firmware.
- Upload my ‘conf5.json’ file with the hardware configuration (we have several hardware versions and one firmware).
- Upload the keys to AWS and mDash.
- Upload the license key.
- Save the production information in our database.
- Disable RPC for UART and HTTP.
However, I have a problem with permanently uploading the AWS configuration. Both the ‘aws-iot-setup’ and ‘mdash-setup’ commands save the configuration in the ‘conf9.json’ file, which is deleted when the device is reset to factory settings. Is there a way to save it directly to another file, such as ‘conf6.json’, or do I have to download ‘conf9.json’, rename it to ‘conf6.json’, and then upload it using the ‘mos put conf6.json’ command?
Is there a simpler or better way to do this?