Move up QIMODE and QIMUX
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user