Skip to content

Commit

Permalink
Merge pull request #348 from NordicSemiconductor/fix/347
Browse files Browse the repository at this point in the history
Reconnection to bootloader fixed for Legacy DFU
  • Loading branch information
philips77 authored Aug 8, 2022
2 parents a7b8393 + 0ecd664 commit 0945d81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void performDfu(@NonNull final Intent intent) throws DfuException, Device
// The library will immediately start scanning for the device advertising in
// bootloader mode and connect to it.
final boolean forceScanning = intent.getBooleanExtra(DfuBaseService.EXTRA_FORCE_SCANNING_FOR_BOOTLOADER_IN_LEGACY_DFU, false);
if (/* scan only for SDK 6.1, see Pull request #45 */ forceScanning || mVersion == 0) {
if (/* Bootloader from SDK 6.1 may use incremented address, see Pull request #45 */ !forceScanning && mVersion > 0) {
mService.waitUntilDisconnected();
mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_INFO, "Disconnected by the remote device");
}
Expand Down

0 comments on commit 0945d81

Please sign in to comment.