summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mts/MTS_IO_TelitRadio.h6
-rw-r--r--src/MTS_IO_TelitRadio.cpp53
2 files changed, 2 insertions, 57 deletions
diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h
index 7162dfb..70ff8a9 100644
--- a/include/mts/MTS_IO_TelitRadio.h
+++ b/include/mts/MTS_IO_TelitRadio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 by Multi-Tech Systems
+ * Copyright (C) 2019 by Multi-Tech Systems
*
* This file is part of libmts-io.
*
@@ -47,9 +47,7 @@ namespace MTS {
bool getHardwareVersionFromFirmware(const std::string& sFirmware, std::string& sHardware) override;
private:
- std::string queryLteLac();
- std::string queryCGREGstring();
- void setCGREG(std::string value);
+
};
}
}
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp
index bfcb42e..8f747f8 100644
--- a/src/MTS_IO_TelitRadio.cpp
+++ b/src/MTS_IO_TelitRadio.cpp
@@ -396,59 +396,6 @@ CellularRadio::CODE TelitRadio::getNetworkStatus(Json::Value& jData) {
return SUCCESS;
}
-
-// Get the LAC for the LTE radio that's not in the #RFSTS response
-std::string TelitRadio::queryLteLac() {
- std::string CGREGstring;
- std::string originalCGREG;
- std::string result;
-
- CGREGstring = queryCGREGstring();
- if (CGREGstring == RSP_ERROR) {
- originalCGREG = "0";
- } else {
- originalCGREG = CGREGstring.at(CGREGstring.find(",") - 1); //Position right before first comma ("+CGREG: 0,1")
- }
-
- // Temporarily set CGREG=2 to get more info
- setCGREG("2");
-
- CGREGstring = queryCGREGstring();
- if (CGREGstring == RSP_ERROR) {
- result = CellularRadio::VALUE_UNKNOWN;
- } else {
- size_t start = CGREGstring.find(":") + 1; //Position right after "#RFSTS:"
- std::vector<std::string> vParts = MTS::Text::split(MTS::Text::trim(CGREGstring.substr(start)), ",");
- if(vParts.size() < 3) {
- result = CellularRadio::VALUE_UNAVAILABLE;
- } else {
- result = MTS::Text::strip(vParts[2], '"');
- }
- }
-
- setCGREG(originalCGREG);
-
- return result;
-}
-
-void TelitRadio::setCGREG(std::string value) {
- std::string sCmd("AT+CGREG=" + value);
- std::string cmdResult(sendCommand(sCmd));
- if (cmdResult.find("OK") == std::string::npos) {
- printDebug("%s| AT#CGREG=%s returned unexpected response: [%s][%s]", getName().c_str(), value.c_str(), sCmd.c_str(), cmdResult.c_str());
- }
-}
-
-std::string TelitRadio::queryCGREGstring() {
- std::string sCmd("AT+CGREG?");
- std::string cmdResult(sendCommand(sCmd));
- if (cmdResult.find("+CGREG:") == std::string::npos) {
- printDebug("%s| AT#CGREG? returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str());
- return RSP_ERROR;
- }
- return cmdResult;
-}
-
CellularRadio::CODE TelitRadio::convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& iDbm) {
//Telit Conversion