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.
Diff: MDM.h
- Revision:
- 76:f7c3dd568dae
- Parent:
- 75:ce6e12067d0c
- Child:
- 79:291df065e345
diff -r ce6e12067d0c -r f7c3dd568dae MDM.h --- a/MDM.h Fri May 16 14:13:00 2014 +0000 +++ b/MDM.h Mon May 19 13:05:41 2014 +0000 @@ -23,9 +23,7 @@ { public: //! Constructor - MDMParser(); - //! Destructor - ~MDMParser(); + MDMParser(void); //! get static instance static MDMParser* getInstance() { return inst; }; @@ -37,7 +35,7 @@ //! SIM Status typedef enum { SIM_UNKNOWN, SIM_MISSING, SIM_PIN, SIM_READY } Sim; //! SIM Status - typedef enum { LPM_DISABLED, LPM_ENABLED, LPM_ACTIVE, LPM_SLEEP } Lpm; + typedef enum { LPM_DISABLED, LPM_ENABLED, LPM_ACTIVE } Lpm; //! Device status typedef struct { Dev dev; //!< Device Type @@ -505,6 +503,7 @@ // LISA-U and SARA-G have 7 sockets starting at index 1 SockCtrl _sockets[32]; static MDMParser* inst; + bool _init; #ifdef TARGET_UBLOX_C027 bool _onboard; #endif @@ -543,6 +542,9 @@ #endif int rxSize = 256 , int txSize = 128 ); + //! Destructor + ~MDMSerial(void); + /** Get a line from the physical interface. \param buf the buffer to store it \param buf size of the buffer @@ -568,7 +570,10 @@ class MDMUsb : /*public UsbSerial,*/ public MDMParser { public: + //! Constructor MDMUsb(void); + //! Destructor + ~MDMUsb(void); virtual int getLine(char* buffer, int length); protected: virtual int _send(const void* buf, int len);