Secure BLE DFU fails with "error when validating offset"

I have a secure BLE DFU project that is basically a duplicate of the example project (secure bootloader pca10040_s132_ble). I am able to flash a merged hex on my custom board, switch to the bootloader, and connect to the DFU target that appears. When I try a DFU with nRF Connect Desktop, the logs show a disconnect, then some activity, then finally a failure. The error message always shows two values that are off by 244 (e.g. Got 7948, but expected 8192, or 3852/4096, etc.)

1:59:20.321 Scan started
21:59:22.349 Connecting to device
21:59:22.381 Connected to device C8:40:C4:52:B2:3F: interval: 7.5ms, timeout: 4000ms, latency: 0
21:59:22.446 Connection parameters updated for device C8:40:C4:52:B2:3F: interval 15ms, timeout 6000ms, latency: 0
21:59:22.738 Attribute value read, handle: 0x03, value (0x): 45-6E-73-6F-44-66-75
21:59:28.067 Disconnected from device C8:40:C4:52:B2:3F
21:59:28.068 Performing DFU with file: /docs/dfu_pack.zip
21:59:29.082 Attribute value changed, handle: 0x10, value (0x): 01-00
21:59:29.112 Attribute value changed, handle: 0x0F, value (0x): 02-00-00
21:59:29.113 Attribute value changed, handle: 0x0F, value (0x): 60-02-01
21:59:29.172 Attribute value changed, handle: 0x0F, value (0x): 06-01
21:59:29.173 Attribute value changed, handle: 0x0F, value (0x): 60-06-01-00-02-00-00-00-00-00-00-00-00-00-00
...etc...
21:59:37.425 DFU failed with error: Error when validating offset. Got 12044, but expected 12288..

Though the logs show a disconnect, I believe the DFU is at least initializing, since I get the expected error messages when I try intentionally invalid DFU packages (bad HW version, bad SD req, no signing, etc.). Any suggestions would be much appreciated!

Other details: nRF52832 (512k), S132 v7.2.0, SDK 17.0.2, using internal oscillator and have changed the relevant part of sdk_config to the values 0, 16, 2, 1 that I've seen recommended on this forum.

Parents Reply Children
No Data
Related