ArduinoGeneral

GPS/GPRS/GSM MODULE V3.0 - SEND MESSAGE TO GET GPS LOCATION

userHead aliabulolipop123 2015-10-19 21:35:47 18125 Views29 Replies
Hai,

I have a problem with the gps location. I want to get GPS location when I send a message to the module v3.0.
step that i've done so far and is successful:
#send sms from module v3 to my mobile phone.
#get the GPS location and send it to my mobile phone(without sending sms to activate it)
#control arduino via sms

anyone have solutions or suggestion? thanks
2015-11-11 18:32:47 Hi,

It's been so long, I did it once I send a message "HH" to the module, I will receive its GPS location after several minutes in outside.

But it's not stable, sometimes, i need to send 4 messages to it to get one reply, I will go on it and keep updating. ;)
userHeadPic Leff
2015-11-11 18:32:47 Hi,

It's been so long, I did it once I send a message "HH" to the module, I will receive its GPS location after several minutes in outside.

But it's not stable, sometimes, i need to send 4 messages to it to get one reply, I will go on it and keep updating. ;)
userHeadPic Leff
2015-11-11 18:32:47 Hi,

It's been so long, I did it once I send a message "HH" to the module, I will receive its GPS location after several minutes in outside.

But it's not stable, sometimes, i need to send 4 messages to it to get one reply, I will go on it and keep updating. ;)
userHeadPic Leff
2015-11-03 11:23:44
aliabulolipop123 wrote:Hai leff,

TQ leff. My problem is not yet solving. I'm try many time to make it reality but it doesn't happen.
I send the 'LL' message to activate the GPS location but it do noting. When I send 'LH' it can activate the buzzer base on the code that I have post at Wed Oct 21, 2015 12:11 pm.

I really want to solve this problem because this function is the most important part in my project.


Yes, I also tried to combine the two sample sketches together, the SMS control LED on the wiki, and the send GPS info by SMS sharing sketch.

But I also made several attampt, still failed. Never mind, I will work on it till it be done.
userHeadPic Leff
2015-11-03 11:23:44
aliabulolipop123 wrote:Hai leff,

TQ leff. My problem is not yet solving. I'm try many time to make it reality but it doesn't happen.
I send the 'LL' message to activate the GPS location but it do noting. When I send 'LH' it can activate the buzzer base on the code that I have post at Wed Oct 21, 2015 12:11 pm.

I really want to solve this problem because this function is the most important part in my project.


Yes, I also tried to combine the two sample sketches together, the SMS control LED on the wiki, and the send GPS info by SMS sharing sketch.

But I also made several attampt, still failed. Never mind, I will work on it till it be done.
userHeadPic Leff
2015-11-03 11:23:44
aliabulolipop123 wrote:Hai leff,

TQ leff. My problem is not yet solving. I'm try many time to make it reality but it doesn't happen.
I send the 'LL' message to activate the GPS location but it do noting. When I send 'LH' it can activate the buzzer base on the code that I have post at Wed Oct 21, 2015 12:11 pm.

I really want to solve this problem because this function is the most important part in my project.


Yes, I also tried to combine the two sample sketches together, the SMS control LED on the wiki, and the send GPS info by SMS sharing sketch.

But I also made several attampt, still failed. Never mind, I will work on it till it be done.
userHeadPic Leff
2015-10-29 23:02:51 Hai leff,

TQ leff. My problem is not yet solving. I'm try many time to make it reality but it doesn't happen.
I send the 'LL' message to activate the GPS location but it do noting. When I send 'LH' it can activate the buzzer base on the code that I have post at Wed Oct 21, 2015 12:11 pm.

I really want to solve this problem because this function is the most important part in my project.
userHeadPic aliabulolipop123
2015-10-29 23:02:51 Hai leff,

TQ leff. My problem is not yet solving. I'm try many time to make it reality but it doesn't happen.
I send the 'LL' message to activate the GPS location but it do noting. When I send 'LH' it can activate the buzzer base on the code that I have post at Wed Oct 21, 2015 12:11 pm.

I really want to solve this problem because this function is the most important part in my project.
userHeadPic aliabulolipop123
2015-10-29 23:02:51 Hai leff,

TQ leff. My problem is not yet solving. I'm try many time to make it reality but it doesn't happen.
I send the 'LL' message to activate the GPS location but it do noting. When I send 'LH' it can activate the buzzer base on the code that I have post at Wed Oct 21, 2015 12:11 pm.

I really want to solve this problem because this function is the most important part in my project.
userHeadPic aliabulolipop123
2015-10-27 11:06:20 Hello ??

Sorry to let you wait for these days!

I always wanted to have a try on your project but had no time, I think I will work on this this afternoon, I will keep you updated.

Brg
userHeadPic Leff
2015-10-27 11:06:20 Hello ??

Sorry to let you wait for these days!

I always wanted to have a try on your project but had no time, I think I will work on this this afternoon, I will keep you updated.

Brg
userHeadPic Leff
2015-10-27 11:06:20 Hello ??

