summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <Jeff.Hatch@multitech.com>2017-07-13 07:36:27 -0500
committerJeff Hatch <Jeff.Hatch@multitech.com>2017-07-13 07:36:27 -0500
commit57b06af5b3e4e3c139cefbebb9fe76a8191c82ec (patch)
treed9288e1871d6a40f34f0ee0289864e6e03a0daf5
parentcb427be9a092b0968aee1a42a2bc805735c9c8f2 (diff)
downloadlibmts-io-1.0.2.tar.gz
libmts-io-1.0.2.tar.bz2
libmts-io-1.0.2.zip
Add support for US Cellular devices1.0.2
-rw-r--r--include/mts/MTS_IO_CellularRadio.h1
-rw-r--r--src/MTS_IO_CdmaRadio.cpp6
-rw-r--r--src/MTS_IO_CellularRadio.cpp11
3 files changed, 13 insertions, 5 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h
index 9d93162..0ec4ac8 100644
--- a/include/mts/MTS_IO_CellularRadio.h
+++ b/include/mts/MTS_IO_CellularRadio.h
@@ -229,6 +229,7 @@ namespace MTS {
static const std::string VALUE_CARRIER_VERIZON;
static const std::string VALUE_CARRIER_AERIS;
static const std::string VALUE_CARRIER_SPRINT;
+ static const std::string VALUE_CARRIER_USCELLULAR;
static const std::string VALUE_CARRIER_ATT;
static const std::string VALUE_CARRIER_TMOBILE;
diff --git a/src/MTS_IO_CdmaRadio.cpp b/src/MTS_IO_CdmaRadio.cpp
index 72923a7..5b53f02 100644
--- a/src/MTS_IO_CdmaRadio.cpp
+++ b/src/MTS_IO_CdmaRadio.cpp
@@ -1082,7 +1082,7 @@ CellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& step
std::string sCarrier;
getCarrier(sCarrier);
- if(sCarrier == "Aeris") {
+ if(sCarrier == VALUE_CARRIER_AERIS) {
if(!jArgs["msid"].isString()) {
printError("%s| Arguments missing \"msid\"", getName().c_str());
@@ -1122,8 +1122,10 @@ CellularRadio::CODE CdmaRadio::activate(const Json::Value& jArgs, UpdateCb& step
return SUCCESS;
- } else if(sCarrier == "Verizon") {
+ } else if(sCarrier == VALUE_CARRIER_VERIZON) {
sActivationCmd = "AT+CDV*22899\r";
+ } else if(sCarrier == VALUE_CARRIER_USCELLULAR) {
+ sActivationCmd = "AT+CDV*228\r";
} else {
return NOT_APPLICABLE;
}
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index 8f838b6..2acc064 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -86,6 +86,7 @@ const std::string CellularRadio::KEY_CARRIER("carrier"); //!< Cellular Service
const std::string CellularRadio::VALUE_CARRIER_VERIZON("Verizon");
const std::string CellularRadio::VALUE_CARRIER_AERIS("Aeris");
const std::string CellularRadio::VALUE_CARRIER_SPRINT("Sprint");
+const std::string CellularRadio::VALUE_CARRIER_USCELLULAR("U.S. Cellular");
const std::string CellularRadio::VALUE_CARRIER_ATT("AT&T");
const std::string CellularRadio::VALUE_CARRIER_TMOBILE("T-Mobile");
@@ -1588,7 +1589,7 @@ bool CellularRadio::getCarrierFromFirmware(const std::string& sFirmware, std::st
// "z" = is the product type, i.e. DUAL or SC
// "y" = is the carrier variant
// "x" = is the firmware version
- // Telit will do their best to keep the carrier variant as "0" for Sprint, "1" for Aeris, and "2" for Verizon.
+ // Telit will do their best to keep the carrier variant as "0" for Sprint, "1" for Aeris, "2" for Verizon, and "3" for U.S. Cellular.
const uint32_t CARRIER_INDEX = 1; //y in [zyx]
@@ -1607,14 +1608,18 @@ bool CellularRadio::getCarrierFromFirmware(const std::string& sFirmware, std::st
if(cId == '0') {
sCarrier = VALUE_CARRIER_SPRINT;
bResult = true;
- }
+ } else
if(cId == '1') {
sCarrier = VALUE_CARRIER_AERIS;
bResult = true;
- }
+ } else
if(cId == '2') {
sCarrier = VALUE_CARRIER_VERIZON;
bResult = true;
+ } else
+ if(cId == '3') {
+ sCarrier = VALUE_CARRIER_USCELLULAR;
+ bResult = true;
}
}
}