Arduino Forum

Products => Arduino GSM Shield => Topic started by: waynedaly123 on Nov 17, 2014, 07:59 pm

Title: if (gsmAccess.begin(PINNUMBER) == GSM_READY) not working
Post by: waynedaly123 on Nov 17, 2014, 07:59 pm
The serial console prints:   Serial.println("SMS Messages Receiver");
But it never prints anything after it so its not getting past:
if (gsmAccess.begin(PINNUMBER) == GSM_READY)

I have tried the sim supplied by arduino, and the recoption is high when on my phone.
I also tried my own sim card, I am in Ireland.

Any idea how to get this thing working? Thanks!
I have also tried my pin number and blank.

Code: [Select]

void setup()
{
  // initialize serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  Serial.println("SMS Messages Receiver");

  // connection state
  boolean notConnected = true;

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

  Serial.println("GSM initialized");
  Serial.println("Waiting for messages");
}


Title: Re: if (gsmAccess.begin(PINNUMBER) == GSM_READY) not working
Post by: waynedaly123 on Nov 18, 2014, 07:28 pm
Here is an update, the debug information that is happening is:

Code: [Select]

SMS Messages Receiver
AT%13%
0 25>AT%13%%13%%10%OK%13%%10%%13%%10%+CPIN: READY%13%%10%
AT+CGREG?%13%
25 70>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%%13%%10%Call Ready%13%%10%
AT+CGREG?%13%
70 101>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
101 4>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
4 35>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
35 66>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
66 97>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
97 0>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
0 31>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
31 62>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
62 93>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
93 124>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
124 27>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
27 58>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
58 89>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
89 120>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%

Title: Re: if (gsmAccess.begin(PINNUMBER) == GSM_READY) not working
Post by: itsanandyadav on Mar 09, 2018, 08:47 pm
Dear,
Did you find the solution? I am stuck here.
Title: Re: if (gsmAccess.begin(PINNUMBER) == GSM_READY) not working **EDIT 3G card prob
Post by: jdboud on Jun 03, 2018, 02:12 pm
Hi,
I'm also in the same situation. I would also like to know if you've found a solution or if someone has one. Thanks

A lot is discussed on this thread (https://forum.arduino.cc/index.php?topic=155057.0) but i'm still stuck at the looping' searching for network'.

Arduino UNO is on 12V + GSM arduino shield V2
SIM card and PIN are active
Network provider Koodo (Canada)
--------------------
**The problem is most probably that my card is 3G (Bell and Telus) and not 2G (Rogers in Canada)
Title: Re: if (gsmAccess.begin(PINNUMBER) == GSM_READY) not working
Post by: RonaldJKirby on Jun 13, 2018, 07:14 am
it appears to me that your gsm is not connecting to the network 

you should check if it is the right type for your network  and also check frequencies it works on