Base library for cellular modem implementations

Dependencies:   Socket lwip-sys lwip

Dependents:   CellularUSBModem CellularUSBModem

Deprecated

This is an mbed 2 networking library. For mbed 5, the networking libraries have been revised to better support additional network stacks and thread safety here.

Revision:
7:0fd95907b5b3
Parent:
4:3fc75e611736
--- a/at/ATCommandsInterface.cpp	Tue Dec 17 15:23:32 2013 +0000
+++ b/at/ATCommandsInterface.cpp	Tue Mar 04 10:00:52 2014 +0000
@@ -32,7 +32,7 @@
 #include "ATCommandsInterface.h"
 
 ATCommandsInterface::ATCommandsInterface(IOStream* pStream) :
-   m_pStream(pStream), m_open(false), m_env2AT(), m_AT2Env(), m_processingMtx(),
+   m_pStream(pStream), m_open(false), m_transactionState(IDLE), m_env2AT(), m_AT2Env(), m_processingMtx(),
    m_processingThread(&ATCommandsInterface::staticCallback, this, (osPriority)AT_THREAD_PRIORITY, 4*192),
    m_eventsMgmtMtx(), m_eventsProcessingMtx()
 {
@@ -270,6 +270,7 @@
     } while(msgResult != AT_TIMEOUT);  
 
     WARN("Command returned no message");
+    WARN("Command \"%s\" returned no message", command);
     return NET_TIMEOUT;
   }
   DBG("Command returned with message %d", *msg);
@@ -285,6 +286,7 @@
   if(ret != OK)
   {
     WARN("Command returned AT result %d with code %d", m_transactionResult.result, m_transactionResult.code);
+    WARN("Command \"%s\" returned AT result %d with code %d", command, m_transactionResult.result, m_transactionResult.code);
   }
 
   DBG("Command returned successfully");
@@ -751,12 +753,13 @@
     {
       m_eventsHandlers[i]->onDispatchStart();
       //Enable this kind of events
-      if(m_eventsHandlers[i]->getEventsEnableCommand() != NULL)
+      const char* cmd = m_eventsHandlers[i]->getEventsEnableCommand();
+      if(cmd != NULL)
       {
-        int ret = executeInternal(m_eventsHandlers[i]->getEventsEnableCommand(), this, NULL); //Execute enable command
+        int ret = executeInternal(cmd, this, NULL); //Execute enable command
         if(ret)
         {
-          WARN("Events enabling command failed");
+          WARN("Events enabling command \"%s\" failed", cmd);
         }
       }
     }
@@ -775,12 +778,13 @@
     {
       m_eventsHandlers[i]->onDispatchStart();
       //Disable this kind of events
-      if(m_eventsHandlers[i]->getEventsDisableCommand() != NULL)
+      const char* cmd = m_eventsHandlers[i]->getEventsDisableCommand();
+      if(cmd != NULL)
       {
-        int ret = executeInternal(m_eventsHandlers[i]->getEventsDisableCommand(), this, NULL); //Execute disable command
+        int ret = executeInternal(cmd, this, NULL); //Execute disable command
         if(ret)
         {
-          WARN("Events disabling command failed");
+          WARN("Events disabling command \"%s\" failed", cmd);
         }
       }
     }