Provisioning error in Light Switch server (NRF52832)

Hello! I am trying to run the "Light switch" example on a custom board.


My environment:
- nRF5 SDK v17.0.2
- nRF5 SDK for Mesh v5.0.0
- SoftDevice S132 v7.2.0
- NRF52832_xxAA (on custom board)
- Keil uVision 5.33.0 (Compiler v5)
- J-link debugger
- nRF Mesh App v3.1.6 for Android


I'm using Keil's built-in MDK. When trying to add a device to the network, nRF Mesh reports an error:

The example code remained unchanged, except for the fact that I commented out all calls related to the board (controlling the LEDs). After the error occurs, my log looks like this:


While debugging, I was able to figure out that the "m_device_provisioned" flag is set to "true" at this location:



However, after that, the GATT connection is closed, as evidenced by the call to the "a_link_close_notify" function, which informs subscribers about the NRF_MESH_PROV_LINK_CLOSE_REASON_ERROR error:



Call stack up to this function:



When compiling the project, I see that some of the declared sections do not have observers registered, but the project starts successfully:



I hope for your help!

  • Hi Dmitro, 

    Do you have the same problem if you try to compile and flash the example on a DK (unmodified example) ? 

    Could you also check if you have the sdh_* section defined in the flash_placement.xml file ?

    Sometimes we have the issue that the connection between the phone and the fresh provisioned device and you will need to manually connect and do configuration as showed in your screenshot: 

    If the issue remains, please send us your project so we can test here. 

  • Hello Hung!

    I have to connect to a node to manually complete the configuration, however after clicking the "connect" button it searches endlessly for nodes, my node is no longer found. I got some additional debug info:

    The first and second logs are received under the same conditions (provisioning process), however sometimes the node itself drops the connection and sometimes the smartphone does it.
    Unfortunately at the moment I don't have a DK, only our board.

  • Hi Dmitro, 

    Would the unmodified example run on your board ? I assume if it's just the GPIO difference it should still work. 

    I don't fully understand why you use NRF Connect to connect to the board. What you need to do after provisioning interrupted is to use nRFMesh app to connect to a Proxy node (Click on Connect) either the exact node or other node that's already in the network. After that you should be able to click on the node and Configure it. 

  • I use "nRF Connect" to debug connections, "nRF Mesh" is used to connect to the board. After an error in the nRF Mesh application, I am unable to connect the node to configure it.

  • Hi Dmitro, 

    Please make sure you don't run nRF Connect at the same time as the nRF Mesh provisioning. The reason is that it may hold the connection and that's why you can't find the provisioned node. 

    Also please try to test using unmodified example and test provisioning using other phone as well. 

Related