this is using the mbed os version 5-13-1

Dependencies:   mbed-http

Branch:
PassingRegression
Revision:
128:3a641aaad2d9
Parent:
127:a21788227ca6
--- a/source/ATCmdManager.cpp	Mon Jul 15 21:37:22 2019 +0000
+++ b/source/ATCmdManager.cpp	Fri Jul 19 20:34:49 2019 +0000
@@ -85,7 +85,7 @@
     _parser.oob("AT+UWSC=0,2", callback(this, &ATCmdManager::_oob_setWiFiSSID));
     _parser.oob("AT+UWSC=0,8", callback(this, &ATCmdManager::_oob_setWiFiPWD));
     _parser.oob("AT+UWSC=0,5", callback(this, &ATCmdManager::_oob_setWiFiSecurity));
-    _parser.oob("AT+UNSTAT=", callback(this, &ATCmdManager::_oob_getNetworkStatus));
+    _parser.oob("AT+UNSTAT", callback(this, &ATCmdManager::_oob_getNetworkStatus));
     _parser.oob("AT+UWSSTAT", callback(this, &ATCmdManager::_oob_WiFiNetworkStatus));
     
     _parser.oob("AT+UFACTORY", callback(this, &ATCmdManager::_oob_factoryReset));
@@ -354,6 +354,22 @@
                 at_resp = AT_RESP_NONE;
                 break;
             }
+            case AT_ACCESS_TOKEN_SUCCESS:  
+            {
+                // AT_ACCESS_TOKEN_SUCCESS response state 
+                dbg_printf(LOG, "\n [ATCMD MAN] AT_ACCESS_TOKEN_SUCCESS RESPONSE RECEIVED!!\r\n");
+                sendAtConfirmation("\r\nAWS ACCESS TOKEN ACQUIRED \r\n");
+                at_resp = AT_RESP_NONE;
+                break;
+            }
+            case AT_ACCESS_TOKEN_FAILED:  
+            {
+                // AT_ACCESS_TOKEN_FAILED response state 
+                dbg_printf(LOG, "\n [ATCMD MAN] AT_ACCESS_TOKEN_FAILED!!\r\n");
+                sendAtConfirmation("\r\nAWS ACCESS TOKEN ACQUISITION FAILURE!!\r\n");
+                at_resp = AT_RESP_NONE;
+                break;
+            }
             default:
             {
                  //UNKNOWN response state
@@ -469,7 +485,7 @@
     char * bodyPtr = p2+4;
     dbg_printf(LOG, "\nstrPtr address= %x",strPtr);
     dbg_printf(LOG, "\np2 address= %x", p2);
-    for(int i = 0; i < 5; i++){
+    for(int i = 0; i < 6; i++){
         if(i == 0)// firstline scan method uri and http_ver
         {
             n = sscanf(nxtPtr,"%s %s %s", s1, s2, s3);
@@ -1159,8 +1175,8 @@
 
 void ATCmdManager::_oob_setupInternetConnection()
 {
-    char str[MAX_URL_LEN];
-    char url[MAX_URL_LEN];
+    char *str = new char[MAX_URL_LEN];
+    char *url = new char[MAX_URL_LEN];
     int n;
     internet_config_t internet_config;
     dbg_printf(LOG, "sizeof internet_config_t = %d\n", sizeof(internet_config_t));
@@ -1190,6 +1206,8 @@
         strncpy(internet_config.url, url, strlen(url)+1);
     }
     dbg_printf(LOG, "\n read string = %s , n = %d -- strlen(url) = %d\n", internet_config.url, n, strlen(internet_config.url));
+    delete url;
+    delete str;
     if(n>0) 
     {
         dbg_printf(LOG, "peer_id = %1d, url = %s, connScheme = %1d\n", internet_config.peer_id, 
@@ -1323,7 +1341,7 @@
 void ATCmdManager::_oob_getNetworkStatus()
 {
     int if_id; // interface id for request
-    _parser.scanf(",%d", &if_id);
+    _parser.scanf("=%d", &if_id);
     dbg_printf(LOG, "\n Received Get Network Status command!!\n");
     if(if_id == WIFI_INTERFACE_ID){
         wifi_cmd_t cmd = WIFI_CMD_NETWORK_STATUS;