Go Down

Topic: Official Arduino GSM Shield Rev 3 + UNO - cannot start gsmAccess.begin() (Read 5911 times) previous topic - next topic

Jussi

Good day!

Using official Arduino GSM Shield and UNO. When trying to connect to network - cannot go through gsmAccess.begin();

My code:

// import the GSM library
#include <GSM.h>

// initialize the library instance
GSM gsmAccess(true);     // include a 'true' parameter for debug enabled

void setup()
{
  // initialize serial communications
  Serial.begin(9600);
  Serial.println("Serial OK!");

  // connection state
  boolean notConnected = true;

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

void loop()
{
}


OUTPUT:

Serial OK!
Waiting for gsmAccess.begin()
AT%13%
0 21>AT%13%%13%%10%OK%13%%10%%13%%10%+CFUN: 1%13%%10%
AT+CGREG?%13%
21 68>%21%%173%%13%A%9%233%%129%I%21%%5%%17%e5)%5%Q%173%%13%%29%%255%REG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
68 99>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%

Searched for AT command explanation - still cannot find the reason - SIM is OK and working in the phone.

MathiasVDA


Jussi

Thank you!

Have read and tried it all - I`m still not able to get beneath gsmAccess.begin();

Sim card seems to be OK - when I put it to the phone I have all the connections - GPRS, 3G nets, voice, sms and so on...

using that web client code from that post  I get:

Arduino web client.
AT%13%
0 25>AT%13%%13%%10%OK%13%%10%%13%%10%+CPIN: READY%13%%10%
AT+CGREG?%13%
25 56>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%
AT+CGREG?%13%
56 101>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%%13%%10%Call Ready%13%%10%
AT+CGREG?%13%

When serach for AT commands in http://www.activexperts.com/mmtoolkit/at/commands/?at=%2BCGREG I can see that reply +CGREG: 0,2 can be parsed as:

0 - disable network registration unsolicited result code
[,,]
2 not registered, but ME is currently searching a new operator to register to

Any ideas or explanation?





Jussi

Hmmm....its interesting - in document http://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdf found here regarding AT commands for M10 Quectel Cellular Engine which is on my Arduino GSM Shiled there is no command like AT+CGREG.

The only one I found is AT+CREG Network registration....

Is it possible that GSM library for official Arduino GSM Shield is not compatible with M10 Quectel?

AT+CGREG seems to be asking for GPRS network registration status

MathiasVDA

Ok sorry, I have misread your original question. This problem is not related to the post I refered to.

Three remarks in advance:
- did you connect an external power supply? sometimes USB is not enough to power the shield
- did you power up the GPRS shield? (the status light should be on and the 'net' light should blink from time to time)
- I've always gotten the CGREG command

I have here:
- 1 Arduino GSM shield (R3) with built in antenna
- 1 Arduino GSM shield (R3) with antenna connector

- 1 SIM without GPRS access
- 1 SIM with GPRS access
Both of the same operator and should be able to connect to the same network.

The SIM with GPRS access works without any problems on both shields but the SIM without GPRS access has the same problem as you.

Do you also get the respons "CGREG: 0,3" after a while?

Can you try with another SIM? It's likely that this is the problem (as it is with me here...)

davidgoth

Look at LED indicators of the shield. Which were their status?

Costin

Hi..I have the same issue here...I'm running the Sendsms example,but I have the same output regarding the CGREG...0,3.. Does anyone tryied to run this GSM shield running straight AT commands on it ? I'm very confused becouse the SIM is taken from my own phone which works properly...Can you give me some examples to see which are the begining  AT's commands for setting up the module ?

hijack

hi

setup serial connection to arduino:
https://itp.nyu.edu/classes/towers-spring2014/labs-how-to/sending-at-commands/

check this manual for at commands:
http://arduino.cc/de/uploads/Main/Quectel_M10_AT_commands.pdf

Something like
Code: [Select]

AT //try connection
AT+CPIN? // return SIM ready
AT+CPIN="7632" //enter pin
..


easily you can use "at command tester" online, but it seems down at time
http://www.open-electronics.org/at-command-tester-the-free-online-software-tool-to-test-gsm-at-commands/

Go Up