IOS-DFU-Library: Error 304: Enabling notifications failed
When I’m trying to Firmware updation , it’s not working, here is log =
<CBPeripheral: 0x1740f5a00, identifier = 907980BC-8FC6-4675-8A2A-F2EFAB1A16EC, name = SIDEKICK, state = connected> Changed state to: Connecting I : Connected to SIDEKICK I : Services discovered V : Starting Secure DFU… I : Connected to SIDEKICK I : Services discovered V : Secure DFU Service found V : Discovering characteristics in DFU Service… D : peripheral.discoverCharacteristics(nil, for: FE59) I : DFU characteristics discovered V : Enabling notifications for 8E400001-F315-4F60-9FB8-838830DAEA50… D : peripheral.setNotifyValue(true, for: 8E400001-F315-4F60-9FB8-838830DAEA50) Changed state to: Starting E : Enabling notifications failed E : Error 3: Writing is not permitted. V : Disconnecting… D : centralManager.cancelPeripheralConnection(peripheral) D : [Callback] Central Manager did disconnect peripheral I : Disconnected Error 304: Enabling notifications failed
Please let me Know what was the issue
func startDFUProcess() {
guard dfuPeripheral != nil else {
print("No DFU peripheral was set")
return
}
```
let dfuInitiator:DFUServiceInitiator = DFUServiceInitiator(centralManager: appDel.manager, target: dfuPeripheral!).with(firmware: selectedFirmware!)
dfuInitiator.delegate = self
dfuInitiator.progressDelegate = self
dfuInitiator.logger = self
dfuInitiator.enableUnsafeExperimentalButtonlessServiceInSecureDfu = true
dfuController = dfuInitiator.start()
}`
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (8 by maintainers)
Thanks @mostafaberg for your patience The main issue of “Error 304: Enabling notifications failed” was resolved when I update DFU library to current version. other issue was with my firmware file. Thank you man.