Browse Source

Move up QIMODE and QIMUX

v_master
Sara Damiano 5 years ago
parent
commit
58ff6b42dd
2 changed files with 24 additions and 24 deletions
  1. +12
    -12
      src/TinyGsmClientM95.h
  2. +12
    -12
      src/TinyGsmClientMC60.h

+ 12
- 12
src/TinyGsmClientM95.h View File

@ -346,6 +346,18 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false; 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 //Activate GPRS/CSD Context
sendAT(GF("+QIACT")); sendAT(GF("+QIACT"));
if (waitResponse(60000L) != 1) { if (waitResponse(60000L) != 1) {
@ -369,18 +381,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false; 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; return true;
} }


+ 12
- 12
src/TinyGsmClientMC60.h View File

@ -358,6 +358,18 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false; 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 //Activate GPRS/CSD Context
sendAT(GF("+QIACT")); sendAT(GF("+QIACT"));
if (waitResponse(60000L) != 1) { if (waitResponse(60000L) != 1) {
@ -381,18 +393,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
return false; 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; return true;
} }


Loading…
Cancel
Save