Reorder some functions
This commit is contained in:
@@ -274,19 +274,6 @@ class TinyGsmSequansMonarch
|
||||
return waitResponse() == 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* SIM card functions
|
||||
*/
|
||||
protected:
|
||||
String getSimCCIDImpl() {
|
||||
sendAT(GF("+SQNCCID"));
|
||||
if (waitResponse(GF(GSM_NL "+SQNCCID:")) != 1) { return ""; }
|
||||
String res = stream.readStringUntil('\n');
|
||||
waitResponse();
|
||||
res.trim();
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic network functions
|
||||
*/
|
||||
@@ -301,6 +288,20 @@ class TinyGsmSequansMonarch
|
||||
return (s == REG_OK_HOME || s == REG_OK_ROAMING);
|
||||
}
|
||||
|
||||
/*
|
||||
* IP Address functions
|
||||
*/
|
||||
protected:
|
||||
String getLocalIPImpl() {
|
||||
sendAT(GF("+CGPADDR=3"));
|
||||
if (waitResponse(10000L, GF("+CGPADDR: 3,\"")) != 1) {
|
||||
return "";
|
||||
}
|
||||
String res = stream.readStringUntil('\"');
|
||||
waitResponse();
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* GPRS functions
|
||||
*/
|
||||
@@ -338,14 +339,17 @@ class TinyGsmSequansMonarch
|
||||
}
|
||||
|
||||
/*
|
||||
* IP Address functions
|
||||
* SIM card functions
|
||||
*/
|
||||
protected:
|
||||
String getLocalIPImpl() {
|
||||
sendAT(GF("+CGPADDR=3"));
|
||||
if (waitResponse(10000L, GF("+CGPADDR: 3,\"")) != 1) { return ""; }
|
||||
String res = stream.readStringUntil('\"');
|
||||
String getSimCCIDImpl() {
|
||||
sendAT(GF("+SQNCCID"));
|
||||
if (waitResponse(GF(GSM_NL "+SQNCCID:")) != 1) {
|
||||
return "";
|
||||
}
|
||||
String res = stream.readStringUntil('\n');
|
||||
waitResponse();
|
||||
res.trim();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user