GPS via Arduino using GPS/GPRS/GSM Module V3.0 (SKU:TEL0051) Not working

Hi Folks
I recently bought a GPS/GPRS/GSM Module V3.0 (SKU:TEL005)
https://wiki.dfrobot.com/GPS_GPRS_GSM_Module_V3.0__SKU_TEL0051_
Using it with a Arduino Duemilanove ATMEGA328
I can get the GPS via USB working
But the GPS via Arduino does not work as per instructions here
https://wiki.dfrobot.com/GPS_GPRS_GSM_Module_V3.0__SKU_TEL0051_
Questions
1) do you know if there is any issues with this shield working with the Arduino Duemilanove ?
2) Any suggestions on why it gets stuck? The output I get on my terminal is show below. Seems it is getting stuck waiting for input on the "Serial.available within the ID function (see code extract below)
=============
SCREEN OUTPUT
=============
AT
AT+CGPSPWR=1
AT+CGPSRST=1
$GPGGA statement information:
UTC:
=====
*************
CODE EXTRACT
*************
char ID()//Match the ID commands
{
char i=0;
char value[6]={
'$','G','P','G','G','A' };//match the gps protocol
char val[6]={
'0','0','0','0','0','0' };
while(1)
{
if(Serial.available()) <<<<<<******STUCK HERE
{
Thanks
LearningRobot
Are you indoors? What power supply are you using?
The GPS needs a little time outdoors in order to get data and a satellite fix.

// # Steps: // # 1. Turn the S1 switch to the Prog(right side) // # 2. Turn the S2 switch to the Arduino side(left side) [color=red] // oups, I think I put it the other side (usb) !?[/color] // # 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) // # [b]6. Plug the jumper caps back to GPS side[/b] // # 7. RST the board
Once you've checked the GPS part, you can try the example for the GSM part, but the point "6" above is "Plug the jumper back to the GSM side"
If you dont' want to interact with the module from the PC, the switches must be put like this :
- center the uart switch
- S2 on "arduino"
- S1 on "com"
In this case, the module obeys to the AT commands : you can't send it commands from the terminal, and the messages from GPS/GSM won't appear either.
But you can see the commands that your sketch sends : they'll arrive both on the terminal and the module !!
In fact, the module communicates withe the GSM part and the GPS part using the same serial pins, that is why the AT commands are importants :
digitalWrite(3,LOW);
digitalWrite(4, HIGH);
tells the module to communicate with the GSM part ! The GPS sends the messages, but th module just don't get them.
And
digitalWrite(3,HIGH);
digitalWrite(4, LOW);
tells the module to communicate with the GPS part. Ih this case, the GSM messages are not seen.
I hope (but I'm not sure) it helps a little To summarize :
- If you want to try and interact with the module from your PC, then, copy/paste the examples of the wiki, and don't forget the switches manipulations described at the beginning of each sketch.
- If you want it to run by itself, you don't play with the switches and put them as I told above. Don't forget that the module communicates with one part or the other one depending of the pin 3 and pin 4 values . It's up to you to put the module in GPS or GSM mode (and give it 2 seconds) before sending/receiving messages to/from the part you want. And keep in mind that, in this last configuration, if you run the terminal, you'll see only the messages that your sketch sends.
Don't hesitate if you need precisions, even MP is OK - I had some headaches too at the beginning, but now, mine is doing exactly what I want it to do
jf
PS : As Jose told you before, if you want to use the GSM part, an external power supply is needed !! It won't work with the USB supply alone - Then if you want to see the GSM messages on your PC, you need to connect both the usb cable and an external power supply (9V 500mA is enough it takes about 250mA when it starts, but no more)

when we send the comand to the module to turn on gps,
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: "); }
if this is like some other GPS modules, in wich you turn on, and shield automatically sends serial information, no need to use those at comands.
Does this shield use tx/rx (pin 0 and 1) to comunicate? if so, i had some expiriences in wich when connected to PC instead of power supply, when arduino uses ''Serial.print/println'' the comands goes to the serial monitor and wont reach the shield, thats why im wondering if thats the the reason that makes this code not to work like expected.
I wish someone can prove me wrong and send some help please.

Jose is right, it's necessary tu put the whole code. Because here, we have to guess.... if you put the lines :
digitalWrite(4,LOW);//Enable GPS mode digitalWrite(3,HIGH);//Disable GSM mode delay(1500); //stabilisaton mode GPS
then, when you want to communicate with the GSM part, you put :
digitalWrite(3,LOW);//Enable the GSM mode digitalWrite(4,HIGH);//Disable the GPS mode delay(1500);
You also need to check that the switches are OK :
- center the uart switch
- S2 on "arduino"
- S1 on "com"
HTH,
jf

I'm having the exact same problem. My GSM and GPRS are working correctly because I can make phone calls, send sms messages, and comunicate via HTTP, but I still have problems with the GPS. I'm able to connect to the GPS but it sends me "Unknown location" or blanks on the values. I tried moving the module outside but sill nothing happens.
Jose, I sure LearningRobot was very specific on what code he is using. He is using the example of the wiki.
LearningRobot, I'm not sure why but the code started working (at least sort of)when i activated the Internet service of my Sim card. And also, try to restar the module an switching between the GPS and the GSM with the Uart select switch. I'm sure is nothing to do with the code because mine is looping ok, but still is sending me Blanks and 0s.
if you can make it work please let me know.

I'm not exactly sure what your code is doing. If you can paste the whole code it would be more helpful.
Make sure you are outside where GPS don't have any problem connecting, and that the battery has enough power. (USB powering alone is not enough).
Best,
Jose
