system
May 29, 2014, 10:10am
#1
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.
system
May 29, 2014, 2:01pm
#3
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?
system
May 29, 2014, 2:25pm
#4
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
system
May 29, 2014, 9:56pm
#5
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...)
system
June 2, 2014, 7:20am
#6
Look at LED indicators of the shield. Which were their status?
yo8tww
August 9, 2014, 5:09pm
#7
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 ?
system
August 13, 2014, 6:22pm
#8
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:
Something like
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
AT command tester is a free online software tool that is used to test AT commands and other functionalities of GSM modems. The friendly user interface allows developers to Configure and connect to modem ports Send single or batch of AT commands...
Est. reading time: 2 minutes