Skip to content

Commit abd9edc

Browse files
authored
Merge pull request #470 from NordicSemiconductor/hints
One more hint
2 parents 72fd866 + 5d9bf53 commit abd9edc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/dfu/src/main/java/no/nordicsemi/android/dfu/LegacyDfuImpl.java

+6
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,12 @@ public void performDfu(@NonNull final Intent intent)
454454
response = readNotificationResponse();
455455
status = getStatusCode(response, OP_CODE_INIT_DFU_PARAMS_KEY);
456456
mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_APPLICATION, "Response received (Op Code = " + response[1] + ", Status = " + status + ")");
457+
if (status == 6 && mInitPacketSizeInBytes > 14) {
458+
// Note: nRF5 SDK 11 also supported Init Packet with a signature,
459+
// which was longer than 14 bytes.
460+
logw("Hint: Most probably the Init packet is not supported by the DFU target. " +
461+
"It may be, that you're sending a file from a newer SDK (e.g. Secure DFU).");
462+
}
457463
if (status != DFU_STATUS_SUCCESS)
458464
throw new RemoteDfuException("Device returned error after sending init packet", status);
459465
}

0 commit comments

Comments
 (0)