Example showing how to use the ublox Cellular GPS/GNSS module. The program will use GPS to get location and time, setup TCP connections and finally send and receive SMS messages

Dependencies:   C027_Support mbed

Revision:
28:1c9844ce4e9d
Parent:
24:81f5b43a6585
--- a/main.cpp	Wed Oct 01 09:19:33 2014 +0000
+++ b/main.cpp	Thu Oct 23 19:00:14 2014 +0000
@@ -24,7 +24,7 @@
 /*! The APN of your network operator SIM, sometimes it is "internet" check your 
     contract with the network operator. You can also try to look-up your settings in 
     google: https://www.google.de/search?q=APN+list */
-#define APN         NULL
+#define APN         "online.telia.se"
 //! Set the user name for your APN, or NULL if not needed
 #define USERNAME    NULL
 //! Set the password for your APN, or NULL if not needed
@@ -193,7 +193,7 @@
             //printf("NMEA: %.*s\r\n", len-2, msg); 
             if ((PROTOCOL(ret) == GPSParser::NMEA) && (len > 6))
             {
-                if (!strncmp("$GPGLL", buf, 6)) {
+                if (!strncmp("$GPGLL", buf, 6) || !strncmp("$GNGLL", buf, 6)) {
                     double la = 0, lo = 0;
                     char ch;
                     if (gps.getNmeaAngle(1,buf,len,la) && 
@@ -204,11 +204,11 @@
                         sprintf(link, "I am here!\n"
                                       "https://maps.google.com/?q=%.5f,%.5f", la, lo); 
                     }
-                } else if (!strncmp("$GPGGA", buf, 6)) {
+                } else if (!strncmp("$GPGGA", buf, 6) || !strncmp("$GNGGA", buf, 6)) {
                     double a = 0; 
                     if (gps.getNmeaItem(9,buf,len,a)) // altitude msl [m]
                         printf("GPS Altitude: %.1f\r\n", a); 
-                } else if (!strncmp("$GPVTG", buf, 6)) {
+                } else if (!strncmp("$GPVTG", buf, 6) || !strncmp("$GNVTG", buf, 6)) {
                     double s = 0; 
                     if (gps.getNmeaItem(7,buf,len,s)) // speed [km/h]
                         printf("GPS Speed: %.1f\r\n", s);