zephyr/samples/net/coaps_client
Jukka Rissanen 55b8edc88e net: Fix LLVM compiler warnings
Jira: ZEP-2488
Jira: ZEP-2486
Jira: ZEP-2485
Jira: ZEP-2482
Jira: ZEP-2480

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-08-09 12:50:50 -04:00
..
src net: Fix LLVM compiler warnings 2017-08-09 12:50:50 -04:00
Makefile samples: coaps_client: unify prj.conf and cleanup docs 2017-08-02 07:31:22 -04:00
README.rst samples: coaps_client: unify prj.conf and cleanup docs 2017-08-02 07:31:22 -04:00
prj.conf samples: coaps_client: unify prj.conf and cleanup docs 2017-08-02 07:31:22 -04:00
sample.yaml samples: coaps_client: unify prj.conf and cleanup docs 2017-08-02 07:31:22 -04:00

README.rst

.. _coap-client-sample:

CoAP over DTLS sample client
############################

Overview
********
This sample code shows a CoAP over DTLS client using mbedTLS on top of Zephyr.

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

Follow the steps for testing :ref:`networking_with_qemu`.

Run the server application at samples/net/coaps_server, with the following
command:

.. code-block:: console

	$ make server

In other terminal window, run this client application at samples/net/coaps_client:

.. code-block:: console

	$ make client

You will get the following output:

.. code-block:: console

	reply: 60 45 00 01 ff 54 79 70 65 3a 20 30 0a 43 6f 64 65 3a 20 31 0a 4d
	49 44 3a 20 31 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
	00 00 00 00 00 (123 bytes)

From the server application directory the screen should display

.. code-block:: console

	*******
	type: 0 code 1 id 1
	*******
	connection was closed gracefully
	done

If the server does not receive the  messages, restart the app and try to connect
the client again.