The stock LPN client for Mesh SDK v4.0.0 throws NRF_MESH_EVT_SAR_FAILED when replying to a publication set message via a friend node.
All code, reproduction data and log output is here: https://github.com/siriobalmelli/nrf_mesh_4.0.0_lpn_SAR
I also tried to implement the suggested answer from this thread:
... this did not work, see this commit:
Please see https://github.com/siriobalmelli/nrf_mesh_4.0.0_lpn_SAR/blob/master/README.md#reproduce-mesh-lpn-friendship-sar-bug step 2.
I am making sure that GATT is not connected:
1. On BubblyNet…
We have tried to reproduce the issue on our side, and haven't had any luck. One of our developer checked-out the your repo, modified the example name RTT output and tested the LPN example. He did…
One of our developer was able to reproduce this issue but in a different way. He noticed this issue after provisioning the LPN using Android app. The app was not able to fetch the Device Composition…
Have you made any modification to the LPN example?
I'm not sure if this will make any difference but could you also try using our nRF Mesh app instead of the BubblyNet app? Any difference?
Thanks for looking at this.
Confirmed I'm getting NRF_MESH_EVT_SAR_FAILED with the nRF Mesh App also
It seems like your mobile is still connected to the LPN via GATT even after LPN has established the friendship (Note that, after the provisioning and configuration, the mobile remains connected to the node, unless you disconnect it explicitly). There is a known issue with LPN that when LPN is in friendship with Friend Node, a connected GATT device receives packets encrypted with the wrong encryption key. Therefore, the response to the Model Publication Set is not understood by the mobile app, and hence it fails.
Try to configure the LPN node via Friend node. Disconnect the mobile app from LPN, and explicitly connect to Friend proxy node. Then try configuring the LPN node via Friend node. This should work.
1. On BubblyNet App by clicking "disable proxy" after provisioning
2. On nRF Mesh App by manually changing to the light server as a proxy so messages *must* go through LPN
We have tried to reproduce the issue on our side, and haven't had any luck. One of our developer checked-out the your repo, modified the example name RTT output and tested the LPN example. He did not see the SAR_FAILED event. He used NRF Mesh Android app version 1.2.1. Have you tried with a different phone? Both Android and iOS?
Thank you for looking into this.
Unfortunately I was unable to get my hands on an Android device to test from there.
I did try different model iPhones and they behave differently ... on an 8 the bug shows every time, on an XR the problem does not appear at all.
Up to your best judgement whether this is a bug in the mesh stack, a bug in the iOS library or something else?