File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
applications/nrf5340_audio/src/bluetooth/bt_management Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1010#include <zephyr/bluetooth/bluetooth.h>
1111#include <zephyr/bluetooth/conn.h>
1212#include <zephyr/bluetooth/hci.h>
13+ #include <zephyr/mgmt/mcumgr/transport/smp_bt.h>
1314#include <zephyr/settings/settings.h>
1415#include <zephyr/sys/byteorder.h>
1516#include <nrfx.h>
@@ -393,6 +394,15 @@ int bt_mgmt_init(void)
393394
394395#endif /* CONFIG_AUDIO_BT_MGMT_DFU */
395396
397+ #ifdef CONFIG_MCUMGR_TRANSPORT_BT_DYNAMIC_SVC_REGISTRATION
398+ /* Unregister SMP (Simple Management Protocol) service if DFU is not enabled */
399+ ret = smp_bt_unregister ();
400+ if (ret ) {
401+ LOG_ERR ("Failed to unregister SMP service: %d" , ret );
402+ return ret ;
403+ }
404+ #endif
405+
396406 ret = bt_mgmt_ctlr_cfg_init (IS_ENABLED (CONFIG_WDT_CTLR ));
397407 if (ret ) {
398408 return ret ;
You can’t perform that action at this time.
0 commit comments