Move up QIMODE and QIMUX

This commit is contained in:
Sara Damiano
2019-09-03 13:24:52 -04:00
parent 1651e9f0bc
commit 58ff6b42dd
2 changed files with 24 additions and 24 deletions

View File

@@ -346,6 +346,18 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false;
}
// Select TCP/IP transfer mode - NOT transparent mode
sendAT(GF("+QIMODE=0"));
if (waitResponse() != 1) {
return false;
}
// Enable multiple TCP/IP connections
sendAT(GF("+QIMUX=1"));
if (waitResponse() != 1) {
return false;
}
//Activate GPRS/CSD Context
sendAT(GF("+QIACT"));
if (waitResponse(60000L) != 1) {
@@ -369,18 +381,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false;
}
// Select TCP/IP transfer mode - NOT transparent mode
sendAT(GF("+QIMODE=0"));
if (waitResponse() != 1) {
return false;
}
//Enable multiple TCP/IP connections
sendAT(GF("+QIMUX=1"));
if (waitResponse() != 1) {
return false;
}
return true;
}

View File

@@ -358,6 +358,18 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false;
}
// Select TCP/IP transfer mode - NOT transparent mode
sendAT(GF("+QIMODE=0"));
if (waitResponse() != 1) {
return false;
}
// Enable multiple TCP/IP connections
sendAT(GF("+QIMUX=1"));
if (waitResponse() != 1) {
return false;
}
//Activate GPRS/CSD Context
sendAT(GF("+QIACT"));
if (waitResponse(60000L) != 1) {
@@ -381,18 +393,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false;
}
// Select TCP/IP transfer mode - NOT transparent mode
sendAT(GF("+QIMODE=0"));
if (waitResponse() != 1) {
return false;
}
//Enable multiple TCP/IP connections
sendAT(GF("+QIMUX=1"));
if (waitResponse() != 1) {
return false;
}
return true;
}