Browse Source

Need to check better for the URC

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

+ 7
- 4
src/TinyGsmClientSaraR4.h View File

@ -623,10 +623,13 @@ protected:
"arrival of +UUSOCO: ",
mux);
sendAT(GF("+USOCO="), *mux, ",\"", host, "\",", port, ",1");
waitResponse(timeout_ms, GF(GSM_NL "+UUSOCO: "));
stream.readStringUntil(',').toInt(); // skip repeated mux
int connection_status = stream.readStringUntil('\n').toInt();
return (0 == connection_status);
if (waitResponse(timeout_ms, GF(GSM_NL "+UUSOCO: ")) == 1) {
stream.readStringUntil(',').toInt(); // skip repeated mux
int connection_status = stream.readStringUntil('\n').toInt();
return (0 == connection_status);
} else {
return false;
}
} else {
// use synchronous open
sendAT(GF("+USOCO="), *mux, ",\"", host, "\",", port);


Loading…
Cancel
Save