You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* If the DFU target device is in invalid state (f.e. the Init Packet is required but has not been selected), the target will send DFU_STATUS_INVALID_STATE error
114
+
* If the DFU target device is in invalid state (e.g. the Init Packet is required
115
+
* but has not been selected), the target will send DFU_STATUS_INVALID_STATE error
115
116
* for each firmware packet that was send. We are interested may ignore all but the first one.
116
117
* After obtaining a remote DFU error the OP_CODE_RESET_KEY will be sent.
117
118
*/
@@ -393,6 +394,18 @@ public void performDfu(@NonNull final Intent intent)
393
394
}
394
395
}
395
396
397
+
// Request short connection interval.
398
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// There will be a (hidden) callback on newer Android versions,
406
+
// but we don't have to wait for it.
407
+
}
408
+
396
409
/*
397
410
* If the DFU Version characteristic is present and the version returned from it is greater or equal to 0.5, the Extended Init Packet is required.
398
411
* For older versions, or if the DFU Version characteristic is not present (pre SDK 7.0.0), the Init Packet (which could have contained only the firmware CRC) was optional.
@@ -481,6 +494,10 @@ public void performDfu(@NonNull final Intent intent)
481
494
status = getStatusCode(response, OP_CODE_RECEIVE_FIRMWARE_IMAGE_KEY);
482
495
logi("Response received (Op Code = " + response[0] + ", Req Op Code = " + response[1] + ", Status = " + response[2] + ")");
483
496
mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_APPLICATION, "Response received (Op Code = " + response[1] + ", Status = " + status + ")");
0 commit comments