Skip to content

Commit 8ab99e7

Browse files
committed
client: add troubleshoot file transfer
1 parent 04f1296 commit 8ab99e7

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ In order to get the Device Troubleshoot add-on working, the following configurat
4747

4848
```
4949
CONFIG_HEAP_MEM_POOL_SIZE=1500
50+
CONFIG_ZVFS_OPEN_MAX=16
5051
CONFIG_SHELL_BACKEND_SERIAL=n
5152
CONFIG_SHELL_AUTOSTART=n
5253
CONFIG_SHELL_STACK_SIZE=3072
@@ -206,6 +207,10 @@ Congratulation! You have updated the device. Mender server displays the success
206207
In case of failure to connect and authenticate to the server the current example application performs a rollback to the previous release.
207208
You can customize the behavior of the example application to add your own checks and perform the rollback in case the tests fail.
208209

210+
### Using Device Troubleshoot add-on
211+
212+
The Device Troubleshoot add-on permits to display the Zephyr Shell on the Mender interface. Autocompletion and colors are available.
213+
209214
### Using an other zephyr evaluation board
210215

211216
The zephyr integration into the mender-mcu-client is generic and it is not limited to STM32 MCUs.

components/mender-mcu-client

Submodule mender-mcu-client updated 41 files

prj.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ CONFIG_MENDER_SERVER_TENANT_TOKEN="<insert your own token here>"
2121
CONFIG_MENDER_CLIENT_ADD_ON_INVENTORY=y
2222
CONFIG_MENDER_CLIENT_ADD_ON_CONFIGURE=y
2323
#CONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT=y
24+
#CONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL=y
2425
CONFIG_MENDER_PLATFORM_STORAGE_TYPE_WEAK=y
2526
CONFIG_MENDER_PLATFORM_TLS_TYPE_CRYPTOAUTHLIB=y
2627

2728
# Required to get Device Troubleshoot add-on working
2829
#CONFIG_HEAP_MEM_POOL_SIZE=1500
30+
#CONFIG_ZVFS_OPEN_MAX=16
2931
#CONFIG_SHELL_BACKEND_SERIAL=n
3032
#CONFIG_SHELL_AUTOSTART=n
3133
#CONFIG_SHELL_STACK_SIZE=3072

src/main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,12 @@ main(void) {
345345
LOG_INF("Mender inventory add-on registered");
346346
#endif /* CONFIG_MENDER_CLIENT_ADD_ON_INVENTORY */
347347
#ifdef CONFIG_MENDER_CLIENT_ADD_ON_TROUBLESHOOT
348-
mender_troubleshoot_config_t mender_troubleshoot_config = { .healthcheck_interval = 0 };
349-
mender_troubleshoot_callbacks_t mender_troubleshoot_callbacks
350-
= { .shell_begin = shell_begin_cb, .shell_resize = shell_resize_cb, .shell_write = shell_write_cb, .shell_end = shell_end_cb };
348+
mender_troubleshoot_config_t mender_troubleshoot_config = { .healthcheck_interval = 0 };
349+
mender_troubleshoot_callbacks_t mender_troubleshoot_callbacks = {
350+
#ifdef CONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL
351+
.shell = { .open = mender_shell_open, .resize = mender_shell_resize, .write = mender_shell_write, .close = mender_shell_close }
352+
#endif /* CONFIG_MENDER_CLIENT_TROUBLESHOOT_SHELL */
353+
};
351354
assert(MENDER_OK
352355
== mender_client_register_addon(
353356
(mender_addon_instance_t *)&mender_troubleshoot_addon_instance, (void *)&mender_troubleshoot_config, (void *)&mender_troubleshoot_callbacks));

0 commit comments

Comments
 (0)