PHS module SMA-01 library. see: https://developer.mbed.org/users/phsfan/notebook/abitusbmodem/
Dependencies: Socket lwip-sys lwip
Dependents: AbitUSBModem_HTTPTest AbitUSBModem_MQTTTest AbitUSBModem_WebsocketTest AbitUSBModem_SMSTest
Fork of VodafoneUSBModem by
Diff: sms/SMSInterface.cpp
- Revision:
- 26:d37501dc6c61
- Parent:
- 22:06fb2a93a1f6
- Child:
- 28:c94ffb45a848
diff -r 6f3b97dc4295 -r d37501dc6c61 sms/SMSInterface.cpp --- a/sms/SMSInterface.cpp Wed Aug 29 15:49:14 2012 +0000 +++ b/sms/SMSInterface.cpp Wed Aug 29 16:28:13 2012 +0000 @@ -30,14 +30,17 @@ #define DEFAULT_TIMEOUT 10000 -SMSInterface::SMSInterface(ATCommandsInterface* pIf) : m_pIf(pIf), m_msg(NULL), m_maxMsgLength(0), m_msisdn(NULL), /*m_msgCount(0),*/ -m_msgRefListCount(0), m_needsUpdate(true), m_state(SMS_IDLE) +SMSInterface::SMSInterface(ATCommandsInterface* pIf) : m_pIf(pIf), m_msg(NULL), m_maxMsgLength(0), m_msisdn(NULL) { m_pIf->registerEventsHandler(this); //Add us to the unsolicited result codes handlers } int SMSInterface::init() { + m_msgRefListCount = 0; + m_needsUpdate = true; + m_state = SMS_IDLE; + DBG("Set format"); //Set Text mode format int ret = m_pIf->executeSimple("AT+CMGF=1", NULL, DEFAULT_TIMEOUT);