Merge pull request #34 from adrianca88/add_getIMSI_SIM800

Add get imsi sim800
This commit is contained in:
Sara Damiano
2020-02-11 16:22:14 -05:00
committed by GitHub
4 changed files with 20 additions and 5 deletions

View File

@@ -527,6 +527,20 @@ String TinyGsmDecodeHex16bit(String &instr) {
}
// Asks for International Mobile Subscriber Identity IMSI via the AT+CIMI command
#define TINY_GSM_MODEM_GET_IMSI_CIMI() \
String getIMSI() { \
sendAT(GF("+CIMI")); \
if (waitResponse(GF(GSM_NL)) != 1) { \
return ""; \
} \
String res = stream.readStringUntil('\n'); \
waitResponse(); \
res.trim(); \
return res; \
}
// Gets the modem's registration status via CREG/CGREG/CEREG
// CREG = Generic network registration
// CGREG = GPRS service registration