Skip to content

Commit 14034ac

Browse files
committed
samples: net: Add README.rst to echo apps
Add a README.rst file to both echo-server and echo-client sample applications. Jira: ZEP-1539 Change-Id: I1ee1d02a3de0295697117f448d8e13f5b161e11b Signed-off-by: Jukka Rissanen <[email protected]>
1 parent c1c5e25 commit 14034ac

File tree

2 files changed

+200
-0
lines changed

2 files changed

+200
-0
lines changed

samples/net/echo_client/README.rst

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
Echo Client
2+
###########
3+
4+
Overview
5+
********
6+
7+
The echo-client sample application for Zephyr implements a UDP/TCP client
8+
that will send IPv4 or IPv6 packets, wait for the data to be sent back,
9+
and then verify it matches the data that was sent.
10+
11+
The source code for this sample application can be found at:
12+
:file:`samples/net/echo_client`.
13+
14+
Building and Running
15+
********************
16+
17+
There are multiple ways to use this application. One of the most common
18+
usage scenario is to run echo-client application inside QEMU. This is
19+
described in :ref:`networking with QEMU <networking_with_qemu>`.
20+
21+
There are configuration files for different boards and setups in the
22+
echo-client directory:
23+
24+
- :file:`prj_arduino_101_cc2520.conf`
25+
Use this for Arduino 101 with external IEEE 802.15.4 cc2520 board.
26+
27+
- :file:`prj_arduino_101.conf`
28+
Use this for Arduino 101 with external enc28j60 ethernet board.
29+
30+
- :file:`prj_bt.conf`
31+
Use this for Bluetooth IPSP connectivity.
32+
33+
- :file:`prj_cc2520.conf`
34+
Use this for devices that have support for IEEE 802.15.4 cc2520 chip.
35+
36+
- :file:`prj_frdm_k64f_cc2520.conf`
37+
Use this for FRDM-K64F board with external IEEE 802.15.4 cc2520 board.
38+
39+
- :file:`prj_frdm_k64f.conf`
40+
Use this for FRDM-K64F board with built-in ethernet.
41+
42+
- :file:`prj_frdm_k64f_mcr20a.conf`
43+
Use this for FRDM-K64F board with IEEE 802.15.4 mcr20a board.
44+
45+
- :file:`prj_qemu_802154.conf`
46+
Use this when simulating IEEE 802.15.4 network using two QEMU's that
47+
are connected together.
48+
49+
- :file:`prj_qemu_cortex_m3.conf`
50+
Use this for ARM QEMU.
51+
52+
- :file:`prj_qemu_x86.conf`
53+
Use this for x86 QEMU.
54+
55+
- :file:`prj_sam_e70_xplained.conf`
56+
Use this for Atmel SMART SAM E70 Xplained board with ethernet.
57+
58+
Build echo-client sample application like this:
59+
60+
.. code-block:: console
61+
62+
$ cd $ZEPHYR_BASE/samples/net/echo_client
63+
$ make pristine && make CONF_FILE=<your desired conf file> \
64+
BOARD=<board to use>
65+
66+
Make can select the default configuration file based on the BOARD you've
67+
specified automatically so you might not always need to mention it.
68+
69+
Running echo-server Linux Host
70+
==============================
71+
72+
There is one useful testing scenario that can be used with Linux host.
73+
Here echo-client is run in QEMU and echo-server is run in Linux host.
74+
75+
Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools in Linux host.
76+
77+
.. code-block:: console
78+
79+
$ ./loop_socat.sh
80+
81+
In another window:
82+
83+
.. code-block:: console
84+
85+
$ sudo ./loop-slip-tap.sh
86+
87+
In third window:
88+
89+
.. code-block:: console
90+
91+
$ sudo ./echo-server -i tap0
92+
93+
Run echo-client application in QEMU:
94+
95+
.. code-block:: console
96+
97+
$ cd $ZEPHYR_BASE/samples/net/echo-client
98+
$ make pristine && make qemu

samples/net/echo_server/README.rst

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
Echo Server
2+
###########
3+
4+
Overview
5+
********
6+
7+
The echo-server sample application for Zephyr implements a UDP/TCP server
8+
that complements the echo-client sample application: the echo-server listens
9+
for incoming IPv4 or IPv6 packets (sent by the echo client) and simply sends
10+
them back.
11+
12+
The source code for this sample application can be found at:
13+
:file:`samples/net/echo_server`.
14+
15+
Building and Running
16+
********************
17+
18+
There are multiple ways to use this application. One of the most common
19+
usage scenario is to run echo-server application inside QEMU. This is
20+
described in :ref:`networking with QEMU <networking_with_qemu>`.
21+
22+
There are configuration files for different boards and setups in the
23+
echo-server directory:
24+
25+
- :file:`prj_arduino_101_cc2520.conf`
26+
Use this for Arduino 101 with external IEEE 802.15.4 cc2520 board.
27+
28+
- :file:`prj_arduino_101.conf`
29+
Use this for Arduino 101 with external enc28j60 ethernet board.
30+
31+
- :file:`prj_bt.conf`
32+
Use this for Bluetooth IPSP connectivity.
33+
34+
- :file:`prj_cc2520.conf`
35+
Use this for devices that have support for IEEE 802.15.4 cc2520 chip.
36+
37+
- :file:`prj_frdm_k64f_cc2520.conf`
38+
Use this for FRDM-K64F board with external IEEE 802.15.4 cc2520 board.
39+
40+
- :file:`prj_frdm_k64f.conf`
41+
Use this for FRDM-K64F board with built-in ethernet.
42+
43+
- :file:`prj_frdm_k64f_mcr20a.conf`
44+
Use this for FRDM-K64F board with IEEE 802.15.4 mcr20a board.
45+
46+
- :file:`prj_qemu_802154.conf`
47+
Use this when simulating IEEE 802.15.4 network using two QEMU's that
48+
are connected together.
49+
50+
- :file:`prj_qemu_cortex_m3.conf`
51+
Use this for ARM QEMU.
52+
53+
- :file:`prj_qemu_x86.conf`
54+
Use this for x86 QEMU.
55+
56+
- :file:`prj_sam_e70_xplained.conf`
57+
Use this for Atmel SMART SAM E70 Xplained board with ethernet.
58+
59+
Build echo-server sample application like this:
60+
61+
.. code-block:: console
62+
63+
$ cd $ZEPHYR_BASE/samples/net/echo_server
64+
$ make pristine && make CONF_FILE=<your desired conf file> \
65+
BOARD=<board to use>
66+
67+
Make can select the default configuration file based on the BOARD you've
68+
specified automatically so you might not always need to mention it.
69+
70+
Running echo-client in Linux Host
71+
=================================
72+
73+
There is one useful testing scenario that can be used with Linux host.
74+
Here echo-server is run in QEMU and echo-client is run in Linux host.
75+
76+
Run 'loop_socat' and 'loop-slip-tap' scripts from net-tools in Linux host.
77+
78+
.. code-block:: console
79+
80+
$ ./loop_socat.sh
81+
82+
In another window:
83+
84+
.. code-block:: console
85+
86+
$ sudo ./loop-slip-tap.sh
87+
88+
Run echo-server application in QEMU:
89+
90+
.. code-block:: console
91+
92+
$ cd $ZEPHYR_BASE/samples/net/echo-server
93+
$ make pristine && make qemu
94+
95+
In third window:
96+
97+
.. code-block:: console
98+
99+
$ sudo ./echo-client -i tap0 2001:db8::1
100+
101+
Note that echo-server must be running in QEMU before you start the
102+
echo-client application in host terminal window.

0 commit comments

Comments
 (0)