<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>iOSDFULibrary hang at discoverCharacteristics()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22444/iosdfulibrary-hang-at-discovercharacteristics</link><description>We&amp;#39;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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Jun 2017 16:44:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22444/iosdfulibrary-hang-at-discovercharacteristics" /><item><title>RE: iOSDFULibrary hang at discoverCharacteristics()</title><link>https://devzone.nordicsemi.com/thread/88258?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 16:44:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8fa2434-83e9-476f-b0b1-fc44e32765ee</guid><dc:creator>John Whitley</dc:creator><description>&lt;p&gt;In fixing another Bluetooth issue with our app, we appear to have resolved this issue.&lt;/p&gt;
&lt;p&gt;For some time, we had been using one &lt;code&gt;CBCentralManager&lt;/code&gt; instance for the entire app, using it to scan both for our device in its normal operational mode, and to scan for it when running the bootloader (&amp;quot;Dfu Targ/Gemio Update&amp;quot; mode).  This was working well, but at some point this intermitted problem appeared, likely in response to a refactoring or possibly an iOSDFULibrary update.  I broke out our central manager usage as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;There&amp;#39;s one &lt;code&gt;CBCentralManager&lt;/code&gt; used for our BLE devices in normal operation.&lt;/li&gt;
&lt;li&gt;For each DFU workflow we initiate, create a new &lt;code&gt;CBCentralManager&lt;/code&gt; to scan for the &amp;quot;Gemio Update&amp;quot; device and pass that instance off to iOSDFULibrary.&lt;/li&gt;
&lt;li&gt;Be absolutely sure that this DFU-only &lt;code&gt;CBCentralManager&lt;/code&gt; is deallocated when DFU has finished.  I instrumented its containing class via logging in &lt;code&gt;deinit()&lt;/code&gt; to this end.  Helpful, as it turns out a subtle retain cycle had been introduced elsewhere.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These steps together have been sufficient to resolve this issue, and some other vexing DFU-related problems as well.  E.g. our app stopped being able to scan for BLE devices after DFU without an app restart.  It appears that the central manager was getting into a bad state post-DFU, and obvious fixes such as ensuring &lt;code&gt;stopScan()&lt;/code&gt; was called were of no help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOSDFULibrary hang at discoverCharacteristics()</title><link>https://devzone.nordicsemi.com/thread/88257?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2017 11:21:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f206341-337e-4f1b-9b7d-ad54f96f292d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I would suggest to test with unmodified bootloader, also try to do DFU update with just bootloader first, no buttonless. After that try to test with the ble_app_hrs buttonless.&lt;/p&gt;
&lt;p&gt;I suspect Att table cache on iOS could be the issue here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOSDFULibrary hang at discoverCharacteristics()</title><link>https://devzone.nordicsemi.com/thread/88256?ContentTypeID=1</link><pubDate>Wed, 31 May 2017 22:15:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58f7c60f-a6da-4989-a1aa-39d6b7633f23</guid><dc:creator>John Whitley</dc:creator><description>&lt;p&gt;@hungbui: We&amp;#39;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 &amp;quot;DfuTarg&amp;quot; to &amp;quot;Gemio Update&amp;quot;, 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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOSDFULibrary hang at discoverCharacteristics()</title><link>https://devzone.nordicsemi.com/thread/88255?ContentTypeID=1</link><pubDate>Wed, 31 May 2017 11:14:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb924532-7d07-4665-8ed3-8b0b50a0c66c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@John: Could you capture a &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;sniffer trace&lt;/a&gt; ?&lt;/p&gt;
&lt;p&gt;Which SDK did you use for the bootloader and application  ? Have you tried to test with a fresh copy of the bootloader ?&lt;/p&gt;
&lt;p&gt;Did you try to do DFU with only the bootloader or it&amp;#39;s the butonless dfu application you were trying ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>