From 1afb3c7bb338eba0410f85be8e5eaf192a7c4857 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Tue, 4 Aug 2020 10:20:54 +0300 Subject: Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation During testing with L4G1 device I discovered some inconsistencies in behaviour between EG25-G device and EG95 devices (EG95-NA and EG95-E). EG25-G device that I have on hands does not allow to perform downgrades using delta images. When there is an attempt to apply a downgrade delta image it behaves as the following: - radio prints `OK` - radio prints `+QIND: "FOTA",502` - radio is not rebooted While EG95 radios always reboot at least once to apply the firmware image. Even if it is not valid. Also I noticed that detach from the serial bus may take more than 10 seconds in some rare cases. Thus we need to wait not a fixed amount of time but until the radio actually detaches from the bus. This commit attempts to address the findings described above. --- include/mts/MTS_IO_QuectelRadio.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h index 58e3d25..0f24db8 100644 --- a/include/mts/MTS_IO_QuectelRadio.h +++ b/include/mts/MTS_IO_QuectelRadio.h @@ -86,6 +86,9 @@ namespace MTS { CODE fumoWaitUpgradeFinished(UpdateCb& stepCb); CODE fumoWaitNewFirmware(UpdateCb& stepCb); + /// Parse error code in early FUMO URC result received before the first attempt to flash the firmware + std::string getFumoEarlyErrorCode(const std::string& sRadioInput); + /// Get value from container by its index, use default value if not found. Non-template version. const std::string& getByIndex(const std::vector& vector, size_t index, const std::string& defaultValue) { if (index >= vector.size()) { -- cgit v1.2.3