summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2020-05-12 07:42:23 -0500
committerJeff Hatch <jhatch@multitech.com>2020-05-12 07:42:23 -0500
commitb3a9a71afdb0d6f4f104543cedba89d011ca68df (patch)
treec05ea36e404164039b190d96f2b8446c5b017d24
parentf3c24e90ea78d45e995e048a2c60ab828995fd3f (diff)
parent9a78ce7478a507337bc78967e7ed244c5179b45c (diff)
downloadlibmts-io-b3a9a71afdb0d6f4f104543cedba89d011ca68df.tar.gz
libmts-io-b3a9a71afdb0d6f4f104543cedba89d011ca68df.tar.bz2
libmts-io-b3a9a71afdb0d6f4f104543cedba89d011ca68df.zip
Merge branch 'sk/IN-4033-sim-card-not-detected' into 'master' 1.0.21
[IN:4033] MTCDTIP-L4N1 does not provide No SIM message. See merge request !18
-rw-r--r--src/MTS_IO_CellularRadio.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index 191299b..50fdf5c 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -306,7 +306,7 @@ ICellularRadio::CODE CellularRadio::getSimStatusSummary(Json::Value& jData) {
}
if (!bIsSimInserted) {
- // There is no left much to do. Return one field only.
+ // There is not much left to do. Return one field only.
jData[KEY_IS_SIM_INSERTED] = bIsSimInserted;
break;
}
@@ -314,6 +314,16 @@ ICellularRadio::CODE CellularRadio::getSimStatusSummary(Json::Value& jData) {
// The following code assumes that the SIM card is inserted
retCode = getSimLockStatus(sSimLockStatus);
if (retCode != SUCCESS) {
+ /* IN:4033:
+ *
+ * On some devices #SIMDET reports "inserted" but +CPIN? returns ERROR when there is
+ * no SIM card in the slot. It's also the case when only plastic holder is inserted
+ * instead of the SIM itself.
+ *
+ * Interpret this error as "SIM card not detected" for such cases.
+ */
+ jData[KEY_IS_SIM_INSERTED] = false;
+ retCode = SUCCESS;
break;
}