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

nRF52840 Dongle: erase Provisioning Data

Hello,

I have been trying to program my own Provisioner. While testing I accidentally had a nRF52840 Dongle plugged in with a client running on it. It automatically connected to the Provisionier. Sadly I haven't implemented a disconnect function. I am now stuck with a Dongle that I cannot connect to with another device. I tried reprogramming it multiple time, but it seems that the Provisioning Data is saved in a Part if the Flash that is separate of the program.
The same thing happened with my nRF52840 DK, but through the debugger I can do an "Erase All" which removes any of the Provisioning Data.

Is it possible to do a similar thing with the Dongle?

Cheers,

Kilian

  • Hi Kilian, 

    The nRF52840 dongle programming on nRFConnect relies on the DFU bootloader to do the programming. Unfortunately, there isn't an option to do an erase all on the DFU bootloader. 

    The easiest way of solving this is to connect the dongle to a JLink programmer and erase it as you do with the nRF52840DK. This requires you to solder a header on P1 port to connect the programmer. 

    Another option if soldering is not an option is to use a big empty application image to cover the area that you want to erase. Basically you would need to generate the image with exact size of application area so that with all 0xFFFFFFFF so that when flashing it the DFU bootloader would erase the provisioning data sector (located one page under FLASH_MANAGER_RECOVERY_PAGE )

  • Hey Hung, could you point to instructions to do it with your second option (flash page) please?

  • In the main function I add the 2 commented out lines , I recompile and I program the dongle. You will see the dongle keeping resetting.

     Then I recompile with the 2 line commented out, I reprogram the dongle and that’s it.

     

    int main(void)

    {

        initialize();

        start();

     

        //mesh_stack_config_clear();

        //node_reset();

     

        for (;;)

        {

            (void)sd_app_evt_wait();

        }

    }

  • Hi Michel

    I am having the same issue you add only that lines of code in the main function of the Dongle Programm for the mesh BLE, and that's it?

    Thank you 

  • Yes, you put these two lines there, you compile and flash the dongle, run it. This way the dongle will keep resetting. Provisioning data should be now removed. I'm using a Switch Client model modified for the dongle and when the dongle resets the LED's are flashing.

    After that,  you remove the two lines, compile and reflash the dongle and run it. You should now be able to see it on the nRF Mesh App ready to be provisioned.

Related