![](/media/cache/group/ST_logo_2020_blue_V_cmyk.jpg.50x50_q85.jpg)
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
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).
Revision 9:c710dd7a4242, committed 2017-01-13
- 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 |
diff -r 20949c0e7b72 -r c710dd7a4242 X_NUCLEO_IDW01M1v2.lib --- 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
diff -r 20949c0e7b72 -r c710dd7a4242 main.cpp --- 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));