diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-08-04 12:21:10 +0300 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-08-04 12:32:04 +0300 |
commit | 51a4db87617b4dc7d9276e31298d0a9d44ecb69e (patch) | |
tree | e08fa5ab5a84ed2112a9574a45ff4b749e23d299 /src | |
parent | 1afb3c7bb338eba0410f85be8e5eaf192a7c4857 (diff) | |
download | libmts-io-51a4db87617b4dc7d9276e31298d0a9d44ecb69e.tar.gz libmts-io-51a4db87617b4dc7d9276e31298d0a9d44ecb69e.tar.bz2 libmts-io-51a4db87617b4dc7d9276e31298d0a9d44ecb69e.zip |
Quectel EG25-G Delta Radio Firmware Upgrade support - libmts-io implementation
CellularRadio::resetConnection implementations disables serial echo on connection reset.
Serial echo is disabled using ATE0 command, radio may handle it and return an OK response.
During testing I discovered that EG25 radio does not return an OK response in 100ms
(default timeout time) and this OK response may conflict with successive AT commands.
This commit adds a simple "AT" command to be executed before getVendorFirmware to "eat"
all the data accumulated in the buffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/MTS_IO_QuectelRadio.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp index 7d205e7..96a4980 100644 --- a/src/MTS_IO_QuectelRadio.cpp +++ b/src/MTS_IO_QuectelRadio.cpp @@ -1104,7 +1104,9 @@ ICellularRadio::CODE QuectelRadio::fumoWaitNewFirmware(ICellularRadio::UpdateCb& MTS::Thread::sleep(10000); - if (getVendorFirmware(sQuectelFirmware) != SUCCESS) { + // sendBasicCommand "eats" and clears all the extra data present in the buffer, + // both commands shall succeed + if (sendBasicCommand("AT") != SUCCESS || getVendorFirmware(sQuectelFirmware) != SUCCESS) { // The radio is probably unavailable resetConnection(100); continue; |