Change to AI/CI per updated docs
This commit is contained in:
@@ -31,7 +31,7 @@ enum SimStatus {
|
|||||||
|
|
||||||
enum XBeeType {
|
enum XBeeType {
|
||||||
S6B = 0,
|
S6B = 0,
|
||||||
LTEC1 = 1,
|
LTEC1 = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum RegStatus {
|
enum RegStatus {
|
||||||
@@ -272,8 +272,7 @@ public:
|
|||||||
|
|
||||||
RegStatus getRegistrationStatus() {
|
RegStatus getRegistrationStatus() {
|
||||||
commandMode();
|
commandMode();
|
||||||
if (beeType == S6B) sendAT(GF("AI"));
|
sendAT(GF("AI"));
|
||||||
else sendAT(GF("CI"));
|
|
||||||
// wait for the response
|
// wait for the response
|
||||||
unsigned long startMillis = millis();
|
unsigned long startMillis = millis();
|
||||||
while (!stream.available() && millis() - startMillis < 1000) {};
|
while (!stream.available() && millis() - startMillis < 1000) {};
|
||||||
@@ -290,7 +289,7 @@ public:
|
|||||||
res == GF("40") || res == GF("41") || res == GF("42"))
|
res == GF("40") || res == GF("41") || res == GF("42"))
|
||||||
return REG_SEARCHING;
|
return REG_SEARCHING;
|
||||||
|
|
||||||
else if(res == GF("24"))
|
else if(res == GF("24") || res == GF("25") || res == GF("27"))
|
||||||
return REG_DENIED;
|
return REG_DENIED;
|
||||||
|
|
||||||
else return REG_UNKNOWN;
|
else return REG_UNKNOWN;
|
||||||
@@ -331,8 +330,7 @@ public:
|
|||||||
bool waitForNetwork(unsigned long timeout = 60000L) {
|
bool waitForNetwork(unsigned long timeout = 60000L) {
|
||||||
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
for (unsigned long start = millis(); millis() - start < timeout; ) {
|
||||||
commandMode();
|
commandMode();
|
||||||
if (beeType == S6B) sendAT(GF("AI"));
|
sendAT(GF("AI"));
|
||||||
else sendAT(GF("CI"));
|
|
||||||
// wait for the response
|
// wait for the response
|
||||||
unsigned long startMillis = millis();
|
unsigned long startMillis = millis();
|
||||||
while (!stream.available() && millis() - startMillis < 1000) {};
|
while (!stream.available() && millis() - startMillis < 1000) {};
|
||||||
@@ -476,8 +474,7 @@ private:
|
|||||||
|
|
||||||
bool modemGetConnected(uint8_t mux = 0) {
|
bool modemGetConnected(uint8_t mux = 0) {
|
||||||
commandMode();
|
commandMode();
|
||||||
if (beeType == S6B) sendAT(GF("AI"));
|
sendAT(GF("AI"));
|
||||||
else sendAT(GF("CI"));
|
|
||||||
int res = waitResponse(GF("0"));
|
int res = waitResponse(GF("0"));
|
||||||
exitCommand();
|
exitCommand();
|
||||||
return 1 == res;
|
return 1 == res;
|
||||||
|
Reference in New Issue
Block a user