Skip to content

Commit

Permalink
treewide: align projects with Kconfig changes in SMP Bluetooth
Browse files Browse the repository at this point in the history
Aligned the usage of Kconfig options from the MCUmgr SMP Bluetooth
transport module.

Ref: NCSDK-29061

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
  • Loading branch information
kapi-no authored and rlubos committed Oct 8, 2024
1 parent f5fa2d0 commit 6d04523
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion applications/nrf5340_audio/prj_fota.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y

# DFU
CONFIG_AUDIO_BT_MGMT_DFU=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_BUF_ACL_TX_SIZE=251

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CONFIG_LED_PWM=y

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_IMG_MANAGER=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ CONFIG_LED_PWM=y

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_BT_L2CAP_TX_MTU=260
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=8

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_IMG_MANAGER=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_MCUMGR=y
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_MCUMGR_GRP_IMG=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=8

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_IMG_MANAGER=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_IMG_MANAGER=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
# Enable MCUmgr Bluetooth transport
CONFIG_DESKTOP_DFU_MCUMGR_ENABLE=y
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y

# Allow for large Bluetooth data packets.
CONFIG_BT_L2CAP_TX_MTU=498
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CONFIG_UART_CONSOLE=n
# Enable MCUmgr Bluetooth transport
CONFIG_DESKTOP_DFU_MCUMGR_ENABLE=y
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y

# Allow for large Bluetooth data packets.
CONFIG_BT_L2CAP_TX_MTU=498
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ CONFIG_LED_PWM=y

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_IMG_MANAGER=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ CONFIG_LED_PWM=y

# Enable MCUmgr Bluetooth transport and increase Bluetooth buffers to speed up DFU image transfer.
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_GRP_IMG_VERSION_CMP_USE_BUILD_NUMBER=y

CONFIG_IMG_MANAGER=y
Expand Down
2 changes: 1 addition & 1 deletion samples/bluetooth/mesh/common/smp_bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int smp_service_adv_init(void)

int smp_dfu_init(void)
{
if (IS_ENABLED(CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN) &&
if (IS_ENABLED(CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN) &&
IS_ENABLED(CONFIG_BT_MESH_LE_PAIR_RESP)) {
int err;

Expand Down
2 changes: 1 addition & 1 deletion samples/bluetooth/mesh/dfu/distributor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ target_sources(app PRIVATE ${app_sources}
)

# Enable authentication with passkey
if (CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN AND CONFIG_BT_MESH_LE_PAIR_RESP)
if (CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN AND CONFIG_BT_MESH_LE_PAIR_RESP)
target_sources(app PRIVATE
${ZEPHYR_NRF_MODULE_DIR}/samples/bluetooth/mesh/common/smp_bt_auth.c)
endif()
6 changes: 3 additions & 3 deletions samples/bluetooth/mesh/dfu/distributor/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Building and running
.. include:: /includes/build_and_run.txt

.. note::
To prevent an unauthenticated access to the device over SMP, it is strongly recommended to enable the :kconfig:option:`CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN` option.
To prevent an unauthenticated access to the device over SMP, it is strongly recommended to enable the :kconfig:option:`CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN` option.
This will enforce a remote device to initiate a pairing request before accessing SMP characteristics.
See `SMP over Bluetooth authentication`_ for more information.

Expand Down Expand Up @@ -221,12 +221,12 @@ SMP over Bluetooth authentication
=================================

By default, the SMP characteristics don't require authentication when using SMP over Bluetooth to access the :ref:`management subsystem <zephyr:mcu_mgr>`.
To prevent an unauthenticated access to the device over SMP, it is strongly recommended to enable the :kconfig:option:`CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN` option.
To prevent an unauthenticated access to the device over SMP, it is strongly recommended to enable the :kconfig:option:`CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN` option.
This will enforce a remote device to initiate a pairing request before accessing SMP characteristics.
See `Zephyr Bluetooth LE Security`_ for more details about securing the Bluetooth LE connection.

The sample supports the :ref:`bt_mesh_le_pair_resp_readme` model that allows sending a passkey over a mesh network when the Distributor has no means of displaying the passkey.
When the model and the :kconfig:option:`CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN` option are enabled while a remote device tries to read the SMP characteristics, the pairing request will be initiated and the sample will require the remote device to enter the passkey generated by the model.
When the model and the :kconfig:option:`CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN` option are enabled while a remote device tries to read the SMP characteristics, the pairing request will be initiated and the sample will require the remote device to enter the passkey generated by the model.

To enable the LE pairing authentication with the LE Pairing Responder model support, set :makevar:`EXTRA_CONF_FILE` to :file:`overlay-smp-bt-auth.conf` file when building the sample.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=y
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN=y
CONFIG_BT_SMP=y
CONFIG_BT_FIXED_PASSKEY=y
CONFIG_BT_MESH_LE_PAIR_RESP=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

CONFIG_MCUMGR=y
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

CONFIG_MCUMGR_GRP_IMG=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

CONFIG_MCUMGR=y
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

CONFIG_MCUMGR_GRP_IMG=y
Expand Down
5 changes: 3 additions & 2 deletions samples/common/mcumgr_bt_ota_dfu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ config NCS_SAMPLE_MCUMGR_BT_OTA_DFU_MCUBOOT_DIRECT_XIP_SUPPORT
default y if MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT
imply MCUMGR_GRP_IMG_REJECT_DIRECT_XIP_MISMATCHED_SLOT

config MCUMGR_TRANSPORT_BT_AUTHEN
default n
choice MCUMGR_TRANSPORT_BT_PERM
default MCUMGR_TRANSPORT_BT_PERM_RW
endchoice

config IMG_ERASE_PROGRESSIVELY
default y
Expand Down
2 changes: 1 addition & 1 deletion samples/nrf5340/extxip_smp_svr/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

# Enable the Bluetooth mcumgr transport (unauthenticated).
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

# Enable the Shell mcumgr transport.
Expand Down
2 changes: 1 addition & 1 deletion samples/suit/recovery/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ CONFIG_BT_BUF_ACL_TX_SIZE=502

# Enable the Bluetooth mcumgr transport (unauthenticated).
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

# Disable SMP over UART
Expand Down
2 changes: 1 addition & 1 deletion samples/suit/smp_transfer/sysbuild/smp_transfer_bt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CONFIG_BT_BUF_ACL_TX_SIZE=502

# Enable the Bluetooth mcumgr transport (unauthenticated).
CONFIG_MCUMGR_TRANSPORT_BT=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW=y
CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y

# Enable logs over UART
Expand Down

0 comments on commit 6d04523

Please sign in to comment.