Skip to content

Commit ba9b133

Browse files
jukkarnashif
authored andcommitted
samples: net: Fix README.rst file documentation
Various network samples contained QEMU slip setup instructions or those instructions were missing. A reference doc in doc/subsystems/networking/qemu_setup.rst file already has the setup instructions for QEMU. So add a reference to that file in samples/net/*/README.rst files and remove unnecessary slip setup instructions in relevant files. Fix various typos in readme files at the same time. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 78d7b40 commit ba9b133

File tree

11 files changed

+48
-103
lines changed

11 files changed

+48
-103
lines changed

samples/net/coaps_client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This sample code shows a CoAP over DTLS client using mbedTLS on top of Zephyr.
1010
Building and Running
1111
********************
1212

13-
Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
13+
Follow the steps for testing :ref:`networking_with_qemu`.
1414

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

samples/net/coaps_server/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This sample code shows a CoAP over DTLS server using mbedTLS on top of Zephyr.
1010
Building and Running
1111
********************
1212

13-
Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
13+
Follow the steps for testing :ref:`networking_with_qemu`.
1414

1515
In the application directory type:
1616

samples/net/dhcpv4_client/README.rst

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,19 @@ information to a serial console.
1313
Requirements
1414
************
1515

16-
- :ref:`networking with Qemu <networking_with_qemu>`
16+
- :ref:`networking_with_qemu`
1717

1818
Building and Running
1919
********************
2020

21-
QEMU x86
22-
========
21+
Running DHCPv4 client in Linux Host
22+
===================================
2323

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

28-
Follow readme from:
29-
30-
Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools.
31-
32-
https://github.com/zephyrproject-rtos/net-tools
33-
34-
.. code-block:: console
35-
36-
$ ./loop_socat.sh
37-
38-
In another window:
39-
40-
.. code-block:: console
41-
42-
$ sudo ./loop-slip-tap.sh
28+
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
4329

4430
Here's a sample server configuration file '/etc/dhcpd/dhcp.conf'
4531
used to configure the DHCPv4 server:

samples/net/dns_resolve/README.rst

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For more information about DNS configuration variables, see:
2121
Requirements
2222
************
2323

24-
- :ref:`networking with Qemu <networking_with_qemu>`
24+
- :ref:`networking_with_qemu`
2525

2626
- screen terminal emulator or equivalent.
2727

@@ -82,11 +82,8 @@ DNS server
8282
==========
8383

8484
The dnsmasq tool may be used for testing purposes. Sample dnsmasq start
85-
script can be found in net-tools project.
86-
87-
The net-tools can be downloaded from
88-
89-
https://github.com/zephyrproject-rtos/net-tools
85+
script can be downloaded from the zephyrproject-rtos/net-tools project area:
86+
https://github.com/zephyrproject-rtos/net-tools
9087

9188
Open a terminal window and type:
9289

@@ -131,24 +128,7 @@ Try to launch the dnsmasq application again.
131128
QEMU x86
132129
========
133130

134-
Open a terminal window and type:
135-
136-
.. code-block:: console
137-
138-
$ make
139-
140-
141-
Run 'loop_socat.sh' and 'loop-slip-tap.sh' as shown in the net-tools README
142-
at:
143-
144-
https://github.com/zephyrproject-rtos/net-tools
145-
146-
147-
Open a terminal where the project was build (i.e. :file:`samples/net/dns_resolve`) and type:
148-
149-
.. code-block:: console
150-
151-
$ make run
131+
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
152132

153133

154134
FRDM K64F

samples/net/echo_client/README.rst

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ and then verify it matches the data that was sent.
1313
The source code for this sample application can be found at:
1414
:file:`samples/net/echo_client`.
1515

16+
Requirements
17+
************
18+
19+
- :ref:`networking_with_qemu`
20+
1621
Building and Running
1722
********************
1823

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

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

71-
Running echo-server Linux Host
72-
==============================
76+
Running echo-server in Linux Host
77+
=================================
7378

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

77-
Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools in Linux host.
78-
79-
.. code-block:: console
80-
81-
$ ./loop_socat.sh
82+
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
8283

83-
In another window:
84-
85-
.. code-block:: console
86-
87-
$ sudo ./loop-slip-tap.sh
88-
89-
In third window:
84+
In a terminal window:
9085

9186
.. code-block:: console
9287
@@ -96,5 +91,5 @@ Run echo-client application in QEMU:
9691

9792
.. code-block:: console
9893
99-
$ cd $ZEPHYR_BASE/samples/net/echo-client
94+
$ cd $ZEPHYR_BASE/samples/net/echo_client
10095
$ make pristine && make qemu

samples/net/echo_server/README.rst

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ them back.
1414
The source code for this sample application can be found at:
1515
:file:`samples/net/echo_server`.
1616

17+
Requirements
18+
************
19+
20+
- :ref:`networking_with_qemu`
21+
1722
Building and Running
1823
********************
1924

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

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

78-
Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools in Linux host.
79-
80-
.. code-block:: console
81-
82-
$ ./loop_socat.sh
83-
84-
In another window:
85-
86-
.. code-block:: console
87-
88-
$ sudo ./loop-slip-tap.sh
83+
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
8984

9085
Run echo-server application in QEMU:
9186

9287
.. code-block:: console
9388
94-
$ cd $ZEPHYR_BASE/samples/net/echo-server
89+
$ cd $ZEPHYR_BASE/samples/net/echo_server
9590
$ make pristine && make qemu
9691
97-
In third window:
92+
In a terminal window:
9893

9994
.. code-block:: console
10095

samples/net/http_client/README.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ The source code for this sample application can be found at:
1616
Requirements
1717
************
1818

19-
- QEMU
19+
- :ref:`networking_with_qemu`
2020
- Terminal emulator software
2121
- HTTP Server
2222
- DNS server (optional)
2323

24+
2425
Building and Running
2526
********************
2627

2728
Open the project configuration file for your platform, for example:
2829
:file:`prj_qemu_x86.conf` is the configuration file for QEMU.
30+
31+
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
32+
2933
For IPv4 networks, set the following variables:
3034

3135
.. code-block:: console
@@ -69,12 +73,9 @@ port is 8000.
6973
HTTP Server
7074
===========
7175

72-
A very simple HTTP server is provided in net-tool project.
73-
74-
The net-tools can be downloaded from
75-
76-
https://github.com/zephyrproject-rtos/net-tools
77-
76+
Sample code for a very simple HTTP server can be downloaded from the
77+
zephyrproject-rtos/net-tools project area:
78+
https://github.com/zephyrproject-rtos/net-tools
7879

7980
Open a terminal window and type:
8081

@@ -87,7 +88,7 @@ Open a terminal window and type:
8788
DNS setup
8889
=========
8990

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

9394
Open a terminal window and type:

samples/net/http_server/README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ Requirements
2323

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

29+
2830
Building and Running
2931
********************
3032

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

38+
To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
39+
3640
This sample code supports both static and dynamic (DHCPv4) IP addresses that
3741
can be defined in the project configuration file:
3842

@@ -249,9 +253,6 @@ In order to compile and run the code execute:
249253
250254
make BOARD=qemu_x86 run
251255
252-
The sample code supports only one hard-coded valid URL (index.html) and
253-
will return 404 code for other requests.
254-
255256
Sample Output
256257
=============
257258

samples/net/mbedtls_dtlsclient/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This sample code shows a simple DTLS client using mbed TLS on top of Zephyr
1010
Building and running
1111
********************
1212

13-
Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
13+
Follow the steps for testing :ref:`networking_with_qemu`.
1414

1515
Obtain the mbed TLS code from:
1616

@@ -50,7 +50,7 @@ From the application directory type
5050
5151
$ make run
5252
53-
This will result in Qemu running with the following output:
53+
This will result in QEMU running with the following output:
5454

5555
.. code-block:: console
5656

samples/net/mbedtls_dtlsserver/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This sample code shows a simple DTLS server using mbedTLS on top of Zephyr.
1010
Building and Running
1111
********************
1212

13-
Follow the steps for testing :ref:`networking with Qemu <networking_with_qemu>`.
13+
Follow the steps for testing :ref:`networking_with_qemu`.
1414

1515
In the application directory type:
1616

0 commit comments

Comments
 (0)