This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[Mesh Network] Using nRF52840 Dongle as Server and it failed to detect after resetting the node (un-provision)

Hi 

I try to flash the firmware from project light_switch_server_nrf52840_xxAA_s140_6_1_0 to nRF52840 dongle to build the Mesh Network with below modifications:-

  1. Use boards.c file to access LED, exclude button, instead of using simple_hal.c
  2. Change common configuration - preprocessor definition. use BOARD_PCA10059 instead of BOARD_PCA10056
  3. Exclude the file simple_hal.c when building the project, because it will return an error
  4. Use nRF Connect v2.6.1 - Programmer app to flash the firmware 
    • add softdevice hex file - s140_nrf52_6.1.0_softdevice.hex, from path "nrf5SDKforMeshv300src\bin\softdevice"
    • add compile hex file after modify the project with item 1 and 2.
    • Remain original bootloader. 
  5. Using Android nRF Mesh app V1.1.0 to scan the device, it was successful to detect the device and completed the provision on 
    • one nRF52840 DK - as Client or Switch
    • one nRF52840 Dongle as Server or Light
  6. Success to run Generic on off client model, i.e. press the switch from nRF52840 DK (Switch) to toggle the nRF52840 Dongle (Light) LED ON/OFF
  7. My problem is when using nRF Mesh app v1.1.0 Android to reset node, nRF52840 Dongle unable to detect any more.

    Do you have any idea why it failed to detect anymore? Is because of the nRF52840 Dongle to wipe out certain memory area in order to restore back the original state? 

  1. I have tried to add reset node code in the Main function which as show in below 

int main(void)
{
    initialize();

    start();

// TODO: This is experiment for reset dongle back to original state after reset the node (unprovision)
#if MESH_FEATURE_GATT_PROXY_ENABLED
    (void) proxy_stop();
#endif
    mesh_stack_config_clear();
    node_reset();
//TODO: ending...

2. After that rever the reset node code and then flash the firmware to nRF52840 Dongle again. With this method which success to detect the nRF52840 Dongle as Light.But after few more tries, it failed to detect anymore. Do you know any reason for this problem?

Below is my working environment:-  

  • window 10
  • SES 4.12 
  • SDK for Mesh v3.0 + SDK v15.2.0
  • nRF Connect v2.6.1 - Programmer app to flash the firmware
  • nRF Mesh app v1.1.0 Android 
  • using Project light_switch_server_nrf52840_xxAA_s140_6_1_0.emProject

  •  Hi, I have just started with nrf52840 Dongle and in nrf Mesh app I do not see eny devices, I do not have posibility to debug - I have only tree Dongles... Could you share with me your sample code, witch works on Dongle? In other your post, you mentioned that nrf Mesh app for Android in Version 1.2 also do not see eny devices - did you overcome this issue?

    I have started form beeconing example form MeshSDK, and done steps simillar to mentioned by you above.

  • Hi,

    As the nRF52840 Dongle is not a development kit (in contrast to the nRF52840 DK), you may experience some difficulties working with it. In particular because it does not use an on-board programmer. If you find that the bootloader is troublesome then it is possible to use a programmer (such as the one on a DK) to program the nRF52840 DK directly using e.g. a Tag connect cable (but then you should know what you are doing.) For development purposes we recommend using the DK.

    Regarding node reset method, the normal procedure is that a config client (usually the provisioner) sends a message to the config server on the node. This is what happens when you reset the node from the nRF mesh app. If you have a look at apply_reset() in config_server.c you will see that the reset is delayed until there are no pending flash operations. Not doing so may end in a bad flash state, which is most likely what you experienced with your test where you reset the node directly from main.

    When it comes to the initial issue, what state did the Dongle end up in? Bootloader still working? Any indication where something goes wrong? It might be an idea to connect with a programmer and do a debug session. Alternatively, if you can reproduce the same behavior using a DK then it might be easier to debug.

    Regards,
    Terje

Related