<?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>DFU app bad handling of errors</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2026/dfu-app-bad-handling-of-errors</link><description>I am trying to bootload an extremely large hex file using a slightly modified DFU (modified from SDK v5.2.0&amp;#39;s example) 
 The problem is that the hex is so large that eventually, pstorage&amp;#39;s task queue is filled, and returns a no-memory error 
 The Android</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Apr 2014 16:04:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2026/dfu-app-bad-handling-of-errors" /><item><title>RE: DFU app bad handling of errors</title><link>https://devzone.nordicsemi.com/thread/8699?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2014 16:04:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca46a0c9-845a-44e2-950b-25ee6cc8e4e3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Frank: You are correct that the bootloader send the notification when it receives and queue the packet, not when it actually finish flashing the packet.  I am sorry for the confusion.&lt;/p&gt;
&lt;p&gt;However, it pretty strange that you have the queue full when receiving only one packet per connection interval (I assume so because the notification usually&amp;#39;s sent in the next connection interval)&lt;/p&gt;
&lt;p&gt;Have you tried to use our stock DFU example ? Would the same issue occur ?&lt;/p&gt;
&lt;p&gt;Actually we haven&amp;#39;t seen this issue when using DFU with 10 packet notification on various central devices tested here, including iPad mini, iPhone 5S, Samsung S4, S3, Nexus 4, 7 etc.&lt;/p&gt;
&lt;p&gt;Could you send us your DFU firmware ? It would be easier to identify the issue if we could reproduce here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app bad handling of errors</title><link>https://devzone.nordicsemi.com/thread/8698?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2014 14:35:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ce08d9e-0748-4019-b121-9214b92d8f5e</guid><dc:creator>Frank Zhao</dc:creator><description>&lt;p&gt;I have already set the number of packet to 1, this is due to a previous problem I&amp;#39;ve had &lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/ios-nrf-loader-timeout-during-upload" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/ios-nrf-loader-timeout-during-upload&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have the latest example code from SDK v5.2.0 (latest as of this post) and it is clear that the notification is sent on line 337 and 356 of dfu_transport_ble.c and it happens even if the flash operation isn&amp;#39;t finished yet. (because pstorage_raw_store is not blocking, it simply places stuff in a queue)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app bad handling of errors</title><link>https://devzone.nordicsemi.com/thread/8697?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2014 14:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35465420-d067-4998-ba70-cc61ce61ea53</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Frank,&lt;/p&gt;
&lt;p&gt;11.25ms to 15ms is the default connection interval range in our DFU example.
From what I know, it&amp;#39;s safe if the number of packet per connection interval is about 3-4 packet per conn interval.
Could you run a sniffer and find how many packets were sent per conn interval ?&lt;/p&gt;
&lt;p&gt;One solution for this is to use the Packet Receipt Notification to make sure the device has successfully received and stored the data packets in flash before the master sends the next ones.
It&amp;#39;s a pretty new feature of the DFU bootloader, please have a look in the SDK documentation. (Examples-&amp;gt; Bootloader/DFU -&amp;gt; DFU Transport layer -&amp;gt; BLE)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app bad handling of errors</title><link>https://devzone.nordicsemi.com/thread/8696?ContentTypeID=1</link><pubDate>Tue, 01 Apr 2014 18:29:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e01e1b0b-b7b3-432e-8bee-1c48308c5c4c</guid><dc:creator>Frank Zhao</dc:creator><description>&lt;p&gt;Yes, I already knew it is the fact that the rate of transmitting is causing the pstorage queue to fill, not really the size&lt;/p&gt;
&lt;p&gt;The test was done with a hex that exceeded 80KB (which I know exceeds the dual bank limits, but I modified the DFU code to behave as if it was single bank)&lt;/p&gt;
&lt;p&gt;In fact, I can get it working by increasing the connection interval, but it ends up taking so long that I don&amp;#39;t have the patience to complete the testing&lt;/p&gt;
&lt;p&gt;The central device is a Samsung Galaxy Note 3, Android 4.3&lt;/p&gt;
&lt;p&gt;I believe the the connection interval was 12 to 15 ms during the tests that failed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app bad handling of errors</title><link>https://devzone.nordicsemi.com/thread/8695?ContentTypeID=1</link><pubDate>Tue, 01 Apr 2014 16:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65beab24-963b-49fb-aa15-9b7a6ebb9dba</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Frank ,&lt;/p&gt;
&lt;p&gt;Could you let me know the size of your hex ?
I don&amp;#39;t think it was the size of the hex file that cause the issue. I suspect that it was the rate of transmitting DFU packets was too fast that filled the pstorage queue.&lt;/p&gt;
&lt;p&gt;Do you have a sniffer trace and check for the connection interval when updating the firmware ?&lt;/p&gt;
&lt;p&gt;Which central device did you use for testing ?
What was the preferred connection interval you used in the bootloader firmware ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>