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

Parents
  • 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

  • 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

  • Hi,

    Thanks for the answer. I'm sorry but i can see the script that you attached.

    Anyways i follwed your instruction for the bootloader verification. If i do all the procedure as described this is what i get

    The error still persist and is the same

    Edit: For a time reason i would like to know if for do the DFU I need to add some extra components over the Nordic itself, so i can make the board while trying to fix this issue

    thanks for the support

  • I am sorry. I forgot the attachment.

     

    REM nrfutil-mesh keys --gen-key private_key.txt
    nrfutil-mesh keys --show-vk hex private_key.txt
    
    nrfutil-mesh 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 0x00A8 --mesh dfu_test.zip
    
    cd ..\tools\dfu
    python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.0.0"
    cd ..\..\Dfu_test
    
    nrfjprog -e --snr 123456789
    nrfjprog --program ..\bin\softdevice\s132_nrf52_6.0.0_softdevice.hex --verify --snr 123456789
    nrfjprog --program ..\bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex --verify --snr 123456789
    nrfjprog --program ..\examples\dfu\build\dfu_nrf52832_xxAA_s132_6.0.0_Debug\dfu_nrf52832_xxAA_s132_6.0.0.hex --verify --snr 123456789
    nrfjprog --program ..\tools\dfu\bin\device_page_nrf52832_xxAA_s132_6.0.0.hex --verify --snr 123456789
    
    nrfjprog -e --snr 987654321
    nrfjprog --program ..\bin\softdevice\s132_nrf52_6.0.0_softdevice.hex --verify --snr 987654321
    nrfjprog --program ..\bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex --verify --snr 987654321
    nrfjprog --program ..\examples\dfu\build\dfu_nrf52832_xxAA_s132_6.0.0_Debug\dfu_nrf52832_xxAA_s132_6.0.0.hex --verify --snr 987654321
    nrfjprog --program ..\tools\dfu\bin\device_page_nrf52832_xxAA_s132_6.0.0.hex --verify --snr 987654321
    
    nrfjprog --reset --snr 123456789
    nrfjprog --reset --snr 987654321
    
    nrfutil-mesh dfu serial -pkg dfu_test.zip -p COM7 -b 115200 -fc --mesh

     

    You don't need any extra components. If you create your own pcb you can decide whether you want to have the physical LF_XTAL or not. The SDK examples use the external LF_XTAL, but you can do some changes in SW to use the internal RC oscillator instead of the LFXTAL.

     

    Check whether the script works. If not, make

  • Thanks a lot.

    Now is perfectly working.

    Thanks for the support.

Reply Children
No Data
Related