You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/zephyr_shell/1_installation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Before working through this Learning Path, complete [Build Zephyr projects with
24
24
25
25
The two examples in this Learning Path have additional requirements:
26
26
27
-
- MQTT shell example: Docker Desktop, Docker Engine, or another Docker-compatible runtime on your host computer. The board communicates with a Mosquitto broker running in a container.
27
+
- MQTT shell example: Docker Desktop, Docker Engine, or another Docker-compatible runtime on your host computer, if you're not installing Mosquitto on host. The board communicates with a Mosquitto broker running in a container.
28
28
- UART shell example: A USB cable to connect the development board to your host computer. The board exposes a shell prompt over the USB serial interface.
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/zephyr_shell/2_overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ In this Learning Path, you'll work with two transports:
35
35
36
36
### MQTT backend
37
37
38
-
Enable the MQTT backend with `CONFIG_SHELL_BACKEND_MQTT=y`. The MQTT backend routes shell commands and responses over MQTT topics. The board subscribes to `<device_id>/sh/rx` for inbound commands and publishes responses to `<device_id>/sh/tx`. The backend connects automatically once the board has an IPv4 address, and is IPv4-only.
38
+
Enable the MQTT backend with `CONFIG_SHELL_BACKEND_MQTT=y`. The MQTT backend routes shell commands and responses over MQTT topics. The board subscribes to `<device_id>/sh/rx` for inbound commands and publishes responses to `<device_id>/sh/tx`. The backend connects automatically when the board has an IPv4 address. The backend is IPv4-only.
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/zephyr_shell/3_mqtt_shell.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ To create an application project in Workbench for Zephyr:
48
48
49
49
### Configure the application
50
50
51
-
The `hello_world` sample provides a working `CMakeLists.txt`, `prj.conf`, and `src/main.c`. Leave `CMakeLists.txt` unchanged, and replace `prj.conf` and `src/main.c` with the following contents.
51
+
The `hello_world` sample provides a working `CMakeLists.txt`, `prj.conf`, and `src/main.c`. Leave `CMakeLists.txt` unchanged, and replace `prj.conf` and `src/main.c`.
52
52
53
53
Replace the contents of `prj.conf` with the following text:
54
54
@@ -80,7 +80,7 @@ CONFIG_NET_BUF_RX_COUNT=32
80
80
81
81
Replace `192.168.1.233` with the IP address of the host running Mosquitto, as seen from the board's Ethernet network.
82
82
83
-
The values under "Resource tuning" keep the shell footprint small on Cortex-M and allow the network stack and MQTT client to operate reliably.
83
+
The values under `# Resource tuning` keep the shell footprint small on Cortex-M and allow the network stack and MQTT client to operate reliably.
84
84
85
85
#### Use a static IPv4 address
86
86
@@ -90,7 +90,7 @@ DHCP is convenient, but it's not required. To use a static address, remove:
90
90
CONFIG_NET_DHCPV4=y
91
91
```
92
92
93
-
Then add values that match your network:
93
+
Then, add values that match your network:
94
94
95
95
```text
96
96
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.50"
@@ -117,7 +117,7 @@ int main(void)
117
117
118
118
In the **Workbench for Zephyr** panel, select your project and build configuration. Select **Build**, then select **Flash**.
119
119
120
-
The FRDM-MCXN947 uses NXP LinkServer as the debug runner. If LinkServer isn't installed, follow the Workbench for Zephyr prompt to install or configure it.
120
+
The FRDM-MCXN947 uses NXP LinkServer as the debug runner. If LinkServer isn't installed, follow the `Workbench for Zephyr` prompt to install or configure it.
121
121
122
122
## Create the Mosquitto Docker Compose project
123
123
@@ -372,7 +372,7 @@ Threads:
372
372
stack size 320, unused 256, usage 64 / 320 (20 %)
373
373
```
374
374
375
-
The `*` next to `shell_mqtt` marks the running thread, which is the shell that just executed the command. Note that responses larger than the MQTT buffer are split across multiple publishes. `mosquitto_sub -v` reassembles them sequentially under the `1a2b3c/sh/tx` topic prefix.
375
+
The `*` next to `shell_mqtt` marks the running thread, which is the shell that executed the command. Note that responses larger than the MQTT buffer are split across multiple publishes. `mosquitto_sub -v` reassembles them sequentially under the `1a2b3c/sh/tx` topic prefix.
376
376
377
377
Example output for `net iface` on the FRDM-MCXN947, truncated to the IPv4 section:
378
378
@@ -392,7 +392,6 @@ IPv4 gateway : 192.168.1.1
392
392
DHCPv4 state : bound
393
393
DHCPv4 server : 192.168.1.1
394
394
```
395
-
396
395
Example output for `net ping 192.168.1.1` (board pinging its gateway):
397
396
398
397
```output
@@ -402,7 +401,7 @@ Example output for `net ping 192.168.1.1` (board pinging its gateway):
402
401
28 bytes from 192.168.1.1 to 192.168.1.41: icmp_seq=3 ttl=64 time=0 ms
403
402
```
404
403
405
-
Replace `192.168.1.1` with the gateway address shown by `net iface`. The board sends three ICMP echo requests by default.
404
+
To run `net ping`, replace `192.168.1.1` with the gateway address shown by `net iface`. The board sends three ICMP echo requests by default.
406
405
407
406
{{% notice Note %}}
408
407
The MQTT shell backend executes a command after it receives a newline character. The `printf 'kernel version\n' | ... mosquitto_pub -s` form sends the command with the required newline.
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/zephyr_shell/4_uart_shell.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,8 @@ kernel uptime
157
157
kernel thread list
158
158
```
159
159
160
+
The output is similar to:
161
+
160
162

161
163
162
164
The `*` next to `shell_uart` in the thread list marks the currently running thread, which is the shell that executed the command.
Copy file name to clipboardExpand all lines: content/learning-paths/embedded-and-microcontrollers/zephyr_shell/_index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ learning_objectives:
15
15
prerequisites:
16
16
- Basic familiarity with embedded C programming
17
17
- Visual Studio Code with the Workbench for Zephyr extension installed and configured
18
-
- Docker Desktop, Docker Engine, or another Docker-compatible runtime installed on your host computer (for the MQTT shell example only)
18
+
- Docker Desktop, Docker Engine, or another Docker-compatible runtime installed on your host computer (for the MQTT shell example, if you're not installing Mosquitto on host)
19
19
- A Zephyr-supported Arm Cortex-M board (for example, NXP FRDM-MCXN947)
0 commit comments