Pages: [1]   Go Down
Author Topic: gsmAccess.begin what to do if there is no connectivity?  (Read 1988 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 68
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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:
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!!
« Last Edit: September 26, 2013, 09:00:57 am by dgelectron » Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 103
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

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

Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 68
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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...
« Last Edit: September 27, 2013, 06:32:46 am by dgelectron » Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 103
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 1
Posts: 68
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks.
Logged

Pages: [1]   Go Up
Jump to: