Browse Source

Fix getSimCCID, getModemInfo

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
36568bb595
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      TinyGsmClientA6.h

+ 14
- 2
TinyGsmClientA6.h View File

@ -221,6 +221,16 @@ public:
return waitResponse() == 1;
}
String getModemInfo() {
sendAT(GF("I"));
String res;
if (waitResponse(1000L, res) != 1) {
return "";
}
res.trim();
return res;
}
/*
* Power functions
*/
@ -250,7 +260,7 @@ public:
String getSimCCID() {
sendAT(GF("+CCID"));
if (waitResponse(GF(GSM_NL "+ICCID:")) != 1) {
if (waitResponse(GF(GSM_NL "+SCID: SIM Card ID:")) != 1) {
return "";
}
String res = stream.readStringUntil('\n');
@ -641,7 +651,9 @@ public:
data = "";
} else if (data.endsWith(GF("+TCPCLOSED:"))) {
int mux = stream.readStringUntil('\n').toInt();
sockets[mux]->sock_connected = false;
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT) {
sockets[mux]->sock_connected = false;
}
data = "";
DBG("### Closed: ", mux);
}


Loading…
Cancel
Save