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

Parents
  • Hi a.da,

    I cannot reproduce your issue. I am using an Android device though, so that might affect things.

    I would like to check still. Are there any other nodes in your mesh network?

    During step 5,

    Switch back to the nRF Mesh app and attempt any Mesh communication.

    Do you mean Mesh operations on the other nodes, and not the Distributor node?

    Hieu

  • Hi Hieu, thanks for your reply.

    I cannot reproduce your issue. I am using an Android device though, so that might affect things.

    I am using iOS (iPhone Xs Max) and iPadOS (iPad mini 6th), and the issue occurs on both devices.
    The version of the nRF Mesh app I am using is 4.7.0.

    Regarding Android, I tested with an older device (Android 8.0.0) and found inconsistent results depending on the app:
    (I was not aware that there were two different mesh apps for Android as I primarily develop on iOS.)

    • nRF Mesh app (v3.4.0): The issue did not occur.
    • nRF Mesh (New) app (v0.9.2): The issue did occur, same as on iOS.
    Are there any other nodes in your mesh network?

    There are no other nodes in the mesh network.

    Test with two nodes:
    I also tested with two nodes in the network and observed the following:

    • If I perform pairing/authentication with the Proxy Node's SMP Service, the issue occurs.
    • If I perform pairing/authentication with the Non-Proxy Node's SMP Service, the issue does not occur, and communication remains successful.
    Do you mean Mesh operations on the other nodes, and not the Distributor node?

    In step 5, I am performing operations directly on the Distributor node via the nRF Mesh app. Specifically:

    • Swiping down on the Node Details screen to read the Composition Data.
    • Sending messages to a Model, such as reading the Fault Status of the Health Server.

    Hypothesis:
    As a guess, could this be related to address resolution?
    I suspect that after pairing authentication, the smartphone's address might be resolved and switched from a Private to a Public address, which might be affecting the Proxy connection state.

    Best regards,

    a.da

  • Hi a.da,

    This is a little strange. The reason I asked if you reproduced the issue with one or more than one node is because if you are trying to configure the same node as the proxy, then the node shouldn't actually try to send any proxy message. In that case, the error message you see wouldn't match.

    I tried with the nRF Mesh (New) app but also couldn't reproduce the issue. I see something strange from the log though:

    Connected to SMP service: err 0 id 1
    Please enter passkey (508619) on 63:B2:5E:02:8C:22 (random)
    Pairing completed: D0:04:B0:04:3D:3C (public), bonded: 1
    [00:05:30.640,720] <wrn> bt_att: Unhandled ATT code 0x1d
    Disconnected from SMP service: reason 19 id 1
    SMP service advertising restarted
    [00:05:59.711,592] <wrn> bt_att: Unhandled ATT code 0x1d
    [00:06:01.107,760] <dbg> bt_mesh_cfg_srv: default_ttl_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 0: 
    [00:06:02.097,796] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 1: 00
    [00:06:02.097,805] <dbg> bt_mesh_cfg_srv: dev_comp_data_get: Preparing Composition data page 0
    [00:06:18.343,725] <dbg> bt_mesh_cfg_srv: app_key_add: AppIdx 0x0000 NetIdx 0x0000
    Connected to SMP service: err 0 id 1
    [00:07:13.288,650] <wrn> bt_att: Unhandled ATT code 0x1d
    [00:07:41.422,010] <wrn> bt_att: Unhandled ATT code 0x1d
    [00:08:32.419,589] <dbg> bt_mesh_cfg_srv: get_model: ID 0x0002 addr 0x0003
    [00:08:32.419,604] <dbg> bt_mesh_cfg_srv: mod_bind: model 0x20001738 key_idx 0x000
    [00:08:32.419,612] <dbg> bt_mesh_cfg_srv: mod_bind: model 0x20001738 id 0x0002 i 0 key 0xffff
    [00:08:32.419,629] <dbg> bt_mesh_cfg_srv: mod_app_bind: status 0x00
    [00:08:40.564,791] <dbg> bt_mesh_cfg_srv: mod_pub_get: elem_addr 0x0003
    [00:08:40.564,806] <dbg> bt_mesh_cfg_srv: get_model: ID 0x0002 addr 0x0003

    The warning of unhandled ATT code 0x1d is strange. ATT code 0x1D is an BLE Indication operation and  I don't expect an indication to happen with this setup.

    I will try to ask for get help from someone with an iOS device next.

    Best regards,

    Hieu

  • Hi Hieu,

    I appreciate your ongoing cooperation.

    I re-ran the tests on both iOS and Android, but I could not find the "ATT code 0x1d" log that you pointed out. However, there is something in your log that caught my attention.

    your log:

    Pairing completed: D0:04:B0:04:3D:3C (public), bonded: 1
    [00:05:30.640,720] <wrn> bt_att: Unhandled ATT code 0x1d
    Disconnected from SMP service: reason 19 id 1
    SMP service advertising restarted
    [00:05:59.711,592] <wrn> bt_att: Unhandled ATT code 0x1d
    [00:06:01.107,760] <dbg> bt_mesh_cfg_srv: default_ttl_get: net_idx 0x0000 app_idx 0xfffe src 0x0001 len 0: 

    Did you manually disconnect the SMP Service before operating the nRF Mesh app?
    Or was it an unintentional or automatic disconnection?
    In my environment, the SMP Service remains connected when the error occurs.
    I believe this state is evident from the initial logs I provided.

    I look forward to hearing the results from your team’s investigation with an iOS device.

    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

Reply Children
  • 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

Related