Forum >GPS/GPRS/GSM Shield V3.0 hangs up
ArduinoGeneral

GPS/GPRS/GSM Shield V3.0 hangs up

userHead blue_sky 2013-04-25 13:08:34 5688 Views8 Replies
HI,

I have an GPS/GPRS/GSM Shield V3.0. And I ran the examples in the wiki page and the program would always hang up after running for sometime. I then try to run a simplified program and the same thing would happen. The following code outputs the raw GPS data from sim908. After a few lines, it just stops. Can anyone help me figure out what is going on?

[code]// Product name: GPS/GPRS/GSM Module V3.0
// # Product SKU : TEL0051
// # Version : 0.1

// # Description:
// # The sketch for driving the gps mode via the Arduino board

// # Steps:
// # 1. Turn the S1 switch to the Prog(right side)
// # 2. Turn the S2 switch to the Arduino side(left side)
// # 3. Take off the GSM/GPS jumper caps from the Uart select
// # 4. Upload the sketch to the Arduino board
// # 5. Turn the S1 switch to the comm(left side)
// # 6. Plug the jumper caps back to GPS side
// # 7. RST the board

// # wiki link- http://www.dfrobot.com/wiki/index.php/GPS/GPRS/GSM_Module_V3.0_(SKU:TEL0051)


void setup()
{
pinMode(3,OUTPUT);//The default digital driver pins for the GSM and GPS mode
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
digitalWrite(5,HIGH);
delay(1500);
digitalWrite(5,LOW);

digitalWrite(3,LOW);//Enable GSM mode
digitalWrite(4,HIGH);//Disable GPS mode
delay(2000);
Serial.begin(9600);
delay(5000);//GPS ready

Serial.println("AT");
delay(2000);
//turn on GPS power supply
Serial.println("AT+CGPSPWR=1");
delay(1000);
//reset GPS in autonomy mode
Serial.println("AT+CGPSRST=1");
delay(1000);

digitalWrite(4,LOW);//Enable GPS mode
digitalWrite(3,HIGH);//Disable GSM mode
delay(2000);

Serial.println("$GPGGA statement information: ");
}
void loop()
{
while(1)
{
char val;
while(Serial.available())
{
val=Serial.read();
Serial.print(val);

}

delay(1);

}
}[/code]
2013-04-29 08:13:52 [quote="Phoebe"]
[quote="blue_sky"]
HI Phoebe,

What do you mean by jumper caps? There are no jumpers as far as I can see for the UART. There is a switch for the UART with three positions - GPS, center and GSM?

Could you please clarify this?

Thank you.
[/quote]

Two jumper caps  in the bottom right corner... ???
[/quote]

No, there are no more caps besides the leds, the last version comes with a 3 position switch :
Left for GSM, Right for GPS and the central position.
The, instead of removing the caps, I guess you could put the switch in the central position  ;)
userHeadPic alnath
2013-04-27 17:52:10 [quote="blue_sky"]
HI Phoebe,

What do you mean by jumper caps? There are no jumpers as far as I can see for the UART. There is a switch for the UART with three positions - GPS, center and GSM?

Could you please clarify this?

Thank you.
[/quote]

Two jumper caps  in the bottom right corner... ???
userHeadPic Phoebe
2013-04-26 21:12:28 HI Phoebe,

What do you mean by jumper caps? There are no jumpers as far as I can see for the UART. There is a switch for the UART with three positions - GPS, center and GSM?

Could you please clarify this?

Thank you.
userHeadPic blue_sky
2013-04-26 18:02:32 Hi blue_sky,

You can take off the two jumper caps from the " UART Selection". Actually, we have introduce the steps in the sketch, there are operating steps in every sample code...
Thanks for your advice , we will optimize our wiki page;)

OK, it is a happy thing that you solve the problem ;D

Cheers
userHeadPic Phoebe
2013-04-26 13:18:03 Hi Phoebe,

I figured out what is happening. The UART selection switch must not be in the GPS position - if it is, then I get garbage or it hangs up. If it is in the center position or GSM, only then will the GPS work.

This is not listed in the instructions, please do add this.
userHeadPic blue_sky
2013-04-25 20:58:30 Hi Phoebe,

There was an image attached to my second post - thats exactly where it stops. Most of the time after outputting a few lines, it just stops (like in the image). But the two green lights on the board keep blinking.

Please advice.

Thank you.
userHeadPic blue_sky
2013-04-25 18:30:15 Hi

What you mean that the shield will hang up after sometime, if you use the sample code in the wiki page? It doesn't work after sometime? Can you give more details,such as attach a image?

Look forward to your relay ;)

Best
userHeadPic Phoebe
2013-04-25 13:45:25 When the above code does run, the GPS output is garbage. See attached image userHeadPic blue_sky