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

Bluetooth MESH DFU issue while using nrf52382 dev kit+s132_6.0.0+Mesh 2.0.1+NRF SDK 15.0.0

Hi everyone,

    Days ago, I met a problem while trying to implement the DFU function with MESH SDK 2.0.1 and nRF5_SDK_15.0.0 following the quick start guide on different systems such as Ubuntu 18.04 / Windows 10 / macOS 10.13.5. 

    After I run the command "nrfutil --verbose dfu serial -pkg dfu_test.zip -p COM3 -b 115200 -fc --mesh" there was no more response.

    Here are my steps:

python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.0.0"
Wrote device page for nrf52832_xxAA with the s132_6.0.0 SoftDevice to bin/device_page_nrf52832_xxAA_s132_5.0.0.hex.

# Then, I change the file name from "device_page_nrf52832_xxAA_s132_5.0.0.hex" to "device_page_nrf52832_xxAA_s132_6.0.0.hex" manually.

# I verified on nRFGo Studio the softdevice for s132_6.0.0 shows up as 0x00A8, so I change the value of "--sd-req" to "0x00A8".
nrfutil dfu genpkg --application blinky_nrf52832_xxAA_s132_6.0.0.hex --company-id 0x00000059 --application-id 1 --application-version 10 --sd-req 0x00A8 --mesh dfu_test.zip
Zip created at dfu_test.zip

c:\dfu>nrfjprog --eraseall
Erasing user available code and UICR flash areas.
Applying system reset.

c:\dfu>nrfjprog --program s132_nrf52_6.0.0_softdevice.hex --chiperase
Parsing hex file.
Erasing user available code and UICR flash areas.
Applying system reset.
Checking that the area to write is not protected.
Programming device.

c:\dfu>nrfjprog --program mesh_bootloader_serial_armcc_nrf52832_xxAA.hex
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.

c:\dfu>nrfjprog --program dfu_nrf52832_xxAA_s132_6.0.0.hex
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.

c:\dfu>nrfjprog --program device_page_nrf52832_xxAA_s132_6.0.0.hex
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.

c:\dfu>nrfjprog --reset
Applying system reset.
Run.

c:\dfu>nrfutil --verbose dfu serial -pkg dfu_test.zip -p COM3 -b 115200 -fc --mesh
Upgrading target on COM3 with DFU package c:\dfu\dfu_test.zip. Flow control is enabled.
  [------------------------------------]    0%Flushing com-port...
Opened com-port
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 1912
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
PC -> target: 0502aabbccdd
PC -> target: 0502aabbccdd
PC -> target: 0502aabbccdd

    Then there is no more response.

    I also tried the steps mentioned in Issue doing DFU over BLE mesh: Setup, 1 target board: nrf52840 dev kit+s140+Mesh 2.0.1+NRF SDK 15.0.0

    It also get no response after the command "nrfutil --verbose dfu serial -pkg dfu_test.zip -p COM3 -b 115200 -fc --mesh".\

    I  also pressed button 4 and reset together to ensure target is in DFU.

    I'm not sure what other steps to try. Please help.

    Best regards,

    Simon Fu

  • Hi Simon, 

    could you try to remove the step where you flash the DFU application, i.e. nrfjprog --program dfu_nrf52832_xxAA_s132_6.0.0.hex ? 

    I have similar issues if I flash the DFU application from the Mesh SDK. I generated a batch script that flashes two nRF52 DKs with the required firmware. Just place the .bat script in the nrf5_SDK_for_Mesh_v2.0.1_src folder. You will have to clone https://github.com/NordicSemiconductor/pc-nrfutil/tree/mesh_dfu in to tools and then run python setup.py install in order to get nrfutil parts of the script to work. You also have to edit the COM ports and the Segger serial numbers.

    echo Running Mesh DFU Test
    
    @echo Generate DFU image
    python tools\pc-nrfutil\nordicsemi\__main__.py dfu genpkg --application bin\blinky\blinky_nrf52832_xxAA_s132_6.0.0.hex --company-id 0x00000059 --application-id 1 --application-version 2 --sd-req 0xA8 --mesh dfu_test.zip
    
    @echo Generate Device page
    cd tools\dfu
    python device_page_generator.py -d nrf52832_xxAA -sd "s132_6.0.0"
    cd ..\..
    
    @echo Erasing chip and flashing S132 v6.0.0 SoftDevice
    nrfjprog -s 682218724 --program bin\softdevice\s132_nrf52_6.0.0_softdevice.hex --chiperase
    nrfjprog -s 682389160 --program bin\softdevice\s132_nrf52_6.0.0_softdevice.hex --chiperase
    
    @echo Flashing Mesh Bootloader
    nrfjprog -s 682218724 --program bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex
    nrfjprog -s 682389160 --program bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex
    
    ::echo Flashing DFU app
    ::nrfjprog -s 682218724 --program examples\dfu\build\dfu_nrf52832_xxAA_s132_6.0.0_Debug\dfu_nrf52832_xxAA_s132_6.0.0.hex
    ::nrfjprog -s 682389160 --program examples\dfu\build\dfu_nrf52832_xxAA_s132_6.0.0_Debug\dfu_nrf52832_xxAA_s132_6.0.0.hex
    
    @echo Flashing Device page
    nrfjprog -s 682218724 --program tools\dfu\bin\device_page_nrf52832_xxAA_s132_6.0.0.hex
    nrfjprog -s 682389160 --program tools\dfu\bin\device_page_nrf52832_xxAA_s132_6.0.0.hex
    
    @echo Reseting devices
    nrfjprog -s 682218724 --reset
    nrfjprog -s 682389160 --reset
    
    @echo Verifying bootloaders
    python tools\dfu\bootloader_verify.py 682218724 COM107
    python tools\dfu\bootloader_verify.py 682389160 COM85
    
    @echo Reseting devices
    nrfjprog -s 682218724 --reset
    nrfjprog -s 682389160 --reset
    
    @echo Performing DFU
    python tools\pc-nrfutil\nordicsemi\__main__.py --verbose dfu serial -pkg tools\pc-nrfutil\dfu_test.zip -p COM107 -b 115200 -fc --mesh

     

     

     

  • Hi,

    Sorry for the delayed response.

    Because of  the busy works in the last few days, I will try the .bat script you provide next week and inform you of any progress in time.

    Thanks a lot.

    Best regards,

    Simon

     

Related