Hello,
Based on this Arduino/GSM3MobileAccessProvider.h at db8cbf24c99dc930b9ccff1a43d018c81f178535 · arduino/Arduino · GitHub
I inserted gsmAccess.getStatus() in the below code, and when I ran the first status was 0 then 4 and finally 5. Now i want to reconnect my GSM shield in case my GSM disconnects, to test it i removed the sim card but still its printing 5 on the serial monitor shouldn't it be 6 ? I would like to know what is going wrong
void setup {
}
void gprsConnect(){
boolean notConnected = true;
while (notConnected) {
Serial.println(gsmAccess.getStatus());
Serial.println(F("Connecteing....."));
if ((gsmAccess.begin(PINNUMBER) == GSM_READY) &
(gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) == GPRS_READY)) {
Serial.println(gsmAccess.getStatus());
notConnected = false;
sms.beginSMS(remoteNum);
sms.print(txtMsg1);
sms.endSMS();
}
else {
Serial.println(F("Not connected"));
delay(1000);
}
}
Serial.println(F("Connected"));
}
void loop() {
Serial.println(gsmAccess.getStatus());
}
Thanks