This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOSDFULibrary hang at discoverCharacteristics()

We're encountering a frequent but intermittent hang after handing off OTA DFU to iOSDFULibrary 3.1.0. In the happy case, the characteristics are discovered and DFU process proceeds normally:

[DFU] Discovering characteristics in DFU Service...
[DFU] peripheral.discoverCharacteristics(nil, for: FE59)
[DFU] DFU characteristics discovered
...

When we get a hang, it's characterized by the following logging snippet:

[DFU] Discovering characteristics in DFU Service...
[DFU] peripheral.discoverCharacteristics(nil, for: FE59)
[DFU] [Callback] Central Manager did disconnect peripheral 
[DFU] Disconnected by the remote device

There are no DFUState updates to the dfuStateDidChange(to:) delegate method that indicate that DFU has encountered a problem. It just locks up and sits at this point forevermore. We've replicated this issue across multiple of our nrf51422-based devices, and across multiple iOS devices, in both Debug and Release builds.

At this point, it's not even fully clear whether this represents a bug in iOSDFULibrary, or whether we're somehow getting into a bad state before our iOS codebase hands off to the DFU library.

Full iOSDFULibrary hang log

Parents
  • @hungbui: We're using the sdk12.1.0 bootloader, customized slightly as follows: We send our company-id in the manufacturer data, we change the name from "DfuTarg" to "Gemio Update", and we are always buttonless, so we have the buttonless dfu patch discussed elsewhere in the forum. (The buttonless works perfectly with NRFToolbox, we only have this problem from our iOS App). Working presently on capturing a trace of the failure mode.

Reply
  • @hungbui: We're using the sdk12.1.0 bootloader, customized slightly as follows: We send our company-id in the manufacturer data, we change the name from "DfuTarg" to "Gemio Update", and we are always buttonless, so we have the buttonless dfu patch discussed elsewhere in the forum. (The buttonless works perfectly with NRFToolbox, we only have this problem from our iOS App). Working presently on capturing a trace of the failure mode.

Children
No Data
Related