C027 updated to work with latest mBed libraries
Dependents: Cellular_HelloMQTT UBLOXModemDriver UBLOXMQTTDriver
Fork of C027_Support by
Diff: MDM.h
- Revision:
- 79:291df065e345
- Parent:
- 76:f7c3dd568dae
- Child:
- 80:34985b4d821e
diff -r caf0014375cb -r 291df065e345 MDM.h --- a/MDM.h Tue May 20 11:40:07 2014 +0000 +++ b/MDM.h Mon May 26 11:55:16 2014 +0000 @@ -53,12 +53,10 @@ typedef enum { REG_UNKNOWN, REG_DENIED, REG_NONE, REG_HOME, REG_ROAMING } Reg; //! Access Technology typedef enum { ACT_UNKNOWN, ACT_GSM, ACT_EDGE, ACT_UTRAN, ACT_CDMA } AcT; - //! Gprs Attach Status - typedef enum { GPRS_UNKNOWN, GPRS_DETACHED, GPRS_ATTACHED } Gprs; //! Network Status typedef struct { - Reg reg; //!< Registration Status - Gprs gprs; //!< Gprs Attach status + Reg csd; //!< CSD Registration Status (Circuit Switched Data) + Reg psd; //!< PSD Registration status (Packet Switched Data) AcT act; //!< Access Technology int rssi; //!< Received Signal Strength Indication (in dBm, range -113..-53) int ber; //!< Bit Error Rate (BER), see 3GPP TS 45.008 [20] subclause 8.2.4 @@ -129,6 +127,8 @@ // Data Connection (GPRS) // ---------------------------------------------------------------- + typedef enum { AUTH_NONE, AUTH_PAP, AUTH_CHAP, AUTH_DETECT } Auth; + /** register (Attach) the MT to the GPRS service. \param apn the of the network provider e.g. "internet" or "apn.provider.com" \param username is the user name text string for the authentication phase @@ -136,7 +136,8 @@ \param dump set to true if you like to dump the status if successful \return the ip that is assigned */ - MDMParser::IP join(const char* apn = NULL, const char* username = NULL, const char* password = NULL); + MDMParser::IP join(const char* apn = NULL, const char* username = NULL, + const char* password = NULL, Auth auth = AUTH_DETECT); /** deregister (detach) the MT from the GPRS service. \return true if successful, false otherwise @@ -476,7 +477,6 @@ static int _cbCSQ(int type, const char* buf, int len, NetStatus* status); static int _cbCOPS(int type, const char* buf, int len, NetStatus* status); static int _cbCNUM(int type, const char* buf, int len, char* num); - static int _cbCGATT(int type, const char* buf, int len, Gprs* gprs); // sockets static int _cbCMIP(int type, const char* buf, int len, IP* ip); static int _cbUPSND(int type, const char* buf, int len, int* act);