Sorry to let you wait for these days!

I always wanted to have a try on your project but had no time, I think I will work on this this afternoon, I will keep you updated.

Brg
userHeadPic Leff
2015-10-21 20:11:12 TQ for helping me leff :) ,

I have try this code:
Code: Select all
//#include <gps_gsm_sim908.h>
#include <gps_gsm_sim908Serial0.h>



const int SensorINPUT=8;
int Buzzer1 = 9;
char inchar;

void setup()
{   
  gps_init ();    //init GPS pin
  Serial.begin (9600);    //serial0 connect computer
  pinMode(SensorINPUT, INPUT);
  pinMode(Buzzer1, OUTPUT);
  digitalWrite (5, HIGH);
  delay (1500);
  digitalWrite (5, LOW);
  delay (1500);
 
  gsm_enable ();
  gps_disable ();
  delay(5000);
 
  Serial.println("AT+CMGD=1,4");                           //Delete all SMS in box
}
 
void loop()

  if(Serial.available()>0)
  {
    inchar=Serial.read();
    if(inchar=='T')
    {
      delay(10);
      inchar=Serial.read();
      if (inchar=='I')                                      //When the GSM module get the message, it will display the sign '+CMTI "SM", 1' in the serial port
      {     
        delay(10);
        Serial.println("AT+CMGR=1");                       //When Arduino read the sign, send the "read" AT command to the module
        delay(10);
      }
    }
    else if (inchar=='L')
    {
      Serial.println("AT+CMGD=1,4");                   //Delete all message
      delay(500);
      delay(10);
      inchar=Serial.read();
      if (inchar=='H')                                     //Thw SMS("LH") was display in the Serial port, and Arduino has recognize it.
      {
        delay(10);
        for(int x=0;x<80;x++)
        {
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
        }       
        Serial.println("AT+CMGD=1,4");                    //Delete all message
        delay(500);
      }
      if (inchar=='L')                                    //Thw SMS("LH") was display in the Serial port, and Arduino has recognize it.
      {
        delay(10);
        start_gps();
        int stat = gps_get_gga ();  // read data from GPS, return 0 is ok
       
        if (stat == 0 || stat == 1)
        {
          if (gps_gga_is_fix ())
          {    //true if fix
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            gsm_set_numble ("0173082726"); // change it to your receiver phone number
            gsm_send_message ("Latitude in Deg/Min  :");
            gsm_send_message (gps_gga_lat_s ());
            gsm_send_message ("Longgitude in Deg/Min :");
            gsm_send_message (gps_gga_long_s ());
            gsm_send_message ("#You can view your loacation on map at http://www.geoplaner.com/");
            gsm_end_send ();
           
          }
        }
        delay(1000);
        Serial.println("AT+CMGD=1,4");
      }
    }
  }
}


I tried with the library that you give me.
It can activate the buzzer when I send the "LH" message to the module
but, when I send "LL" that is to get the GPS coordinate, there is noting happen.
and also the network and status indicator is turn off.
userHeadPic aliabulolipop123
2015-10-21 20:11:12 TQ for helping me leff :) ,

I have try this code:
Code: Select all
//#include <gps_gsm_sim908.h>
#include <gps_gsm_sim908Serial0.h>



const int SensorINPUT=8;
int Buzzer1 = 9;
char inchar;

void setup()
{   
  gps_init ();    //init GPS pin
  Serial.begin (9600);    //serial0 connect computer
  pinMode(SensorINPUT, INPUT);
  pinMode(Buzzer1, OUTPUT);
  digitalWrite (5, HIGH);
  delay (1500);
  digitalWrite (5, LOW);
  delay (1500);
 
  gsm_enable ();
  gps_disable ();
  delay(5000);
 
  Serial.println("AT+CMGD=1,4");                           //Delete all SMS in box
}
 
void loop()

  if(Serial.available()>0)
  {
    inchar=Serial.read();
    if(inchar=='T')
    {
      delay(10);
      inchar=Serial.read();
      if (inchar=='I')                                      //When the GSM module get the message, it will display the sign '+CMTI "SM", 1' in the serial port
      {     
        delay(10);
        Serial.println("AT+CMGR=1");                       //When Arduino read the sign, send the "read" AT command to the module
        delay(10);
      }
    }
    else if (inchar=='L')
    {
      Serial.println("AT+CMGD=1,4");                   //Delete all message
      delay(500);
      delay(10);
      inchar=Serial.read();
      if (inchar=='H')                                     //Thw SMS("LH") was display in the Serial port, and Arduino has recognize it.
      {
        delay(10);
        for(int x=0;x<80;x++)
        {
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
        }       
        Serial.println("AT+CMGD=1,4");                    //Delete all message
        delay(500);
      }
      if (inchar=='L')                                    //Thw SMS("LH") was display in the Serial port, and Arduino has recognize it.
      {
        delay(10);
        start_gps();
        int stat = gps_get_gga ();  // read data from GPS, return 0 is ok
       
        if (stat == 0 || stat == 1)
        {
          if (gps_gga_is_fix ())
          {    //true if fix
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            gsm_set_numble ("0173082726"); // change it to your receiver phone number
            gsm_send_message ("Latitude in Deg/Min  :");
            gsm_send_message (gps_gga_lat_s ());
            gsm_send_message ("Longgitude in Deg/Min :");
            gsm_send_message (gps_gga_long_s ());
            gsm_send_message ("#You can view your loacation on map at http://www.geoplaner.com/");
            gsm_end_send ();
           
          }
        }
        delay(1000);
        Serial.println("AT+CMGD=1,4");
      }
    }
  }
}


