summaryrefslogtreecommitdiff
path: root/src/MTS_IO_CellularRadio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MTS_IO_CellularRadio.cpp')
-rw-r--r--src/MTS_IO_CellularRadio.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index c5b503d..cb1a59c 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -959,6 +959,16 @@ CellularRadio::CODE CellularRadio::getNetworkStatus(Json::Value& jData) {
sResult = sendCommand(sCmd, DEFAULT_BAIL_STRINGS, 200);
if (sResult.find("#RFSTS:") == std::string::npos) {
printDebug("%s| Network Status command returned unexpected response: [%s][%s]", m_sName.c_str(), sCmd.c_str(), sResult.c_str());
+
+ if (sResult.find(CellularRadio::RSP_OK) < 3) {
+ //Command returns only "OK". Actual response is usually "\r\nOK", so check index < 3
+ //This will happen when LTE radios don't have a signal
+ //Since AT#RFSTS failed, just get common network stats and return
+ //This will update RSSI which'll show that signal is gone
+ getCommonNetworkStats(jData);
+ printTrace("%s| Network Status:\n%s\n", m_sName.c_str(), jData.toStyledString().c_str());
+ return SUCCESS;
+ }
return FAILURE;
}