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

How to perform BLE Mesh 0.9.1 DFU?

Im on an nRF52832, using the BLE Mesh 0.9.1 alpha release

I've followed the DFU Quickstart guide, and have been able to DFU the app_green_s132.hex, which is the prebuilt example file. However, when I change out app_green_s132.hex for my own app, 52_light_control_server.hex, the update fails at 1%, with "ERROR_INVALID_DATA (135)". The only change I'm making is swapping out the hex in the nrfutil dfu genpkg step.

This failure leads me to believe that the dfu process inspects the application hex, and that mine is missing information. I don't see any documentation or lines of code saying that I need to include anything special in my application.

What is necessary to dfu arbitrary applications?

  • Hi Todd, could you post the commands you used to generate the dfu packet as well as the command you used to transfer the DFU archive? Have you also generated a device page with the device_page.py script located in tools/dfu/device_page.py.

  • #generate device page

    	python device_page.py example52 --nrf52
    
    #program images
    
    	nrfjprog --eraseall -f nrf52
    	nrfjprog -f nrf52 --program ../../lib/softdevice/s132/hex/s132_nrf52_3.0.0_softdevice.hex
    	nrfjprog -f nrf52 --program ../../bin/bootloader_serial_nrf52832_xxAA.hex
    	nrfjprog -f nrf52 --program  ../../examples/dfu/52_dfu.hex 
    	nrfjprog --reset -f nrf52
    	nrfjprog -f nrf52 --program example52.hex
            nrfjprog --reset -f nrf52
    
    #generate final dfu package
    
    	nrfutil dfu genpkg --application ../../examples/light_control/server/52_light_control_server.hex \
    	    --company-id 0x00000059 \
    	    --application-id 1 \
    	    --application-version 2 \
    	    --key-file private_key.txt \
    	    --sd-req 0x0084 \
    	    --mesh dfu_test.zip
    
    #send dfu package
    
    	nrfutil dfu serial -pkg dfu_test.zip -p $comport -b 115200 -fc --mesh
    
Related