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

@@ -323,6 +323,8 @@ TINY_GSM_MODEM_GET_SIMCCID_CCID()
TINY_GSM_MODEM_GET_IMEI_GSN()
TINY_GSM_MODEM_GET_IMSI_CIMI()
SimStatus getSimStatus(unsigned long timeout_ms = 10000L) {
for (unsigned long start = millis(); millis() - start < timeout_ms; ) {
sendAT(GF("+CPIN?"));
@@ -700,7 +702,7 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
}
uint8_t getBattChargeState() {
sendAT(GF("+CBC?"));
sendAT(GF("+CBC"));
if (waitResponse(GF(GSM_NL "+CBC:")) != 1) {
return false;
}
@@ -712,7 +714,7 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK()
}
bool getBattStats(uint8_t &chargeState, int8_t &percent, uint16_t &milliVolts) {
sendAT(GF("+CBC?"));
sendAT(GF("+CBC"));
if (waitResponse(GF(GSM_NL "+CBC:")) != 1) {
return false;
}