Failed to send proxy message (err -22)

Hello.

I am experiencing an issue where Mesh communication fails after connecting to the SMP Service in the Bluetooth Mesh DFU Distributor sample.

Environment:

Steps to Reproduce:

  1. Flash the DFU Distributor sample to the nRF54L15DK.
  2. Provision the DK using the nRF Mesh mobile app.
  3. Initiate a connection to the SMP Service using the nRF Connect mobile app.
  4. When prompted for pairing, enter the passkey and complete the connection.
  5. Switch back to the nRF Mesh app and attempt any Mesh communication.
  6. The error "Failed to send proxy message (err -22)" occurs.

Serial Terminal Log:

*** Booting MCUboot v2.3.0-dev-252d7bbd7909 ***
*** Using nRF Connect SDK v3.2.3-6f8485d2890d ***
*** Using Zephyr OS v4.2.99-c4c75f71e709 ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x1
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: primary slot
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0xe000
I: Image version: v1.0.0
I: Jumping to the first image slot
*** Booting Mesh DFU Distributor v3.2.3-59f00e1776b2 ***
*** Using nRF Connect SDK v3.2.3-6f8485d2890d ***
*** Using Zephyr OS v4.2.99-c4c75f71e709 ***
Initializing...
Current image version: 1.0.0+0
[00:00:00.023,349] <inf> fs_zms: 2 Sectors of 4096 bytes
[00:00:00.023,358] <inf> fs_zms: alloc wra: 0, fc0
[00:00:00.023,365] <inf> fs_zms: data wra: 0, 0
[00:00:00.025,621] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision: 
                                            9b 6b 70 25 37 79 e5 f2  f6 cb 16 a5 8b b9 9a 13 |.kp%7y.. ........
                                            a8 05 75 dc                                      |..u.             
[00:00:00.026,730] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.026,748] <inf> bt_hci_core: HW Variant: nRF54Lx (0x0005)
[00:00:00.026,761] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 155.28779 Build 3849926437
[00:00:00.026,878] <inf> bt_hci_core: No ID address. App must call settings_load()
Bluetooth initialized
[00:00:00.028,646] <inf> bt_hci_core: HCI transport: SDC
[00:00:00.028,694] <inf> bt_hci_core: Identity: EB:DA:FA:1C:B3:05 (random)
[00:00:00.028,711] <inf> bt_hci_core: HCI: version 6.2 (0x10) revision 0x306a, manufacturer 0x0059
[00:00:00.028,726] <inf> bt_hci_core: LMP: version 6.2 (0x10) subver 0x306a
[00:00:00.038,966] <inf> bt_mesh_provisionee: Device UUID: 8ef20279-6f06-4103-b10d-fd8690f9befc
Mesh initialized
Created a new identity for SMP: 1
[00:00:00.042,016] <dbg> bt_mesh_dfu_srv: bt_mesh_dfu_srv_applied: Wrong state
[00:00:29.776,807] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
[00:00:32.089,368] <inf> bt_mesh_main: Primary Element: 0x0003
[00:00:32.089,384] <dbg> bt_mesh_main: bt_mesh_provision: net_idx 0x0000 flags 0x00 iv_index 0x0000
[00:00:32.178,808] <dbg> bt_mesh_health_srv: attention_off: 
[00:00:33.181,896] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
[00:00:34.143,070] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
[00:00:34.143,080] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
[00:00:34.443,570] <dbg> bt_mesh_cfg_srv: default_ttl_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 0: 
Connected to SMP service: err 0 id 1
[00:00:51.512,538] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
Please enter passkey (670831) on 5A:47:4F:F6:2A:14 (random)
Pairing completed: 38:53:9C:AB:F0:B7 (public), bonded: 1
[00:02:04.790,809] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
[00:02:04.790,823] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
[00:02:04.836,494] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:04.897,007] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:04.957,333] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:05.017,691] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:05.518,072] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:05.578,387] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:05.638,764] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:05.699,091] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:06.199,627] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:06.260,103] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:06.320,429] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:06.380,826] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:06.881,179] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:06.941,526] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:07.001,847] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:07.062,165] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:07.562,265] <err> bt_mesh_transport: Ran out of retransmit without progress attempts
[00:02:09.381,174] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
[00:02:09.381,189] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
[00:02:09.407,837] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:09.468,153] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:09.528,468] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:09.588,785] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.089,142] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.149,579] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.210,023] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.270,423] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.770,778] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.831,094] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.891,414] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:10.951,733] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:11.452,086] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:11.512,408] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:11.572,726] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:11.633,265] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:12.133,367] <err> bt_mesh_transport: Ran out of retransmit without progress attempts
[00:02:18.441,334] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
[00:02:18.441,349] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
[00:02:18.461,993] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:18.522,326] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:18.582,646] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:18.643,001] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.143,383] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.203,704] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.264,024] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.324,400] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.824,764] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.885,076] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:19.945,398] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:20.005,715] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:20.506,104] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:20.566,606] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:20.626,934] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:20.687,252] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:21.187,319] <err> bt_mesh_transport: Ran out of retransmit without progress attempts
[00:02:36.501,977] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
[00:02:36.501,992] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
[00:02:36.543,777] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:36.604,186] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:36.664,499] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:36.724,823] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:37.225,206] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:37.285,559] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:37.345,878] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:37.406,360] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:37.906,855] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:37.967,293] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:38.027,770] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:38.088,282] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:38.588,630] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:38.648,950] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:38.709,270] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:38.769,587] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:39.269,687] <err> bt_mesh_transport: Ran out of retransmit without progress attempts

