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