Arduino Project - GPS/GPRS

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Arduino Project - GPS/GPRS

Postby netstat » Mon Nov 17, 2008 6:22 pm

Hello,

Im doing a little porject with the Arduino. Its a GPS/GPRS system that when a SMS its receive, it will retreive the GPS info and send it back to a predifine number via SMS.

Parts used:

GPS Shield
Libelium.com GPRS shield

IM STILL developing this...so the code its not finished...I need to figure how to verify when a SMS is receive.....Any help would be great,...



#include <AFSoftSerial.h>

/*
*GPS-GPRS Module para Arduino.
*Basado en el modulo GPS de ladyada.net y el modulo GPRS de Libelium.com
*Cuando se recibe un mensaje de texto(SMS), tomo las coordernadas del GPS y las envio via SMS.
*Hecho por Alexander Veloz, 2008, alexander.veloz@gmail.com
*/

//GPS Conf
#define GPSrxPin 3 // GPS rx Pin
#define GPStxPin 4 // GPS tx Pin
#define GPSpowerpin 5 // GPS Power Pin
#define GPSRATE 4800 // GPS Baud Rate
//GPRS Conf
#define GPRSpowerpin 2 // GPRS Power Pin
#define GPRSRATE 115200 // GPRS Baud Rate
//Opciones GPS
#define RMC_ON "$PSRF103,4,0,1,1*21\r\n" // RMC on (1 hz rate)
#define RMC_OFF "$PSRF103,4,0,0,1*20\r\n" // RMC off
#define GGA_ON "$PSRF103,0,0,1,1*25\r\n" // GGA on (1 hz rate)
#define GGA_OFF "$PSRF103,0,0,0,1*24\r\n" // GGA off
#define GSA_ON "$PSRF103,2,0,1,1*27\r\n" // GSA on (1 hz rate)
#define GSA_OFF "$PSRF103,2,0,0,1*26\r\n" // GSA off
#define GSV_ON "$PSRF103,3,0,1,1*26\r\n" // GSV on (1 hz rate)
#define GSV_OFF "$PSRF103,3,0,0,1*27\r\n" // GSV off
#define WAAS_ON "$PSRF151,1*3F\r\n" // WAAS on
#define WAAS_OFF "$PSRF151,0*3E\r\n" // WAAS off

void switchGPSModule(){
digitalWrite(GPSpowerpin,HIGH);
delay(2000);
digitalWrite(GPSpowerpin,LOW);
}
void switchGPRSModule(){
digitalWrite(GPRSpowerpin,HIGH);
delay(2000);
digitalWrite(GPRSpowerpin,LOW);
}

AFSoftSerial GPSserial = AFSoftSerial(GPSrxPin, GPStxPin); // Puerto serial virtual para el GPS

void setup()
{
if (GPSpowerpin, GPRSpowerpin) {
pinMode(GPSpowerpin, OUTPUT);
pinMode(GPRSpowerpin, OUTPUT);
}
GPSserial.begin(GPSRATE); // Inicio comunicacion para GPS
switchGPSModule(); // Enciendo modulo GPS
GPSserial.println("Configurando GPS..."); // Mensaje iniciando GPS
delay(1000);
GPSserial.println(GGA_ON); // GGA on
GPSserial.println(RMC_OFF); // RMC off
GPSserial.println(GSA_OFF); // GSA off
GPSserial.println(GSV_OFF); // GSV off
GPSserial.println(WAAS_OFF); // WAAS off
delay(1000);
Serial.begin(GPRSRATE); // Inicio comunicacion para GPRS
switchGPRSModule(); // Enciendo modulo GPRS
Serial.println("Configurando GPRS..."); // Mensaje iniciando GPRS
delay(1000);
Serial.println("AT+CMGF=1"); // SMS en modo texto
}

void loop()
{
//aqui va el codigo principal
}


netstat
 
Posts: 16
Joined: Mon Nov 10, 2008 9:28 pm

Re: Arduino Project - GPS/GPRS

Postby adafruit » Mon Nov 17, 2008 8:51 pm

if you need help with Libelium's shield i suggest contacting them for support
User avatar
adafruit
 
Posts: 10489
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Arduino Project - GPS/GPRS

Postby netstat » Mon Nov 17, 2008 9:30 pm

I found something about the commands...

Code: Select all
b)      Read a text SMS



Like PDU mode, when the M20 Terminal receives a SMS message, the following message will appear on the PC screen.



   +CMTI: “SM”, 1

     where 1 is the memory location in which the message can be read from.



To read the SMS message use the AT+CGMR command as follow.