Observations: After step 6, Mesh communication could be resumed by performing any of the following:

  • Rebooting the DK.
  • Restarting the nRF Mesh app.
  • Disconnecting the Mesh Proxy Service in the nRF Mesh app and then reconnecting.

Serial Terminal Log:

[00:02:38.769,587] <err> bt_mesh_proxy: Failed to send proxy message (err -22)
[00:02:39.269,687] <err> bt_mesh_transport: Ran out of retransmit without progress attempts
[00:06:03.365,912] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
[00:06:16.687,531] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
[00:06:16.687,546] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
[00:06:17.017,734] <dbg> bt_mesh_cfg_srv: default_ttl_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 0:

The issue does NOT occur in the following cases:

  • If I connect to the Mesh Proxy Service advertisement instead of the SMP Service in step 3.
  • If authentication is disabled (i.e., when `overlay-smp-bt-auth.conf` is not included in the build).

Since this issue is reproducible using the standard sample program and official apps available on the App Store, it should be easy to verify on your end.
Thank you for your time and assistance.

Best regards,

a.da

  • Hi a.da,

    We reproduced your issue.The device is advertising two advertising set, and bonding to the SMP one causes issue when the device works as a proxy.
    We are looking into some details and I will send another follow-up soon.

    Best regards,

    Hieu

  • Hi a.da,

    My apology for the long waiting time.

    We confirmed the issue is that the two advertising sets are started by two different Bluetooth Identity on the same device. However, the phone doesn't know that, and when it connects to the Proxy identity, it tries to use bonding information made with the SMP identity and that fails.

    To my understanding, you are evaluating the samples right now. Could you go forward in your project with one of these two options?

    Best regards,

    Hieu

  • Hi Hieu,

    Thank you for your analysis.

    Since this issue occurs out-of-the-box within the official sample programs provided by Nordic, I believe it is inappropriate to expect users to implement workarounds at the application level.
    To resolve this issue fundamentally, the fix should be implemented within the NCS (SDK) itself.

    Could you please provide a proposal or a patch for an official fix on the NCS side?
    I would like to know how Nordic intends to address this behavior as a framework-level improvement.

    Best regards,

    a.da

  • Hi a.da,

    Thank you for your patience.
    I agree that having the application work around a BLE Host issue is not correct. However, a fix isn't available yet and the best I could do as a support engineer is to suggest workarounds.

    I have made a Pull Request where the second advertising set is not created: samples: bluetooth: mesh: Add new Kconfig to enable/disable SMP adv by hieuv · Pull Request #28483 · nrfconnect/sdk-nrf.

    I hope this is OK for you. If it isn't and you require the BLE Host fix, then I unfortunately cannot comment on when it will be available. Our sales team could give better assistance from that angle.

    Best regards,

    Hieu

  • Hi Hieu,

    Thank you for creating the Pull Request and for your effort in addressing this issue.
    I have two follow-up questions regarding the implementation.

    1. Regarding common/smp_bt.c:
      I understand the changes in behavior as follows:
      Before: Two separate advertising sets were broadcast ( one for Provisioning/Proxy Service and one for SMP Service ).
      After: Only the Provisioning/Proxy Service advertising set is broadcast ( since CONFIG_NCS_SAMPLE_MESH_COMMON_SMP_BT_DEDICATED_ADV_SET is disabled in the Distributor sample ).
      I assume that broadcasting two separate sets was originally an intentional design to support Mesh DFU.
      While disabling the dedicated set avoids the current issue, is there any functional downside to reducing the number of advertising sets?
    2. Regarding dfu/distributor/Kconfig:
      The PR references the newly created common/Kconfig using a relative path: rsource "../../common/Kconfig".
      This works correctly when building the sample directly within the NCS directory ( ncs/v3.2.3/nrf/samples/...  ).
      However, when I copy the sample to an external directory (e.g., using the "Create a new application from sample" feature in VS Code), it results in a build error because the relative path becomes invalid.
      Is this behavior intentional?
      I would like to know if there is a recommended way to handle this for projects managed outside of the SDK tree.

    I apologize if these are basic questions, but I would appreciate your insight.

    Best regards,

    a.da

Related