Add getModemInfo

This commit is contained in:
Volodymyr Shymanskyy
2017-09-11 19:22:15 +03:00
parent 36568bb595
commit 355d967a35

View File

@@ -226,6 +226,16 @@ public:
return waitResponse() == 1;
}
String getModemInfo() {
sendAT(GF("I"));
String res;
if (waitResponse(1000L, res) != 1) {
return "";
}
res.trim();
return res;
}
/*
* Power functions
*/
@@ -581,7 +591,9 @@ public:
} else if (data.endsWith(GF("+TCPCLOSE:"))) {
int mux = stream.readStringUntil(',').toInt();
stream.readStringUntil('\n');
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT) {
sockets[mux]->sock_connected = false;
}
data = "";
DBG("### Closed: ", mux);
}