zephyr/samples/net/coaps_client
Tomasz Bursztyka 0f18ce44f9 net: Rename Kconfig.samples and its main option for future changes
s/SAMPLES/APP for name shortening. Applying the change where relevant.

Not only IP addresse will be available as samples settings there but
also IEEE 802.15.4 channel, pan_id, and more for instance.

Change-Id: I05dd24989bd0c804d9588092d67044a3e063bc88
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-31 11:24:26 +02:00
..
src net: Rename Kconfig.samples and its main option for future changes 2017-03-31 11:24:26 +02:00
Makefile samples/coaps_client CoAP over DTLS client example app using mbedTLS 2017-01-27 12:35:53 +02:00
README.rst doc: net: use Qemu setup section in current documentation 2017-02-03 15:59:19 +02:00
prj_qemu_x86.conf net: Rename Kconfig.samples and its main option for future changes 2017-03-31 11:24:26 +02:00
testcase.ini samples/coaps_client CoAP over DTLS client example app using mbedTLS 2017-01-27 12:35:53 +02:00

README.rst

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 <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.