BLE FOTA + OpenThread Integration Issues: Advertising Error, IPC Timeout, and SMP Overflow

Hi Nordic Team,

We are working on an OpenThread+BLE with BLE DFU based application in NRF 5340. With that BLE and OpenThread Application are running successfully on the application core.

But we are facing issues in compilation & run time error whenever adding BLE FOTA configurations using multiprotocol_rpmsg.conf in Net Core.

Find the error log given below

Run Time error:

1. We have encountered the following error during BLE SDK 2.6.1:

[00:00:00.534,973] <err> bt_gatt: Unable to register handle 0x001b
[00:00:00.535,400] <wrn> bt_hci_core: opcode 0x2006 status 0x01
[00:00:00.535,400] <err> BleProvisioner: Advertising failed to start (err -5)

We have verified that BLE and OpenThread coexist correctly, but advertising consistently fails with error -5. Could this be related to GATT registration limits or HCI command conflicts?

Additionally, we are facing the following issues:

2. IPC Timeout in BLE FOTA Example:

  • Using the l9/l9_e5_sol in ncs-inter build from SDK v3.1.0.

  • When integrating OpenThread on the application core, we encounter IPC timeout errors during initialization.

  • Is there a recommended sequence or configuration to enable OpenThread alongside BLE FOTA to avoid IPC timeouts?

Compilation Error

1. Overflow with smp_bt_config() on Netcore BLE Setup in SDK NRF3.1.0 :

  • In our main project, we configure BLE on the network core using multiprotocol_rpmsg.conf and hci_rpmsg.conf.

  • When integrating smp_bt_config(), we encounter a 2KB overflow.

  • Could you provide guidance on optimizing memory layout or reducing the BLE stack footprint in this setup?

We are in a critical situation, as this is blocking our production. We kindly request your guidance and solutions for the issues mentioned above.

We would appreciate any guidance or recommended configurations for these scenarios. We are happy to share additional logs, configuration files, or build details if needed.

Thank you for your support.

  • Hi,

    [00:00:00.534,973] <err> bt_gatt: Unable to register handle 0x001b

    Do you call smp_bt_register() manually in your code? If so, please remove it. See this post

    [00:00:00.535,400] <wrn> bt_hci_core: opcode 0x2006 status 0x01
    [00:00:00.535,400] <err> BleProvisioner: Advertising failed to start (err -5)

    The error Advertising failed to start (err -5) and the HCI status opcode 0x2006 status 0x01 indicate a failure in the HCI command to start advertising. Status 0x01 is a generic "Unknown HCI Command" or "Unknown Command Parameter" error from the controller. This can occur if the network core (running the multiprotocol controller) is not configured to support the required number of advertising sets or extended advertising, or if the configuration between the application and the network core is mismatched. Could you provide the .config file under build/multiprotocol_rpmsg/zephyr?

    • When integrating OpenThread on the application core, we encounter IPC timeout errors during initialization.

    • Is there a recommended sequence or configuration to enable OpenThread alongside BLE FOTA to avoid IPC timeouts?

    Please try to apply the Net Core configuration from the CLI sample: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/openthread/cli/sysbuild/ipc_radio/prj.conf

    Could you provide guidance on optimizing memory layout or reducing the BLE stack footprint in this setup?

    See Memory footprint optimization or consider DFU with added external flash (see this Devacademy course https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/topic/exercise-3-dfu-with-external-flash/). 

    Regards,
    Amanda H.

  • Could you provide the .config file under build/multiprotocol_rpmsg/zephyr?

    Here is the .config file.

    Note: Unable to upload the .config file. Please find the .config content attached below in .txt format.

    2630.config.txt

  • (updated)

    Try to add the following configs to multiprotocol_rpmsg.conf and check the .config file under build/multiprotocol_rpmsg/zephyr if they take effect. 

    CONFIG_BT_MAX_CONN=10
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_OBSERVER=y
    CONFIG_BT_BROADCASTER=y
    CONFIG_BT_EXT_ADV=y

  • We have added this configuration to multiprotocol_rpmsg.conf. However, we are encountering a reset issue.

    <inf> ieee802154_nrf5: nRF5 802154 radio initialized
    <inf> fs_nvs: 2 Sectors of 4096 bytes
    <inf> fs_nvs: alloc wra: 0, d38
    <inf> fs_nvs: data wra: 0, 310
    <inf> net_l2_openthread: State changed! Flags: 0x00038210 Current role: disabled
    *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
    <inf> main: Boot: Initializing...
    ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:331
    command opcode 0x0c03 timeout with err -11
    <err> os: r0/a1: 0x00000003 r1/a2: 0x00000000 r2/a3: 0x00000002
    <err> os: r3/a4: 0x20004e28 r12/ip: 0x00000010 r14/lr: 0x00032051
    <err> os: xpsr: 0x49100000
    <err> os: s[ 0]: 0x20003f00 s[ 1]: 0x00000296 s[ 2]: 0x20029ac0 s[ 3]: 0x00066ed9
    <err> os: s[ 4]: 0x00000000 s[ 5]: 0x00000000 s[ 6]: 0x0008a2c1 s[ 7]: 0x20023104
    <err> os: s[ 8]: 0x20029ac0 s[ 9]: 0x0006612d s[10]: 0x0008a2c1 s[11]: 0x20023104
    <err> os: s[12]: 0xfffffff5 s[13]: 0x00032051 s[14]: 0x0008a2c1 s[15]: 0x00000c03
    <err> os: fpscr: 0xfffffff5
    <err> os: Faulting instruction address (r15/pc): 0x0003205c
    <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    <err> os: Current thread: 0x20007ba0 (main)
    <err> fatal_error: Resetting system

    We kindly request your guidance and suggestions to resolve the problem

  • With that BLE and OpenThread Application are running successfully on the application core.

    Could you provide the .config file under build/multiprotocol_rpmsg/zephyr from the project before adding BLE FOTA configurations? 

Related