From a357bb559bce246d4be189e7bdf9ce5bf05f5971 Mon Sep 17 00:00:00 2001 From: Slavomir Hustaty Date: Thu, 5 Sep 2019 12:26:34 +0200 Subject: [PATCH] in case of erroneous return of device location the BTS location might help a little if getting errors via device reading --- src/TinyGsmClientSIM800.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/TinyGsmClientSIM800.h b/src/TinyGsmClientSIM800.h index b5f2b6f..5a332c3 100644 --- a/src/TinyGsmClientSIM800.h +++ b/src/TinyGsmClientSIM800.h @@ -626,7 +626,18 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() res.trim(); return res; } - + + String getBaseStationGsmLocation() { + sendAT(GF("+CLBS=1,1")); + if (waitResponse(10000L, GF(GSM_NL "+CLBS:")) != 1) { + return ""; + } + String res = stream.readStringUntil('\n'); + waitResponse(); + res.trim(); + return res; + } + /* * Time functions */