Add getLocalIP()
This commit is contained in:
@@ -378,6 +378,8 @@ public:
|
||||
return waitResponse(60000L) == 1;
|
||||
}
|
||||
|
||||
String getLocalIP() TINY_GSM_ATTR_NOT_IMPLEMENTED;
|
||||
|
||||
/*
|
||||
* Phone Call functions
|
||||
*/
|
||||
|
@@ -163,6 +163,13 @@ public:
|
||||
return sock_connected;
|
||||
}
|
||||
virtual operator bool() { return connected(); }
|
||||
|
||||
/*
|
||||
* Extended API
|
||||
*/
|
||||
|
||||
String remoteIP() TINY_GSM_ATTR_NOT_IMPLEMENTED;
|
||||
|
||||
private:
|
||||
TinyGsm* at;
|
||||
uint8_t mux;
|
||||
@@ -458,6 +465,16 @@ public:
|
||||
return waitResponse(60000L) == 1;
|
||||
}
|
||||
|
||||
String getLocalIP() {
|
||||
sendAT(GF("+CIFSR;E0"));
|
||||
String res;
|
||||
if (waitResponse(10000L, res) != 1) {
|
||||
return "";
|
||||
}
|
||||
res.trim();
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Phone Call functions
|
||||
*/
|
||||
|
Reference in New Issue
Block a user