Hello,
We are developing an FW using QuecOpen and FreeRTOS provided by the SDK.
About the DFOTA upgrade, we did some tests and it seems that we do not have able time to catch the result of the DFOTA SUCCESS return, that is, the module reboots immediately after the SUCCESS of installing the new firmware.
Here is the logs:
AT+QFOTADL="http://xxx.xxx.xxx.xxx:yyy/firmware_old1-TO-firmware_new.zip"
OK
L +QIND: "FOTA","HTTPSTART"
L +QIND: "FOTA","DOWNLOADING",57%
L +QIND: "FOTA","DOWNLOADING",100%
+QIND: "FOTA","HTTPEND",0
��x��������������x������x<� [ dummy messages .... ]
READY P
So, the READY P
message comes from the Ql_GetWakeUpReason()
API, where we simply assign a char to be printable, and we can see what was the restart cause.
However, the Ql_GetWakeUpReason()
is either limited (because it has jus a few restart reasons, 6 to be precise), or we are doing it wrong.
What we would expect is that Ql_GetWakeUpReason()
could return some more specific reason rather than a simple QL_POWERON
, which is too generic. Something more specific like QL_FOTAUPGRADE
or so would be more reasonable.
The possible values defined at ql_power.h are:
/* This enum defines the power on reason. */
typedef enum {
/* First power on or hardware reset */
QL_POWERON = 0,
/* software reset */
QL_SOFT_RESET = 1,
/* Wake up by RTC timer from deep sleep. TAU/ALARM(oc,onet)/USER RTC */
QL_RTCWAKEUP = 2,
/* Wake up by UART0-RXD from deep sleep */
QL_RXD_WAKEUP = 3,
/* Wake up by PSM_EINT0 from deep sleep */
QL_PSM_EINT0_WAKEUP = 4,
/* Wake up by PSM_EINT1 from deep sleep */
QL_PSM_EINT1_WAKEUP = 5,
/* others reset */
QL_UNKNOWN_PWRON,
} Enum_WakeUp_Reason;
So, the core question here is: how do we get the proper restart reason after a SUCCESSFULLY firmware upgrade from DFOTA?
P.S.: I am not sure yet if these dummy messages is because we use a different baudrate or what.
UPDATE 1:
By checking the Datasheet of DFOTA, after reboot it prints the URC: +QIND: "FOTA","END",<upgrade_result>
, but since we are using QuecOpen and FreeRTOS, I am not sure if we are able to catch that message (if the message is really thrown).
UPDATE 2:
We are using BC660K module.