zephyr/samples/net/sockets/sntp_client
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
..
boards drivers: wifi: simplelink: Rework offloading mechanism 2020-01-31 11:36:02 -05:00
src zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf samples: sntp_client: Elaborate sample to workable state 2019-04-24 12:50:12 +03:00
README.rst doc: net: Add more info for network connectivity with host 2019-02-20 07:32:42 -05:00
sample.yaml samples: sockets: sntp_client: Build for both native Zephyr and POSIX 2019-09-12 17:30:29 +03:00

.. _sntp-client-sample:

SNTP client sample
##################

Overview
********

This sample is a simple SNTP client showing how to retrieve the current
time in seconds since 1st January 1970.

This demo assumes that the platform of choice has networking support,
some adjustments to the configuration may be needed. It also assumes
SNTP server is running on the host.

Building and Running
********************

When the application runs, it issues an SNTP request to the host and waits
for a response. When the response is received, the current epoch time, in
seconds, as well as the status code of the response (0 on success), is
printed.

See the `net-tools`_ project for more details.

This sample can be built and executed on QEMU or native_posix board as
described in :ref:`networking_with_qemu`.

.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools