diff --git a/subsys/mgmt/mcumgr/Kconfig b/subsys/mgmt/mcumgr/Kconfig index 016d6a3cb14..bfcb28f808f 100644 --- a/subsys/mgmt/mcumgr/Kconfig +++ b/subsys/mgmt/mcumgr/Kconfig @@ -263,15 +263,23 @@ config MCUMGR_SMP_SHELL Enables handling of SMP commands received over shell. This allows the shell to be use for both mcumgr commands and shell commands. +if MCUMGR_SMP_SHELL + config MCUMGR_SMP_SHELL_MTU int "Shell SMP MTU" default 256 - depends on MCUMGR_SMP_SHELL help Maximum size of SMP frames sent and received over shell. This value must satisfy the following relation: MCUMGR_SMP_SHELL_MTU <= MCUMGR_BUF_SIZE + 2 +config MCUMGR_SMP_SHELL_RX_BUF_COUNT + int "Shell SMP RX buffer count" + default 2 + help + Number of buffers used for receiving SMP fragments over shell. + +endif # MCUMGR_SMP_SHELL config MCUMGR_SMP_UART bool "UART mcumgr SMP transport" diff --git a/subsys/shell/shell_uart.c b/subsys/shell/shell_uart.c index 72eae41169c..bad9af8abd5 100644 --- a/subsys/shell/shell_uart.c +++ b/subsys/shell/shell_uart.c @@ -20,8 +20,8 @@ LOG_MODULE_REGISTER(shell_uart); #endif #ifdef CONFIG_MCUMGR_SMP_SHELL -NET_BUF_POOL_DEFINE(smp_shell_rx_pool, 1, SMP_SHELL_RX_BUF_SIZE, - 0, NULL); +NET_BUF_POOL_DEFINE(smp_shell_rx_pool, CONFIG_MCUMGR_SMP_SHELL_RX_BUF_COUNT, + SMP_SHELL_RX_BUF_SIZE, 0, NULL); #endif /* CONFIG_MCUMGR_SMP_SHELL */ SHELL_UART_DEFINE(shell_transport_uart,