summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/MTS_IO_CellularRadio.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index 8eb35d5..7234a98 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -18,9 +18,9 @@
*
*/
-/*!
+/*!
\file MTS_IO_CellularRadio.cpp
- \brief A brief description
+ \brief A brief description
\date Nov 5, 2014
\author sgodinez
@@ -1047,6 +1047,7 @@ CellularRadio::CODE CellularRadio::getNetworkStatus(Json::Value& jData) {
jData[KEY_ABND] = radioBandMap.getRadioBandName();
// Get the LAC for the LTE radio that's not in the #RFSTS response
+ // Temporarily set CGREG=2 to get more info
sCmd = "AT+CGREG=2";
sResult = sendCommand(sCmd);
if (sResult.find("OK") == std::string::npos) {
@@ -1062,6 +1063,12 @@ CellularRadio::CODE CellularRadio::getNetworkStatus(Json::Value& jData) {
std::vector<std::string> vParts = MTS::Text::split(MTS::Text::trim(sResult.substr(start)), ",");
jData[KEY_LAC] = MTS::Text::strip(vParts[2], '"');
}
+ // Revert CGREG to default
+ sCmd = "AT+CGREG=0";
+ sResult = sendCommand(sCmd);
+ if (sResult.find("OK") == std::string::npos) {
+ printDebug("%s| AT#CGREG=0 returned unexpected response: [%s][%s]", m_sName.c_str(), sCmd.c_str(), sResult.c_str());
+ }
if(MTS::Text::parse(iValue, vParts[14]) && convertServiceDomainToString((SERVICEDOMAIN)iValue, sValue) == SUCCESS) {
jDebug[KEY_SD] = sValue;