Skip to content

Commit 30f72dd

Browse files
authored
Merge pull request #419 from NordicSemiconductor/bugfix/418
Fix for unnecessary log message
2 parents e3f8b52 + 4870751 commit 30f72dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

iOSDFULibrary/Classes/Implementation/SecureDFU/Peripheral/SecureDFUPeripheral.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ internal class SecureDFUPeripheral : BaseCommonDFUPeripheral<SecureDFUExecutor,
117117
dfuService.jumpToBootloaderMode(withAlternativeAdvertisingName: name,
118118
onSuccess: {
119119
self.jumpingToBootloader = true
120+
self.possibleDisconnectionOnSettingAlternativeName = false
120121
// The device will now disconnect and
121122
// `centralManager(_:didDisconnectPeripheral:error)` will be called.
122123
},
123124
onError: { error, message in
124125
self.jumpingToBootloader = false
126+
self.possibleDisconnectionOnSettingAlternativeName = false
125127
self.delegate?.error(error, didOccurWithMessage: message)
126128
}
127129
)
@@ -142,6 +144,13 @@ internal class SecureDFUPeripheral : BaseCommonDFUPeripheral<SecureDFUExecutor,
142144
if possibleDisconnectionOnSettingAlternativeName {
143145
logger.e("Buttonless service not configured, see: https://devzone.nordicsemi.com/f/nordic-q-a/59881/advertising-rename-feature-not-working/243566#243566. To workaround, disable alternative advertising name.")
144146
possibleDisconnectionOnSettingAlternativeName = false
147+
148+
// We could set the flag below to allow jumping to the bootloader mode
149+
// without using alternative advertising name, but it's better to fail
150+
// and make sure the user knows about the issue. It can be workarond
151+
// by disabling alternative name in DFUServiceInitiator.
152+
153+
// jumpingToBootloader = true
145154
}
146155
super.peripheralDidDisconnect()
147156
}

0 commit comments

Comments
 (0)