summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-07-15 17:46:22 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-07-15 17:50:09 +0300
commit60f4460b88b7c72f738dba47843961076c21ab9a (patch)
treefc41b557fc2323c1f6047ef778ca8c9303ae2308 /src
parent05628f9b5868c60d68aa750f547b010d22ac27b4 (diff)
downloadlibmts-io-60f4460b88b7c72f738dba47843961076c21ab9a.tar.gz
libmts-io-60f4460b88b7c72f738dba47843961076c21ab9a.tar.bz2
libmts-io-60f4460b88b7c72f738dba47843961076c21ab9a.zip
[MTS-MTQ] SIM status and PIN unlock procedures
Increased timeout for the AT+QPINC="SC" command up to 2 seconds as the modem fails to respond in the current 500ms time limit while executing several successive commands.
Diffstat (limited to 'src')
-rw-r--r--src/MTS_IO_QuectelRadio.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp
index b8c781f..a9f9721 100644
--- a/src/MTS_IO_QuectelRadio.cpp
+++ b/src/MTS_IO_QuectelRadio.cpp
@@ -525,9 +525,9 @@ CellularRadio::CODE QuectelRadio::getIsSimInserted(bool& bData) {
CellularRadio::CODE QuectelRadio::getSimLockAttempts(int& iAttemptsPin, int& iAttemptsPuk) {
printTrace("%s| Get SIM unlock attempts left", getName().c_str());
- // AT+QPINC execution can take up to 300ms according to the datasheet. Setting timeout to 500ms just for sure.
+ // AT+QPINC execution can take more time that expected. Set timeout to 2s just to be sure.
std::string sCmd("AT+QPINC=\"SC\"");
- std::string sResult = sendCommand(sCmd, DEFAULT_BAIL_STRINGS, 500);
+ std::string sResult = sendCommand(sCmd, DEFAULT_BAIL_STRINGS, 2000);
const std::string sPrefix = "+QPINC: \"SC\",";
size_t start = sResult.find(sPrefix);