Browse Source

Add getLocalIP()

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
4d3d017600
2 changed files with 19 additions and 0 deletions
  1. +2
    -0
      TinyGsmClientM590.h
  2. +17
    -0
      TinyGsmClientSIM800.h

+ 2
- 0
TinyGsmClientM590.h View File

@ -378,6 +378,8 @@ public:
return waitResponse(60000L) == 1;
}
String getLocalIP() TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Phone Call functions
*/


+ 17
- 0
TinyGsmClientSIM800.h View File

@ -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
*/


Loading…
Cancel
Save