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

Error doing the DFU on Mesh

Hi, 

sorry for write here again but i'm not able to do the dfu update.

I'm still trying to understand why is not working, anyways i'm using the guide present on the infocenter (version 2.0.1).

That's what i'm actually doing:

1-2) Generate the keys with the command "nrfutil keys --gen-key private_key.txt", see the keys and change the bootloader_config as you can see in the following images

3) Generate the packet, here i'm using the versione s132_6.0.0 because all the other program are on the versione 6 as well, using the command "nrfutil dfu genpkg --application bin/blinky/blinky_nrf52832_xxAA_s132_6.0.0.hex  --company-id 0x00000059  --application-id 1  --application-version 2  --key-file private_key.txt  --sd-req 0x009D  --mesh dfu_test.zip"

4) Generate the hex page. Using the command "python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.0.0"" (version 6.0.0 as well)

5) Erase all chip, in this case i've 2 developement board

6) Flash the softdevice on all device, i'm using this command "nrfjprog --program bin/softdevice/s132_nrf52_6.0.0_softdevice.hex --chiperase" but i've tryed as well with "nrfjprog --program bin/softdevice/s132_nrf52_6.0.0_softdevice.hex" and the result is the same.

7)Flash the bootloader, here i've the 1st doubt, i'm using segger so i need to choose the gccarmemb right? Anyways i'm actually using it and the command is "nrfjprog --program bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex"

8)Flash the application, in this case i'm using segger so i'm just doing the "Download dfu_nrf52..." without any error given. The application that i'm using is the only one on the example dfu folder.

9) Flash the page. Even there i get no error.


Now i should be able to do the dfu but when i try i get the following error (i'm using the command "nrfutil --verbose dfu serial -pkg dfu_test.zip -p <COM port> -b 115200 -fc --mesh")

I get the same error with both of the com ports, i really don't understand what i'm doing wrong. If someone can help will be much appreciated.

Thanks for the help and the support

  • Hi, Sorry for the late reply

    You used the wrong sd version 

    --sd-req 0x009D <-- This is wrong. As this  is for S132 v5

    you need to use below

    --sd-req 0x00A8  he used fir S132 v6

  • Hi, sorry for the late reply as well

    i've made the change but didn't work. the error is the same (i've made the same stuff as i previously said).

    i've just tried to do the debug with Segger then run the nrfjprog to do the update and the error that i get from segger is the following

    I don't know if that can help to find the problem.

    Thanks for the support

  • Hello,

    Susheel is currently out of office, so I will handle your case.

     

    Can you please try to use 

    python bootloader_verify.py <serial number> <COM port>

    as described on the bottom of this page.

    What does it say then?

     

    Best regards,

    Edvin

  • Hi,

    Can you tell me how i can find the serial number?

    Actually i'm trying to use the script as descript on the page but it give me back one error that say that there are no debugger connected, i've checked the COM port and are ok, so the error should be the serial number unless that was what you expected to find.

    Thanks

  • Hello,

    The serial number is printed on the white sticker on the programming chip on the DK.

    Alternatively, you can write "nrfjprog --ids" in CMD, which will list the serial number of all connected Segger devices.

     

    I remember seeing a similar issue when I started testing with the mesh dfu. I am not sure what the issue was, but it went away after power cycling the board and closing everything else that might use the COM port (Putty terminal, Termite terminal, Segger Embedded Studio, ...).

     

    I attached a script which I use to test the mesh DFU.

    If you copy it into a folder, e.g. "DFU_TEST" folder in the mesh SDK root folder, it should flash everything, and do the mesh DFU update.

    Note that if you want to test this, there are a few things you need to do:

    1: copy the .bat file into <MESH-SDK>\DFU_TEST

    2: I have changed the name of my mesh-version nrfutil to "nrfutil-mesh", to be able to use it without removing the "normal" nrfutil. Just remove the "-mesh" from all the "nrfutil-mesh" in the script. Also, change the --snr <serial number> to serial numbers matching your DKs.

    3: remove "REM" on the first line the first time you run the script to generate the key. Then add REM again, to prevent generating a new key every time.

    4: Copy the key shown in CMD into your <MESH-SDK>\tools\dfu\bootloader_config_default.json file, like described in the guide.

    5: compile the <MESH-SDK>\examples\dfu\dfu_nrf52832_xxAA_s132_6_0_0.emproject in Segger Embedded Studio. You don't need to modify anything in this project.

    6: close Segger Embedded studio.

    7: Run the script again. This time it should run without any errors if you followed the steps above.

    8: See if you are able to perform the DFU. Note that it takes some time after the script says "Device Programmed" until they start to blink.

     

    Try it, and let me know whether it works or not.

     

    Best regards,

    Edvin

Related