Giung Kim
/
WIZnet-IoTShield-WM01-Ping
Init Project for Ping
Diff: main.cpp
- Revision:
- 1:9f135d5ea1f9
- Parent:
- 0:7a10bb221e55
--- a/main.cpp Wed Sep 11 07:34:25 2019 +0000 +++ b/main.cpp Sun Sep 15 23:43:17 2019 +0000 @@ -141,7 +141,7 @@ int main() { char ping_dest_1st[] = "8.8.8.8"; - char ping_dest_2nd[] = "www.google.com"; + char ping_dest_2nd[] = "www.google.com"; serialPcInit(); catm1DeviceInit(); @@ -164,14 +164,14 @@ getNetworkStatus_WM01(); - setContextActivate_WM01(); - - myprintf("[Ping] Host: %s\r\n", ping_dest_1st); + setContextActivate_WM01(); + + myprintf("[Ping] Host : %s\r\n", ping_dest_1st); printPingToHost_WM01(ping_dest_1st, 4); wait_ms(2000); - myprintf("[Ping] Host: %s\r\n", ping_dest_2nd); + myprintf("[Ping] Host : %s\r\n", ping_dest_2nd); printPingToHost_WM01(ping_dest_2nd, 4); setContextDeactivate_WM01(); @@ -332,13 +332,13 @@ return; } - _parser->set_timeout((1000 * pingnum) + 2000); + _parser->set_timeout(1000 * pingnum); if(_parser->send("AT*PING=%s,%d", host, pingnum) && _parser->recv("OK")) { _parser->read(resp_str, sizeof(resp_str)); - devlog("%s\r\n", resp_str); + devlog("%s", resp_str); } _parser->set_timeout(WM01_DEFAULT_TIMEOUT);