Lines Matching +full:nrf21540 +full:- +full:gpio +full:- +full:if
1 .. zephyr:code-sample:: sockets-echo-client
3 :relevant-api: bsd_sockets tls_credentials
10 The echo-client sample application for Zephyr implements a UDP/TCP client
20 - :ref:`networking_with_host`
26 usage scenario is to run echo-client application inside QEMU. This is
30 echo-client directory:
32 - :file:`prj.conf`
35 - :file:`overlay-ot.conf`
38 - :file:`overlay-802154.conf`
44 - :file:`overlay-qemu_802154.conf`
48 - :file:`overlay-tls.conf`
51 Build echo-client sample application like this:
53 .. zephyr-app-commands::
54 :zephyr-app: samples/net/sockets/echo_client
62 .. zephyr-app-commands::
63 :zephyr-app: samples/net/sockets/echo_client
64 :host-os: unix
66 :conf: "prj.conf overlay-ot.conf"
72 .. zephyr-app-commands::
73 :zephyr-app: samples/net/sockets/echo_client
74 :host-os: unix
76 :gen-args: -DEXTRA_CONF_FILE=overlay-802154.conf
80 In a terminal window you can check if communication is happen:
82 .. code-block:: console
84 $ minicom -D /dev/ttyACM1
92 ``overlay-tls.conf`` overlay file enabled, for example, using these commands:
94 .. zephyr-app-commands::
95 :zephyr-app: samples/net/sockets/echo_client
97 :conf: "prj.conf overlay-tls.conf"
101 An alternative way is to specify ``-DEXTRA_CONF_FILE=overlay-tls.conf`` when
106 :zephyr:code-sample:`sockets-echo-server` enable establishing a secure connection
112 It is also possible to connect to the echo-server through a SOCKS5 proxy.
113 To enable it, use ``-DEXTRA_CONF_FILE=overlay-socks5.conf`` when running ``west
117 same host as the echo-server in Linux host.
120 can be used (-D option). Use the following command to run it on your host
125 .. code-block:: console
127 $ ssh -N -D 0.0.0.0:1080 localhost
131 .. code-block:: console
133 $ ssh -N -D [::]:1080 localhost
135 Run both commands if you are testing IPv4 and IPv6.
138 echo-server or uses a different port number, modify the following values
141 .. code-block:: c
147 Running echo-server in Linux Host
151 Here echo-client is run in QEMU and echo-server is run in Linux host.
157 .. code-block:: console
159 $ sudo ./echo-server -i tap0
161 Run echo-client application in QEMU:
163 .. zephyr-app-commands::
164 :zephyr-app: samples/net/sockets/echo_client
165 :host-os: unix
167 :conf: "prj.conf overlay-linux.conf"
171 Note that echo-server must be running in the Linux host terminal window
172 before you start the echo-client application in QEMU.
176 https://github.com/zephyrproject-rtos/net-tools documentation for information
179 See the :zephyr:code-sample:`sockets-echo-server` documentation for an alternate
180 way of running, with the echo-client on the Linux host and the echo-server
187 --------------
189 - Build ``echo-server`` for HOST PC (x86_64)
190 (https://github.com/zephyrproject-rtos/net-tools) SHA1:1c4fdba
192 .. code-block:: console
194 $ make echo-server
196 - Program nRF RCP from Nordic nrf SDK (v2.7.0):
198 .. code-block:: console
200 …(v2.7.0) ~/ncs$ west build -p always -b nrf21540dk/nrf52840 -S logging nrf/samples/openthread/copr…
203 - Build mimxrt1020_evk HOST (Zephyr):
205 .. zephyr-app-commands::
206 :zephyr-app: samples/net/sockets/echo_client
208 :conf: "prj.conf overlay-ot-rcp-host-uart.conf"
214 .. code-block:: console
216 $ west flash -r pyocd -i 0226000047784e4500439004d9170013e56100009796990
219 - Connect the nRF RCP with IMXRT1020 (HOST) via UART
221 .. code-block:: c
224 * imxrt1020_evk -> HOST
225 * nRF21540-DK -> RCP (nrf/samples/openthread/coprocessor)
227 * nRF21540 (P6) P0.08 RXD -> IMXRT1020-EVK (J17) D1 (GPIO B1 08) (TXD)
228 * nRF21540 (P6) P0.07 CTS -> IMXRT1020-EVK (J19) D8 (GPIO B1 07) (RTS)
229 * nRF21540 (P6) P0.06 TXD -> IMXRT1020-EVK (J17) D0 (GPIO B1 09) (RXD)
230 * nRF21540 (P6) P0.05 RTS -> IMXRT1020-EVK (J17) D7 (GPIO B1 06) (CTS)
234 - Install the OTBR (OpenThread Border Router) docker container on your HOST PC (x86_64)
235 …Follow steps from https://docs.nordicsemi.com/bundle/ncs-2.5.1/page/nrf/protocols/thread/tools.htm…
242 .. code-block:: console
244 …sudo docker network create --ipv6 --subnet fd11:db8:1::/64 -o com.docker.network.bridge.name=otbr0…
249 .. code-block:: console
256 .. code-block:: console
259 …-it --rm --privileged --name otbr --network otbr -p 8080:80 --sysctl "net.ipv6.conf.all.disable_ip…
262 …4. Add proper routing (``fd11:22::/64`` are the IPv6 addresses - On-Mesh - which allow accessing t…
264 .. code-block:: console
266 sudo ip -6 route add fd11:22::/64 dev otbr0 via fd11:db8:1::2
269 And the output for on-OT address:
271 .. code-block:: console
279 .. code-block:: console
281 sudo docker exec -it otbr /bin/bash
286 .. code-block:: console
288 ot-ctl router table
289 ot-ctl ipaddr
294 --------------
298 Go to ``Form`` and leave default values - e.g:
301 * On-Mesh Prefix: ``fd11:22::``
308 The "On-Mesh Prefix" shall match the one setup in ``otbr0`` routing.
311 Configure RCP (nRF21540-DK) + OT HOST (mimxrt1020)
312 --------------------------------------------------
314 .. code-block:: console
322 Commission -> Joiner PSKd* set to ``J01NME`` -> START COMMISSION
324 .. code-block:: console
332 ``ping -6 fd11:22:0:0:e8bf:266b:63ca:eff4``).
334 Start ``echo-server`` on HOST PC (x86-64)
335 -----------------------------------------
337 .. code-block:: console
339 ./echo-server -i otbr0