Skip to content

Commit 3fcd802

Browse files
committed
Not logging about buttonless service not configured when it was configured correctly
1 parent e3f8b52 commit 3fcd802

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ 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
},
@@ -142,6 +143,13 @@ internal class SecureDFUPeripheral : BaseCommonDFUPeripheral<SecureDFUExecutor,
142143
if possibleDisconnectionOnSettingAlternativeName {
143144
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.")
144145
possibleDisconnectionOnSettingAlternativeName = false
146+
147+
// We could set the flag below to allow jumping to the bootloader mode
148+
// without using alternative advertising name, but it's better to fail
149+
// and make sure the user knows about the issue. It can be workarond
150+
// by disabling alternative name in DFUServiceInitiator.
151+
152+
// jumpingToBootloader = true
145153
}
146154
super.peripheralDidDisconnect()
147155
}

0 commit comments

Comments
 (0)