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 mbed official

/media/uploads/phsfan/sma01_003.png

Revision:
83:897a0de9d668
Parent:
80:c0e63c16306e
Child:
91:7b311719374d
diff -r ab4d6263f25c -r 897a0de9d668 sms/SMSInterface.cpp
--- a/sms/SMSInterface.cpp	Tue Jan 29 13:49:23 2013 +0000
+++ b/sms/SMSInterface.cpp	Tue Mar 05 14:54:15 2013 +0000
@@ -33,6 +33,7 @@
 
 SMSInterface::SMSInterface(ATCommandsInterface* pIf) : m_pIf(pIf), m_msg(NULL), m_maxMsgLength(0), m_msisdn(NULL)
 {
+  DBG("registering sms");
   m_pIf->registerEventsHandler(this); //Add us to the unsolicited result codes handlers
 }
 
@@ -240,8 +241,9 @@
   }
   else if(m_state == SMS_GET_HDR_RECEIVED)
   {
-    DBG("Message: %s", line);
+    
     size_t cpyLen = MIN( std::strlen(line), m_maxMsgLength - 1 );
+    DBG("Message: %s (%d)", line, cpyLen);
     std::memcpy( m_msg, line, cpyLen );
     m_msg[cpyLen] = '\0';
     m_state = SMS_CMD_PROCESSED;
@@ -356,7 +358,6 @@
   {
     return; //Not supported
   }
-  
 
   DBG("Unsollicited result code: %s - %s", atCode, evt);