SNTP Simple Network Time Protocol Simple Network Time

  • Slides: 6
Download presentation
SNTP Simple Network Time Protocol

SNTP Simple Network Time Protocol

Simple Network Time Protocol (SNTP) • Get accurate date and time from SNTP server

Simple Network Time Protocol (SNTP) • Get accurate date and time from SNTP server – i. e. 131. 215. 254. 2 • Make Standard Time functions (ANSI C) to return accurate date and time – i. e. time() or localtime().

Simple Network Time Protocol (SNTP) • APIs – NAinstall. Sntp. Time – NAinstall. Time.

Simple Network Time Protocol (SNTP) • APIs – NAinstall. Sntp. Time – NAinstall. Time. Zone – NArestart. Sntp. Server – NAget. Sntp. Time

Simple Network Time Protocol (SNTP) • NAinstall. Sntp. Time – Establish SNTP server connection

Simple Network Time Protocol (SNTP) • NAinstall. Sntp. Time – Establish SNTP server connection – Start SNTP (run as a separate thread) – Setup SNTP for standard time functions • User’s Callback – Used to notify user the SNTP status. – i. e. Time is successfully (unsuccessfully) updated or obtained

Simple Network Time Protocol (SNTP) • NAinstall. Time. Zone – Setup local time zone

Simple Network Time Protocol (SNTP) • NAinstall. Time. Zone – Setup local time zone relative to GMT • NArestart. Sntp. Server – Restart SNTP with different NTP servers – It should be called in user’s callback function

Simple Network Time Protocol (SNTP) • Define APP_USE_NETWORK_TIME in appconf. h to include SNTP

Simple Network Time Protocol (SNTP) • Define APP_USE_NETWORK_TIME in appconf. h to include SNTP in BSP – BSP will setup SNTP and time zone – SNTP server address & time zone are stored in NVRAM • USA Eastern Standard Time is default time zone • 5 hour is default time to re-synchronize SNTP server – Once time is obtained from SNTP server, use system clock (ticks)