I tried with the library that you give me.
It can activate the buzzer when I send the "LH" message to the module
but, when I send "LL" that is to get the GPS coordinate, there is noting happen.
and also the network and status indicator is turn off.
userHeadPic aliabulolipop123
2015-10-21 20:11:12 TQ for helping me leff :) ,

I have try this code:
Code: Select all
//#include <gps_gsm_sim908.h>
#include <gps_gsm_sim908Serial0.h>



const int SensorINPUT=8;
int Buzzer1 = 9;
char inchar;

void setup()
{   
  gps_init ();    //init GPS pin
  Serial.begin (9600);    //serial0 connect computer
  pinMode(SensorINPUT, INPUT);
  pinMode(Buzzer1, OUTPUT);
  digitalWrite (5, HIGH);
  delay (1500);
  digitalWrite (5, LOW);
  delay (1500);
 
  gsm_enable ();
  gps_disable ();
  delay(5000);
 
  Serial.println("AT+CMGD=1,4");                           //Delete all SMS in box
}
 
void loop()

  if(Serial.available()>0)
  {
    inchar=Serial.read();
    if(inchar=='T')
    {
      delay(10);
      inchar=Serial.read();
      if (inchar=='I')                                      //When the GSM module get the message, it will display the sign '+CMTI "SM", 1' in the serial port
      {     
        delay(10);
        Serial.println("AT+CMGR=1");                       //When Arduino read the sign, send the "read" AT command to the module
        delay(10);
      }
    }
    else if (inchar=='L')
    {
      Serial.println("AT+CMGD=1,4");                   //Delete all message
      delay(500);
      delay(10);
      inchar=Serial.read();
      if (inchar=='H')                                     //Thw SMS("LH") was display in the Serial port, and Arduino has recognize it.
      {
        delay(10);
        for(int x=0;x<80;x++)
        {
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            digitalWrite(Buzzer1,LOW);
            delay(100);
        }       
        Serial.println("AT+CMGD=1,4");                    //Delete all message
        delay(500);
      }
      if (inchar=='L')                                    //Thw SMS("LH") was display in the Serial port, and Arduino has recognize it.
      {
        delay(10);
        start_gps();
        int stat = gps_get_gga ();  // read data from GPS, return 0 is ok
       
        if (stat == 0 || stat == 1)
        {
          if (gps_gga_is_fix ())
          {    //true if fix
            digitalWrite(Buzzer1,HIGH);
            delay(100);
            gsm_set_numble ("0173082726"); // change it to your receiver phone number
            gsm_send_message ("Latitude in Deg/Min  :");
            gsm_send_message (gps_gga_lat_s ());
            gsm_send_message ("Longgitude in Deg/Min :");
            gsm_send_message (gps_gga_long_s ());
            gsm_send_message ("#You can view your loacation on map at http://www.geoplaner.com/");
            gsm_end_send ();
           
          }
        }
        delay(1000);
        Serial.println("AT+CMGD=1,4");
      }
    }
  }
}


I tried with the library that you give me.
It can activate the buzzer when I send the "LH" message to the module
but, when I send "LL" that is to get the GPS coordinate, there is noting happen.
and also the network and status indicator is turn off.
userHeadPic aliabulolipop123
2015-10-21 16:54:04 I've tried the library you share, it's very similar to one I shared before, but it's different. However, with the library and your sketch, I could not even start up my module properly, the net LED are flashing again and again, I think it's the problem of the library. Would you mind try again using this one from TEL0051 wiki? Click to download. userHeadPic Leff
2015-10-21 16:54:04 I've tried the library you share, it's very similar to one I shared before, but it's different. However, with the library and your sketch, I could not even start up my module properly, the net LED are flashing again and again, I think it's the problem of the library. Would you mind try again using this one from TEL0051 wiki? Click to download. userHeadPic Leff
2015-10-21 16:54:04 I've tried the library you share, it's very similar to one I shared before, but it's different. However, with the library and your sketch, I could not even start up my module properly, the net LED are flashing again and again, I think it's the problem of the library. Would you mind try again using this one from TEL0051 wiki? Click to download. userHeadPic Leff
2015-10-20 21:05:48 Sorry,
this is the gps_gsm_sim908Serial0.h library that I used
userHeadPic aliabulolipop123
2015-10-20 21:05:48 Sorry,
this is the gps_gsm_sim908Serial0.h library that I used
userHeadPic aliabulolipop123