NTP client app setting system time and X-NUCLEO-IDW01M1 Wi-Fi board time connecting to internet NTP UTC time server.

Dependencies:   NTPClient NetworkSocketAPI X_NUCLEO_IDW01M1v2 mbed

Fork of NTPClient_HelloWorld by ST Expansion SW Team

Example of retrieval of current time using an NTP server. Time is then used to perform a TLS secure connection to https://mbed.org.
The application is meant to be used with mbed OS 2 ("Classic") only (no mbedOS 5 support).

Files at this revision

API Documentation at this revision

Comitter:
mapellil
Date:
Fri Jan 13 15:39:45 2017 +0000
Parent:
8:20949c0e7b72
Commit message:
Updated Wifi lib

Changed in this revision

X_NUCLEO_IDW01M1v2.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/X_NUCLEO_IDW01M1v2.lib	Wed Jan 11 09:20:45 2017 +0000
+++ b/X_NUCLEO_IDW01M1v2.lib	Fri Jan 13 15:39:45 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X_NUCLEO_IDW01M1v2/#0a075334e0e9
+https://developer.mbed.org/teams/ST/code/X_NUCLEO_IDW01M1v2/#c8697141ce44
--- a/main.cpp	Wed Jan 11 09:20:45 2017 +0000
+++ b/main.cpp	Fri Jan 13 15:39:45 2017 +0000
@@ -35,6 +35,7 @@
     
     printf ("\n\rConnecting to WiFi ...\n\r");  
     spwf.connect("STM","STMDemo", NSAPI_SECURITY_WPA2);
+
     NTPClient ntp(spwf);        
 
     printf("Initial System Time is: %s\r\n", ctime(&ctTime));