Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/net/coaps_client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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>`.
Follow the steps for testing :ref:`networking_with_qemu`.

Run the server application at samples/net/coaps_server, with the following
command:
Expand Down
2 changes: 1 addition & 1 deletion samples/net/coaps_server/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This sample code shows a CoAP over DTLS server using mbedTLS on top of Zephyr.
Building and Running
********************

Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
Follow the steps for testing :ref:`networking_with_qemu`.

In the application directory type:

Expand Down
22 changes: 4 additions & 18 deletions samples/net/dhcpv4_client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,19 @@ information to a serial console.
Requirements
************

- :ref:`networking with Qemu <networking_with_qemu>`
- :ref:`networking_with_qemu`

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

QEMU x86
========
Running DHCPv4 client in Linux Host
===================================

These are instructions for how to use this sample application using
QEMU on a Linux host to negotiate IP address from DHCPv4 server running
on Linux host.

Follow readme from:

Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools.

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

.. code-block:: console

$ ./loop_socat.sh

In another window:

.. code-block:: console

$ sudo ./loop-slip-tap.sh
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.

Here's a sample server configuration file '/etc/dhcpd/dhcp.conf'
used to configure the DHCPv4 server:
Expand Down
50 changes: 21 additions & 29 deletions samples/net/dns_resolve/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For more information about DNS configuration variables, see:
Requirements
************

- :ref:`networking with Qemu <networking_with_qemu>`
- :ref:`networking_with_qemu`

- screen terminal emulator or equivalent.

Expand All @@ -35,6 +35,7 @@ Requirements
Dnsmasq version 2.76 Copyright (c) 2000-2016 Simon Kelley



Wiring
******

Expand Down Expand Up @@ -74,20 +75,15 @@ for example:
CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::2"


are the IPv6 addresses for the DNS client running Zephyr and the DNS server,
respectively.

DNS server
==========

The dnsmasq tool may be used for testing purposes. Sample dnsmasq start
script can be found in net-tools project.

The net-tools can be downloaded from

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

script can be downloaded from the zephyrproject-rtos/net-tools project area:
https://github.com/zephyrproject-rtos/net-tools

Open a terminal window and type:

Expand All @@ -96,16 +92,30 @@ Open a terminal window and type:
$ cd net-tools
$ ./dnsmasq.sh

('su' or 'sudo' may be required.)

The default project configurations settings for this sample uses the public
Google DNS servers. In order to use the local dnsmasq server, please edit
the appropriate 'prj.conf' file and update the DNS server addresses. For
instance, if using the usual IP addresses assigned to testing, update them
to the following values:

NOTE: some systems may require root privileges to run dnsmaq, use sudo or su.
.. code-block:: console

CONFIG_DNS_SERVER1="192.0.2.2:5353"
CONFIG_DNS_SERVER2="[2001:db8::2]:5353"

.. note::
DNS uses port 53 by default, but the dnsmasq.conf file provided by
net-tools uses port 5353 to allow executing the daemon without
superuser privileges.

If dnsmasq fails to start with an error like this:

.. code-block:: console

dnsmasq: failed to create listening socket for port 5353: Address already in use


Open a terminal window and type:

.. code-block:: console
Expand All @@ -115,28 +125,10 @@ Open a terminal window and type:

Try to launch the dnsmasq application again.


QEMU x86
========

Open a terminal window and type:

.. code-block:: console

$ make


Run 'loop_socat.sh' and 'loop-slip-tap.sh' as shown in the net-tools README
at:

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


Open a terminal where the project was build (i.e. :file:`samples/net/dns_resolve`) and type:

.. code-block:: console

$ make run
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.


FRDM K64F
Expand Down
27 changes: 11 additions & 16 deletions samples/net/echo_client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ and then verify it matches the data that was sent.
The source code for this sample application can be found at:
:file:`samples/net/echo_client`.

Requirements
************

- :ref:`networking_with_qemu`

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

There are multiple ways to use this application. One of the most common
usage scenario is to run echo-client application inside QEMU. This is
described in :ref:`networking with QEMU <networking_with_qemu>`.
described in :ref:`networking_with_qemu`.

There are configuration files for different boards and setups in the
echo-client directory:
Expand Down Expand Up @@ -68,25 +73,15 @@ Build echo-client sample application like this:
Make can select the default configuration file based on the BOARD you've
specified automatically so you might not always need to mention it.

Running echo-server Linux Host
==============================
Running echo-server in Linux Host
=================================

There is one useful testing scenario that can be used with Linux host.
Here echo-client is run in QEMU and echo-server is run in Linux host.

Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools in Linux host.

.. code-block:: console

$ ./loop_socat.sh
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.

In another window:

.. code-block:: console

$ sudo ./loop-slip-tap.sh

In third window:
In a terminal window:

.. code-block:: console

Expand All @@ -96,5 +91,5 @@ Run echo-client application in QEMU:

.. code-block:: console

$ cd $ZEPHYR_BASE/samples/net/echo-client
$ cd $ZEPHYR_BASE/samples/net/echo_client
$ make pristine && make qemu
23 changes: 9 additions & 14 deletions samples/net/echo_server/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ them back.
The source code for this sample application can be found at:
:file:`samples/net/echo_server`.

Requirements
************

- :ref:`networking_with_qemu`

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

There are multiple ways to use this application. One of the most common
usage scenario is to run echo-server application inside QEMU. This is
described in :ref:`networking with QEMU <networking_with_qemu>`.
described in :ref:`networking_with_qemu`.

There are configuration files for different boards and setups in the
echo-server directory:
Expand Down Expand Up @@ -75,26 +80,16 @@ Running echo-client in Linux Host
There is one useful testing scenario that can be used with Linux host.
Here echo-server is run in QEMU and echo-client is run in Linux host.

Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools in Linux host.

.. code-block:: console

$ ./loop_socat.sh

In another window:

.. code-block:: console

$ sudo ./loop-slip-tap.sh
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.

Run echo-server application in QEMU:

.. code-block:: console

$ cd $ZEPHYR_BASE/samples/net/echo-server
$ cd $ZEPHYR_BASE/samples/net/echo_server
$ make pristine && make qemu

In third window:
In a terminal window:

.. code-block:: console

Expand Down
17 changes: 9 additions & 8 deletions samples/net/http_client/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ The source code for this sample application can be found at:
Requirements
************

- QEMU
- :ref:`networking_with_qemu`
- Terminal emulator software
- HTTP Server
- DNS server (optional)


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

Open the project configuration file for your platform, for example:
:file:`prj_qemu_x86.conf` is the configuration file for QEMU.

To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.

For IPv4 networks, set the following variables:

.. code-block:: console
Expand Down Expand Up @@ -69,12 +73,9 @@ port is 8000.
HTTP Server
===========

A very simple HTTP server is provided in net-tool project.

The net-tools can be downloaded from

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

Sample code for a very simple HTTP server can be downloaded from the
zephyrproject-rtos/net-tools project area:
https://github.com/zephyrproject-rtos/net-tools

Open a terminal window and type:

Expand All @@ -87,7 +88,7 @@ Open a terminal window and type:
DNS setup
=========

The net-tool project provides a simple DNS resolver. You can activate
The net-tools project provides a simple DNS resolver. You can activate
it like this if you want to test the DNS resolving with HTTP client.

Open a terminal window and type:
Expand Down
7 changes: 4 additions & 3 deletions samples/net/http_server/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ Requirements

- Linux machine with wget and the screen terminal emulator
- Either QEMU or real device like Freedom Board (FRDM-K64F)
- For QEMU see this :ref:`networking_with_qemu`
- LAN for testing purposes (Ethernet)


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

Expand All @@ -33,6 +35,8 @@ If you want to modify the http-server sample application, please check
the configuration settings in :file:`samples/net/http_server/src/main.c` file
and also in the :file:`samples/net/http_server/src/config.h` file.

To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.

This sample code supports both static and dynamic (DHCPv4) IP addresses that
can be defined in the project configuration file:

Expand Down Expand Up @@ -249,9 +253,6 @@ In order to compile and run the code execute:

make BOARD=qemu_x86 run

The sample code supports only one hard-coded valid URL (index.html) and
will return 404 code for other requests.

Sample Output
=============

Expand Down
4 changes: 2 additions & 2 deletions samples/net/mbedtls_dtlsclient/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This sample code shows a simple DTLS client using mbed TLS on top of Zephyr
Building and running
********************

Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
Follow the steps for testing :ref:`networking_with_qemu`.

Obtain the mbed TLS code from:

Expand Down Expand Up @@ -50,7 +50,7 @@ From the application directory type

$ make run

This will result in Qemu running with the following output:
This will result in QEMU running with the following output:

.. code-block:: console

Expand Down
2 changes: 1 addition & 1 deletion samples/net/mbedtls_dtlsserver/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This sample code shows a simple DTLS server using mbedTLS on top of Zephyr.
Building and Running
********************

Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
Follow the steps for testing :ref:`networking_with_qemu`.

In the application directory type:

Expand Down
17 changes: 2 additions & 15 deletions samples/net/telnet/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using a telnet client.
Requirements
************

- :ref:`Networking with Qemu <networking_with_qemu>`
- :ref:`networking_with_qemu`


Building and Running
Expand All @@ -27,20 +27,7 @@ QEMU x86
These are instructions for how to use this sample application using
QEMU on a Linux host connected to a network with DHCP service.

To use QEMU for testing, follow the :ref:`Networking with Qemu
<networking_with_qemu>` guide.

Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools.

.. code-block:: console

$ ./loop_socat.sh

In another window:

.. code-block:: console

$ sudo ./loop-slip-tap.sh
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.

Run Zephyr samples/net/telnet application in QEMU:

Expand Down
Loading