Giung Kim / Mbed OS WIZnet-IoTShield-WM-N400MSE-PSM

Files at this revision

API Documentation at this revision

Comitter:
AustinKim
Date:
Mon Sep 16 07:12:05 2019 +0000
Parent:
0:739a04e1daf4
Child:
2:0307cf9b4dcb
Commit message:
Update project name

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Sep 11 07:34:38 2019 +0000
+++ b/main.cpp	Mon Sep 16 07:12:05 2019 +0000
@@ -67,8 +67,8 @@
 #define WM01_PARSER_DEBUG                   DEBUG_DISABLE
 #define CATM1_DEVICE_DEBUG                  DEBUG_ENABLE 
 
-char periodic_tau[] = "10100001";   // (60s * 1) + (3s ~ 4s) = 63s ~ 64s
-char active_time[] = "00000001";    // (2s * 1) + (24s ~ 27s) = 26s ~ 29s
+char periodic_tau[] = "10100101";
+char active_time[] = "00100100";
 
 // Functions: Print information
 void printInfo(void);
@@ -148,7 +148,7 @@
 // ----------------------------------------------------------------
 
 int main()
-{     
+{
     bool psm_en = false;
     char time[30] = {0, };
     float elapsed_time_sec = 0; 
@@ -176,6 +176,7 @@
     
     getNetworkStatus_WM01();
 
+
 #if 0
 // PSM disable   
     setPsmDeactivate_WM01();
@@ -348,10 +349,6 @@
 
         ret = RET_OK;
     }
-    else
-    {
-        devlog("PSM activate : failed\r\n");
-    }
 
     return ret;
 }
@@ -364,10 +361,6 @@
     {
         devlog("PSM deactivate : success\r\n");
     }
-    else
-    {
-        devlog("PSM deactivate : failed\r\n");
-    }
     
     return ret;
 }
@@ -380,7 +373,7 @@
 {
     int8_t ret = RET_NOK;
     
-    if(_parser->send("AT$$MSTIME?") && _parser->recv("$$MSTIME:%s\n", time) && _parser->recv("OK"))  
+    if(_parser->send("AT$$MSTIME?") && _parser->recv("$$MSTIME:%*[^,],%s\n", time) && _parser->recv("OK"))  
     {
         //devlog("Get current local time success\r\n");