Hi.I have the hardware: STM32H7 microcontroller and EG915U module, connected only RxD and TxD (and also PWR_KEY and RST). Is it possible to update firmware of module by feeding it a file from the microcontroller?
Document “EC200U&EG91xU Series FOTA Application Note” is unclear for me:
If main UART is used, you need to set hardware flow control
and next:
If it is not set, the speed at which the host can send the target firmware package should be limited.
Question is (beside if it possible without hw flow control) how should I send this firmware from microcontroller? Should I send raw data of file to uart? Any delays? Some burst?
I’m going to communicate at full speed, ie 2 100 000 bps.
For FOTA, if you need to send the fota pacakge into the firmware, you need to use the FILE AT command to send the packge into the modem.
You need to read the pacakge into memory and use the FILE command to upload the file into the modem.
It is better to use MQTT and HTTP.
Your procedure is unclear for me.
Document “EC200U&EG91xU Series FOTA Application Note” describes the procedure as follows:
Step 1: Open the serial port…
Step 2: Send AT+IFC=2,2 to open the hardware flow control.
Step 3: Select the target firmware package form external MCU.
Step 4: Send AT+QFOTADL=“FILE:”[,<upgrade_mode>[,<download_URC_max>[,<update_URC_max>]]].
Step 5: Send the target firmware package to the module.
And there is an example:
// When the target firmware package is stored on external MCU, use the File method to upgrade the
firmware through the USB AT port.
AT+QFOTADL=“FILE:1200”,1,50,100 //The length of target firmware package is 1200 bytes.
OK
+QIND: “FOTA”,“FILESTART”
//Wait for external MCU to send target firmware package through the serial port tool to the module.
+QIND: “FOTA”,“DOWNLOADING”,2
+QIND: “FOTA”,“DOWNLOADING”,4
…
+QIND: “FOTA”,“DOWNLOADING”,100
+QIND: “FOTA”,“FILEEND”,0
// Immediately upgrade firmware through FOTA after successfully downloading target firmware package.
+QIND: “FOTA”,“START”
+QIND: “FOTA”,“UPDATING”,1
+QIND: “FOTA”,“UPDATING”,2
…
+QIND: “FOTA”,“UPDATING”,100
+QIND: “FOTA”,“END”,0 //Upgrade the firmware successfully.
So please describe what you think the procedure should look like? As you mentioned FILE commands, should I use AT+QFUPL? And what next, how to update using an internal file?