diff options
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 129a3ae..2a92e15 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -525,6 +525,7 @@ CellularRadio::CODE CellularRadio::getService(std::string& sService) { case 1: sService = "EGPRS"; break; case 2: sService = "WCDMA"; break; case 3: sService = "HSDPA"; break; + case 4: sService = "LTE"; break; default: sService = VALUE_UNKNOWN; break; } @@ -932,11 +933,11 @@ CellularRadio::CODE CellularRadio::getNetworkStatus(Json::Value& jData) { std::string sValue; const uint32_t GSM_NETWORK_FORMAT = 14; const uint32_t WCDMA_NETWORK_FORMAT = 19; - const uint32_t LTE_NETWORK_FORMAT = 16; + const uint32_t LTE_NETWORK_FORMAT = 17; printTrace("%s| Get Network Status", m_sName.c_str()); std::string sCmd("AT#RFSTS"); - std::string sResult = sendCommand(sCmd); + std::string 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()); return FAILURE; @@ -1019,24 +1020,25 @@ CellularRadio::CODE CellularRadio::getNetworkStatus(Json::Value& jData) { } else if(vParts.size() >= LTE_NETWORK_FORMAT) { Json::Value jDebug; - //Parse as WCDMA Network Format + //Parse as LTE Network Format jDebug["rsrp"] = vParts[2]; jDebug[KEY_RSSIDBM] = vParts[3]; jDebug["rsrq"] = vParts[4]; jData["tac"] = vParts[5]; - jDebug[KEY_TXPWR] = vParts[6]; + jData[KEY_RAC] = vParts[6]; + jDebug[KEY_TXPWR] = vParts[7]; //Odd empty index at 7 jData[KEY_DRX] = vParts[8]; jDebug[KEY_MM] = vParts[9]; jDebug["rrc"] = vParts[10]; - jDebug[KEY_CID] = vParts[11]; + jData[KEY_CID] = vParts[11]; jData[KEY_IMSI] = MTS::Text::strip(vParts[12], '"'); jData[KEY_NETWORK] = MTS::Text::strip(vParts[13], '"'); - if(MTS::Text::parse(iValue, vParts[13]) && convertServiceDomainToString((SERVICEDOMAIN)iValue, sValue) == SUCCESS) { + if(MTS::Text::parse(iValue, vParts[14]) && convertServiceDomainToString((SERVICEDOMAIN)iValue, sValue) == SUCCESS) { jDebug[KEY_SD] = sValue; } //Ignoring Active Set Values |