support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

Dependents:   HTTPClient_Cellular_HelloWorld Cellular_HelloMQTT MbedSmartRestMain Car_Bon_car_module ... more

This library is intended to be used with u-blox products such as the C027 or a shield with u-blox cellular and GPS modules like the cellular and positioning shield from Embedded Artist.

For 2G/GSM and 3G/UMTS you need to:

  • have a SIM card and know its PIN number
  • need to know you network operators APN setting These setting should be passed to the connect or init and join functions. You can also extend the APN database in MDMAPN.h.

For CDMA products you need to make sure that you have provisioned and activated the modem with either Sprint or Verizon.

Revision:
75:ce6e12067d0c
Parent:
74:208e3e32d263
Child:
76:f7c3dd568dae
--- a/GPS.h	Thu May 15 22:20:42 2014 +0000
+++ b/GPS.h	Fri May 16 14:13:00 2014 +0000
@@ -5,9 +5,9 @@
 #include "SerialPipe.h"
 
 #ifdef TARGET_UBLOX_C027
- #define _IF(onboard, shield) onboard
+ #define GPS_IF(onboard, shield) onboard
 #else
- #define _IF(onboard, shield) shield
+ #define GPS_IF(onboard, shield) shield
 #endif
 
 /** basic gps parser class 
@@ -21,7 +21,7 @@
    
     /** Power on / Wake up the gps 
     */
-    virtual bool init(void) = 0;
+    virtual bool init(PinName pn) = 0;
     
     enum { 
         // getLine Responses
@@ -178,13 +178,13 @@
         \param rxSize the size of the serial rx buffer
         \param txSize the size of the serial tx buffer
     */
-    GPSSerial(PinName tx    _IF( = GPSTXD, /* = D8 */), // resistor on shield not populated 
-              PinName rx    _IF( = GPSRXD, /* = D9 */), // resistor on shield not populated 
-              int baudrate  _IF( = GPSBAUD, = 9600 ),
+    GPSSerial(PinName tx    GPS_IF( = GPSTXD, /* = D8 */), // resistor on shield not populated 
+              PinName rx    GPS_IF( = GPSRXD, /* = D9 */), // resistor on shield not populated 
+              int baudrate  GPS_IF( = GPSBAUD, = 9600 ),
               int rxSize    = 256 , 
               int txSize    = 128 );
               
-    virtual bool init(void);
+    virtual bool init(PinName pn = NC);
     
     /** Get a line from the physical interface. 
         \param buf the buffer to store it
@@ -215,15 +215,15 @@
         \param adr the I2C address of the GPS set to (66<<1)
         \param rxSize the size of the serial rx buffer
     */
-    GPSI2C(PinName sda          _IF( = GPSSDA, = D14 ), 
-           PinName scl          _IF( = GPSSCL, = D15 ),
-           unsigned char i2cAdr _IF( = GPSADR, = (66<<1) ), 
+    GPSI2C(PinName sda          GPS_IF( = GPSSDA, = D14 ), 
+           PinName scl          GPS_IF( = GPSSCL, = D15 ),
+           unsigned char i2cAdr GPS_IF( = GPSADR, = (66<<1) ), 
            int rxSize           = 256 );
     
     /** helper function to probe the i2c device
         \return true if successfully detected the gps. 
     */ 
-    virtual bool init(void);
+    virtual bool init(PinName pn = GPS_IF( GPSINT, NC /* D7 resistor R67 on shield not mounted */));
     
     /** Get a line from the physical interface. 
         \param buf the buffer to store it