Change to AI/CI per updated docs

This commit is contained in:
SRGDamia1
2017-10-02 11:40:31 -04:00
parent 10fdaad524
commit 84b797cfbf

View File

@@ -272,8 +272,7 @@ public:
RegStatus getRegistrationStatus() {
commandMode();
if (beeType == S6B) sendAT(GF("AI"));
else sendAT(GF("CI"));
sendAT(GF("AI"));
// wait for the response
unsigned long startMillis = millis();
while (!stream.available() && millis() - startMillis < 1000) {};
@@ -290,7 +289,7 @@ public:
res == GF("40") || res == GF("41") || res == GF("42"))
return REG_SEARCHING;
else if(res == GF("24"))
else if(res == GF("24") || res == GF("25") || res == GF("27"))
return REG_DENIED;
else return REG_UNKNOWN;
@@ -331,8 +330,7 @@ public:
bool waitForNetwork(unsigned long timeout = 60000L) {
for (unsigned long start = millis(); millis() - start < timeout; ) {
commandMode();
if (beeType == S6B) sendAT(GF("AI"));
else sendAT(GF("CI"));
sendAT(GF("AI"));
// wait for the response
unsigned long startMillis = millis();
while (!stream.available() && millis() - startMillis < 1000) {};
@@ -476,8 +474,7 @@ private:
bool modemGetConnected(uint8_t mux = 0) {
commandMode();
if (beeType == S6B) sendAT(GF("AI"));
else sendAT(GF("CI"));
sendAT(GF("AI"));
int res = waitResponse(GF("0"));
exitCommand();
return 1 == res;