An SMS based GPS tracker using the Adafruit Ultimate GPS module http://www.adafruit.com/products/746 and the Seeed Studio GPRS shield (Sim900 chipset) http://www.seeedstudio.com/depot/gprs-shield-p-779.html?cPath=132_134

Dependencies:   GPS MODSERIAL mbed-rtos mbed

SMS based GPS tracker

This is an SMS based GPS tracker using using the Adafruit Ultimate GPS module and the Seeed studio GPRS arduino shield [SIM900 chipset]. The idea of this project is to leverage the free SMS between Virgin mobile prepaid SIM cards in Australia for long distance communication.

Currently the GPRS shield is switched on manually, and should be done about 10 seconds before powering the mbed/GPS in order to disable echo properly during start up. This could easily be fixed by switching the GPRS shield with the mbed at start up, waiting the 10 seconds, set the echo then flush the buffer.

The mbed can read all 160 ASCII chars sent in a message for control.

http://i47.tinypic.com/35alpue.png http://i48.tinypic.com/2mi3y0z.png http://i45.tinypic.com/jkeyvt.png

The Seeed GPRS shield http://www.seeedstudio.com/depot/gprs-shield-p-779.html?cPath=132_134

The Adafruit Ultimate GPS http://www.adafruit.com/products/746

Files at this revision

API Documentation at this revision

Comitter:
SamClarke
Date:
Mon Oct 08 06:32:46 2012 +0000
Parent:
4:0e55a4620f5e
Child:
6:32c25fb48fd2
Commit message:
Added an incoming call as another trigger for the SMS notification.; You call, it hangs up and sends you its coordinates :)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Oct 08 01:16:13 2012 +0000
+++ b/main.cpp	Mon Oct 08 06:32:46 2012 +0000
@@ -99,13 +99,14 @@
     } 
    if (strncmp(GPRSbuffer, "$$RING",6) == 0) {
         //dump = "fixed";
-        GPRS.printf("ATH=0\r\n");
+        GPRS.printf("ATH0\r\n");
         wait(1);
+        // Flush any incoming rings in the MODSERIAL buffer
         GPRS.rxBufferFlush();
         pc.printf("\nCall recieved");
         // Do the send SMS routine...
         sendSms();
-        // Wait for the cascade of \r\nOK\r\n\r\nOK\r\n's from the SMS's to finish
+        // Wait for the cascade of [\r\nOK\r\n][\r\nOK\r\n]'s from the SMS's to finish
         wait(4);
         // Flush out any left in the serial buffer
         GPRS.rxBufferFlush();
@@ -128,6 +129,7 @@
     pc.baud(115200);
     GPRS.baud(19200);
     Thread thread(led_thread);
+    memset(GPRSbuffer, '0', 512);
     pc.printf("I'm Alive...\n");
     // Setup the GPS
     gps.Init();