Go Down

Topic: gsmAccess.begin what to do if there is no connectivity? (Read 2 times) previous topic - next topic

dgelectron

Sep 26, 2013, 03:56 pm Last Edit: Sep 26, 2013, 04:00 pm by dgelectron Reason: 1
Hi there,

I'm working with the GSM module from Telefonica and works pretty well but I have a question in this part of the code to send sms:
Code: [Select]

while(notConnected)
 {
   if(gsmAccess.begin(PINNUMBER)==GSM_READY)
     notConnected = false;
   else
   {
     Serial.println("Not connected");
     delay(1000);
   }
 }


I need to do something to keep my code running in case the module can't send. So if I have problems connecting to the net it's suposed that I will see in the monitor serial "Not connected"....but this never happens!! I came to a room in my house with no connectivity to try this case but the program stays in
Code: [Select]
if(gsmAccess.begin(PINNUMBER)==GSM_READY) indefinitely, the idea is to call other function of my code in case of no conection to get out of this point. Does anyone knows why is this happens??

Thanks!!

davidgoth

Hello,

Can you replace line "GSM gsmAccess;" with "GSM gsmAccess(true);"?
Please, post your serial monitor output.


dgelectron

#2
Sep 27, 2013, 01:30 pm Last Edit: Sep 27, 2013, 01:32 pm by dgelectron Reason: 1
Hola David,

Thanks so much for your answer. I've tried what you told me and changed that line. I left the module working a few minutes and I get a non stop lines of code in the serial. I just disconnect the module cause it never stops of writting those lines. Here you have the first ones...

Code: [Select]
SMS Messages Sender
AT%13%
0 23>AT%13%%13%%10%OK%13%%10%%13%%10%Call Ready%13%%10%
AT+CGREG?%13%
23 54>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
54 85>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
85 116>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
116 19>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
19 50>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
50 81>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
81 112>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
112 15>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
15 46>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
46 77>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%


And it continues...

davidgoth

Hi,
        
Your SIM card is not registering itself on the network. Is it a BlueVia SIM?, or other carrier SIM card?

dgelectron

Hi, is not a bluevia card but it's a telefonica SIM card, the compony of the module. Makes any difference??

Thanks.

Go Up