Browse Source

Fixes to BG96

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
v_master
Sara Damiano 5 years ago
parent
commit
d85e83f049
2 changed files with 8 additions and 5 deletions
  1. +7
    -4
      src/TinyGsmClientBG96.h
  2. +1
    -1
      src/TinyGsmClientSequansMonarch.h

+ 7
- 4
src/TinyGsmClientBG96.h View File

@ -231,7 +231,7 @@ TINY_GSM_MODEM_GET_INFO_ATI()
if (waitResponse(60000L, GF("POWERED DOWN")) != 1) {
return false;
}
delay(3000);
waitResponse(5000L, GF("RDY"));
return init();
}
@ -348,8 +348,11 @@ TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED()
*/
String getLocalIP() {
sendAT(GF("+QILOCIP"));
stream.readStringUntil('\n');
sendAT(GF("+CGPADDR=1"));
if (waitResponse(GF(GSM_NL "+CGPADDR:")) != 1) {
return "";
}
streamSkipUntil(','); // Skip context id
String res = stream.readStringUntil('\n');
if (waitResponse() != 1) {
return "";
@ -590,7 +593,7 @@ protected:
sendAT(GF("+QISTATE=1,"), mux);
//+QISTATE: 0,"TCP","151.139.237.11",80,5087,4,1,0,0,"uart1"
if (waitResponse(GF("+QISTATE:")))
if (waitResponse(GF("+QISTATE:")) != 1)
return false;
streamSkipUntil(','); // Skip mux


+ 1
- 1
src/TinyGsmClientSequansMonarch.h View File

@ -214,7 +214,7 @@ public:
// with CFUN=0 not CFUN=1 (that is, at minimum functionality instead of full functionality
// The module cannot even detect the sim card if the cellular functionality is disabled so
// unless we explicitly enable the functionality the init will fail.
sendAT(GF("+CFUN=1")); // turn off error codes
sendAT(GF("+CFUN=1"));
waitResponse();
int ret = getSimStatus();


Loading…
Cancel
Save