Skip to content

Commit

Permalink
Merge pull request #176 from NordicSemiconductor/default-no-pipelining
Browse files Browse the repository at this point in the history
Fix: If McuMgr Parameters are not supported, disable Pipelining/Reassembly/Erase App Settings
  • Loading branch information
dinesharjani authored Nov 7, 2023
2 parents 1da13a7 + b8d1d57 commit 74cc73c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Source/Managers/DFU/FirmwareUpgradeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,17 @@ public class FirmwareUpgradeManager : FirmwareUpgradeController, ConnectionObser
guard let self = self else { return }

guard error == nil, let response, response.rc != 8 else {
self.log(msg: "Device capabilities not supported.", atLevel: .warning)
self.configuration.reassemblyBufferSize = 0
self.log(msg: "Device capabilities not supported.", atLevel: .info)
if self.configuration.pipeliningEnabled {
self.log(msg: "Disabling Pipelining since device capabilities are not supported.", atLevel: .debug)
self.configuration.pipelineDepth = 1
}
if self.configuration.reassemblyBufferSize > 0 {
self.log(msg: "Disabling Reassembly since device capabilities are not supported.", atLevel: .debug)
self.configuration.reassemblyBufferSize = 0
}
if self.configuration.eraseAppSettings {
self.log(msg: "Cancelling 'Erase App Settings' since device capabilities are not supported.", atLevel: .info)
self.log(msg: "Cancelling 'Erase App Settings' since device capabilities are not supported.", atLevel: .debug)
self.configuration.eraseAppSettings = false
}
self.bootloaderInfo() // Continue to Bootloader Info.
Expand Down

0 comments on commit 74cc73c

Please sign in to comment.