-
Notifications
You must be signed in to change notification settings - Fork 222
Description
DFU Bootloader version (please complete the following information):
- SDK version: nRF5 SDK 17.1.0
- Bonding used: No
- Library version: 4.15.0
Device information (please complete the following information):
- Device: iPhone 14 Pro (also iPad Pro, other iPhones etc.)
- OS: iOS 15-17 (maybe others)
Describe the bug
For several years, across multiple iOS versions and versions of this library, we've had an issue where the IOS-DFU-Library initiates DFU on the wrong device, and sometimes multiple devices. Note that we see the same behavior with the nRF Connect app on iOS/iPadOS devices. When we initiate DFU on one device, other nearby devices sometimes also reboot into their bootloaders in DFU mode, rather than just the target device.
This is causing problems with our products in production, as our customers use multiple products using nRF52833 devices simultaneously. We recently had a report where a customer tried to initiate a firmware update on one product, and another nearby product that was in use (different product, but running the same bootloader and soft device version) rebooted into its bootloader and interrupted operation.
Our code starting DFU is as follows, being called on only a single CBPeripheral
.
private func runDfu(peripheral: CBPeripheral,
device: Device,
advertisingName: String,
firmware: DFUFirmware) -> DFUServiceController? {
let initiator = DFUServiceInitiator().with(firmware: firmware)
initiator.delegate = device
initiator.progressDelegate = device
// Uncomment this to receive feedback from Nordic DFU library
initiator.logger = device
// Set the DFU bootloader advertising name
initiator.alternativeAdvertisingName = advertisingName
return initiator.start(target: peripheral)
}
Note that this problem is described in another ticket here, but the offered resolution doesn't apply -- the DFUSelectorDelegate
is not involved in the initial selection of the device to update, but rather is used to attempt to identify the device after it's rebooted into its bootloader.
The initial request to start the DFU process appears to be getting sent to the wrong device/devices intermittently (e.g. sometimes the intended target device will correctly reboot and its DFU starts, but we'll also observe other nearby devices reboot simultaneously, though the DFU process is not performed on those devices and they time out back to their application after a while).
We have tested this extensively to understand the issue, and have narrowed it down to a problem with the Nordic DFU library. We've been able to consistently observe this happening, but not reproduce it in a controlled manner.
Logs
We don't have any relevant logs for this issue.