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

ERROR_INVALID_DATA (135) on a DFU data packet

Hello, i have this problem with DFU, in Mesh SDK v3.0, i am using PCA10040. 

>nrfutil --verbose dfu serial -pkg dfu_test.zip -p COM11 -b 115200 -i1000 -fc --mesh


Upgrading target on COM11 with DFU package C:\Users\ingeniero.app1\Documents\Programa_LEPS_Btm_3.0.0\nrf5SDKforMeshv300src\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: 130152
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
PC -> target: 0502aabbccdd
target -> PC: 0582aabbccdd
Got echo response
Sending DFU init packet
PC -> target: 1378fdff040fb51ea18954454e33010006000000
target -> PC: 03847800
PC -> target: 1378fdff040fb51ea18954454e33010006000000
target -> PC: 03847800
PC -> target: 1478fcff0000b51ea189ffffffff1a7f000040000c
target -> PC: 03847887
PC -> target: 1478fcff0000b51ea189ffffffff1a7f000040000c
target -> PC: 03847887
PC -> target: 1478fcff0000b51ea189ffffffff1a7f000040000c
target -> PC: 03847887
PC -> target: 1478fcff0000b51ea189ffffffff1a7f000040000c
target -> PC: 03847887
PC -> target: 1478fcff0000b51ea189ffffffff1a7f000040000c
target -> PC: 03847887


Failed to upgrade target. Error is: Device returned status code ERROR_INVALID_DATA (135) on a DFU data packet.

Possible causes:
- bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
- baud rate or flow control is not the same as in the target bootloader.
- target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.
Closing serial port...

this is my boodloader_config_default.json

{
    "bootloader_config": {
        "bootloader_id": 1,
        "bootloader_version": 1,
        "company_id": 860767572,
        "application_id": 2,
        "application_version": 1,
        "public_key": "aa5a223ccf7226979442d8e9069b1b06e08501381a79929ab8ea5f828a2cfa7a12c621e19fbf3c38f1c3b7580243929099c44a4bfaaa55ac01fcca1f1c241593"
    }
}

and i am using this for make the pkg.

nrfutil dfu genpkg --application .\bin\blinky\blinky_nrf52832_xxAA_s132_6.1.0.hex --company-id 0x334E4554 --application-id 1 --application-version 2 --key-file .\archivos_DFU\private_key.txt --sd-req 0x00AF --mesh dfu_test.zip

and this for program the DK:

REM ERASE
nrfjprog -e 

REM SOFTDEVICE
nrfjprog --program .\bin\softdevice\s132_nrf52_6.1.0_softdevice.hex --verify 

REM serial bootloader
nrfjprog --program .\bin\bootloader\gccarmemb\mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex --verify

REM application
nrfjprog --program .\examples\dfu\build\dfu_nrf52832_xxAA_s132_6.1.0_Debug\dfu_nrf52832_xxAA_s132_6.1.0.hex --verify

REM device page
nrfjprog --program tools/dfu/bin/device_page_nrf52832_xxAA_s132_6.1.0.hex --verify

REM RESET
nrfjprog --reset 

Parents
  • Hi David, 

    Any reason why you want application_id = 2 in the .json file when in the package the application_id = 1  ?

    Could you post the script where you generate the device page ? 

  • the DK ever shows this in the log:

     0> <t:          1>, main.c,  204, ----- Bluetooth Mesh DFU Example -----
     0> <t:      16769>, serial_handler_prov.c,  267, Generating encryption keypair...
     0> <t:      21631>, main.c,  222, Initialization complete!
     0> <t:      26376>, main.c,  243, Enabling serial interface...
     0> <t:      26382>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
     0> <t:      26387>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
     0> <t:      26393>, main.c,  249, DFU example started!
     0> <t:      26566>, nrf_mesh_dfu.c,  390, 	New firmware!
     0> <t:      26569>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
     0> <t:      26573>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 0).
     0> <t:      26576>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    

    is this message " New firmware!" normal?

Reply
  • the DK ever shows this in the log:

     0> <t:          1>, main.c,  204, ----- Bluetooth Mesh DFU Example -----
     0> <t:      16769>, serial_handler_prov.c,  267, Generating encryption keypair...
     0> <t:      21631>, main.c,  222, Initialization complete!
     0> <t:      26376>, main.c,  243, Enabling serial interface...
     0> <t:      26382>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
     0> <t:      26387>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
     0> <t:      26393>, main.c,  249, DFU example started!
     0> <t:      26566>, nrf_mesh_dfu.c,  390, 	New firmware!
     0> <t:      26569>, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
     0> <t:      26573>, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 0).
     0> <t:      26576>, nrf_mesh_dfu.c,  561, 	SERIAL TX!
    

    is this message " New firmware!" normal?

Children
Related