AT+CMGR=1[ENTER]



     The M20 Terminal should return the text message as follow.

+CMGR: “REC READ”,“+61407809050”,“98/12/01,20:16:11+44”

  hello

           OK




c)      Delete a SMS message



The SMS message can be deleted from memory (eg. location 1) using the AT+CMGD command as follow. Note that there is no AT command to delete all the SMS messages at once.

 

AT+CMGD=1[ENTER]



      The M20 Terminal should return OK.



now I need to see how those command I can make the arduino to read the message...and answer back with the GPS information...
netstat
 
Posts: 16
Joined: Mon Nov 10, 2008 9:28 pm

Re: Arduino Project - GPS/GPRS

Postby adafruit » Mon Nov 17, 2008 11:37 pm

if you need help with Libelium's shield i suggest contacting them for support
User avatar
adafruit
 
Posts: 10489
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Arduino Project - GPS/GPRS

Postby netstat » Tue Nov 18, 2008 6:26 am

I just want to share this project...this is not about getting help from Libelium...the AT commands are somehting you can found all over the internet...is not something specifig to this shield... :roll:
netstat
 
Posts: 16
Joined: Mon Nov 10, 2008 9:28 pm

Re: Arduino Project - GPS/GPRS

Postby eil » Tue Nov 18, 2008 6:04 pm

This sounds like a neat project. So you basically send the unit a text message and it responds with it's GPS coordinates?
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 10:09 pm

Re: Arduino Project - GPS/GPRS

Postby netstat » Tue Nov 18, 2008 8:43 pm

eil wrote:This sounds like a neat project. So you basically send the unit a text message and it responds with it's GPS coordinates?


Exactly!!! Thats what I want to do.....browsing in google I found this!!!

http://www.digitaldawgpound.org/nick84/post=222

and this

http://tinkerlog.com/2007/07/13/interfa ... ile-phone/


I need to see how I do that with the Arduino...Im very basic at programming...
netstat
 
Posts: 16
Joined: Mon Nov 10, 2008 9:28 pm

Re: Arduino Project - GPS/GPRS

Postby hsalman01 » Sun Nov 30, 2008 7:26 am

I have worked in a company specialized in the gps tracking field. I am interested to share with you about this project. If you are also interested we can discuss by email.
hsalman01
 
Posts: 3
Joined: Mon Nov 24, 2008 12:04 pm

Re: Arduino Project - GPS/GPRS

Postby mtbf0 » Sun Nov 30, 2008 11:23 am

"i want to lead a dissipate existence, play scratchy records and enjoy my decline" - iggy pop, i need more
User avatar
mtbf0
 
Posts: 1642
Joined: Fri Nov 09, 2007 11:59 pm
Location: oakland ca

Re: Arduino Project - GPS/GPRS

Postby Bandit » Thu Feb 19, 2009 5:53 am

Hi netstat and others,

Did you manage to get it working, Im starting a project to do the same. I'll be using a gsm/gprs modem instead of a normal phone.

Im building a gps tracker that I can activate by text message. I want to put this tracker in a secure case (maybe encapsulate it) and attach it underneath my bike seat. I also want to include a fuel cut off valve that is electronically actuated so I can stop the bike in its tracks if it was ever to be stolen.

If you have got it working, please can you pm me? Thanks.
Bandit
 
Posts: 45
Joined: Mon Dec 01, 2008 12:16 pm

Re: Arduino Project - GPS/GPRS

Postby safariblue » Thu Oct 29, 2009 12:55 pm

I all

I´m doing a project with arduino and a telit board to do the same as talk in this post.

Can anyone help me. I try many versions but I can read the sms i send.
safariblue
 
Posts: 1
Joined: Thu Oct 29, 2009 12:52 pm

Re: Arduino Project - GPS/GPRS

Postby sergiotux » Fri May 04, 2012 11:14 am

Hello, I saw your project on the link (viewtopic.php?f=25&t=7770)'m trying to do the same but without success.
Can you help me?

I have a
1 - one and a arduino decimilanova
1 - gprs - (http://www.cooking-hacks.com/index.php/ ... odule.html)
1 - gps - http://www.skylab.com.cn/SKM53.html

And nenuma idéai how to do things.
I found an internet code where does the gps and other works where sendingtorpedoes gprs. I'm trying to join the two but I think that has a conflict with thedoors with gps gprs.

It seems to me that shlds you are using are the same.

You conseguil achieve the goal?

Thank you.

Sérgio - BRA
sergiotux
 
Posts: 1
Joined: Fri May 04, 2012 11:12 am


Return to Arduino

Who is online

Users browsing this forum: No registered users and 8 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]