IOS-DFU-Library: Error 201 connection failed
DFU Bootloader version (please complete the following information):
- SDK version: [e.g. SDK 16]
- Library version: [e.g. 4.6.1]
Device information (please complete the following information):
- OS: [e.g. iOS 13.x]
Your question Hi, i’ve a problem with version 4.6.1. Every update fails with error Error 201: Device failed to connect. This is my configuration:
let dfuInitiator = DFUServiceInitiator(queue: DispatchQueue(label: "Other"))
dfuInitiator.delegate = self
dfuInitiator.progressDelegate = self
dfuInitiator.logger = self
if #available(iOS 11.0, macOS 10.13, *) {
dfuInitiator.packetReceiptNotificationParameter = 0
}
self.dfuController = dfuInitiator.with(firmware: selFirmware!).start(target: dfuPeripheral)
Moreover, the update fails and abort() command seems to not works. The device seems to be bricked. I can’t detect it after the update Logs Error 201: Device failed to connect
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (10 by maintainers)
Commits related to this issue
- Extended DFU Connection Timeout from 3 to 15 seconds This appears to fix the problem highlighted here: https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/issues/368 — committed to dinesharjani/IOS-Pods-DFU-Library by deleted user 3 years ago
- Extended DFU Connection Timeout from 3 to 15 seconds This appears to fix the problem highlighted here: https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/issues/368 — committed to dinesharjani/IOS-Pods-DFU-Library by dinesharjani 3 years ago
I found a fix for my problem. Turns out the hard-coded timeout when connecting in DFUPeripheral.swift peripheralDidDisconnect() method wasn’t waiting long enough. I did make a branch, make the changes and tried to push, but I was having authentication issues. So I created a patch file:
I don’t really care on your approach. It could be making this hardcoded 15, or even a user-settable property from service.