Go Down

Topic: solved: GSM hanging: check for autobaud (Read 1 time) previous topic - next topic

SupArdu

hi,

I had a long fight with my GSM shield which most time was hanging at the very beginning and could not connect to the net. I am telling here the whole story because it might help somebody else with a similar problem.

The location where the software was hanging was the call gsmAccess.begin(PINNUMBER) within setup():
Code: [Select]
if (gsmAccess.begin(PINNUMBER) == GSM_READY)
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }

I edited the function GSM3ShieldV1AccessProvider::begin() with a timeout counter as proposed in this forum. The result was that the serial monitor showed "Not connected" all the time.

I checked the antenna and tried to improve it because a posting in this forum told me that a low signal could cause the software hanging. No improvement.

The tip that the GSM library has a debugging mode, an example sketch how to send AT commands manually via the serial monitor and studying the M10 manual brought the solution:

The debugging mode can be switch on with "true" in the constructor
Code: [Select]
GSM gsmAccess(true);  // true for debugging
Then all commands to the GSM shield and all responses are printed on the serial monitor.

The only print out was
Quote
AT%13%
which is the string sent by the GSM library, and on which the GSM shield usually shall detect the baud rate, according to M10 manual.
But there was no response.

Now it was clear that the GSM shield cannot communicate with my Mega2560 because the autobaud function obviously did not recognize the baud rate.

With the sketch from http://forum.arduino.cc/index.php?topic=219677.0
 I sent "at" so many times until autobaud detected 9600 baud. Then I fixed this baud rate with the command "AT&W" and the shield is starting with 9600 baud (hopefully it will do it forever).

This problem took me a lot of time but now the GSM shield works fine and I am happy  :)

SupArdu
-------------------
have success
SupArdu

Go Up