<?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>iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17510/ios-dfu-writing-to-characteristic-failed</link><description>I&amp;#39;m using the iOS latest iOSDFULibrary pods to import to my app. However, after I using DFUServiceIniciator service the log just show as attach. DFUQuestionLog.m 
 The only different with the Nordic iOS toolbox is the following line :
10: Packet Receipt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Jun 2017 11:08:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17510/ios-dfu-writing-to-characteristic-failed" /><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67317?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2017 11:08:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fa9e834-51fc-4d88-a437-8a9180d20406</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;// Optional:
// initiator.forceDfu = YES/NO; // default NO
// initiator.packetReceiptNotificationParameter = N; // default is 12&lt;/p&gt;
&lt;p&gt;please annotation two line   and its ok&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67316?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 09:09:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef3eaa09-4f9d-43eb-aa2d-6e6e6722f6a1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I think it&amp;#39;s fine, we will keep it this way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67314?ContentTypeID=1</link><pubDate>Mon, 26 Dec 2016 06:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b0d2c53-5dcf-4df4-93f1-f7914c8380d9</guid><dc:creator>Dennis Lan</dc:creator><description>&lt;p&gt;Hi Hung,
Thanks for your help, then this issue may no longer exist.  So do I need to modify my answer or I just delete right away?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67315?ContentTypeID=1</link><pubDate>Fri, 23 Dec 2016 13:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:751eacbb-9f7a-464e-a2ef-e6505879af79</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dennis,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s great that you figured out the issue. Please be noted that the library you pointed to is obsoleted and should be replaced by &lt;a href="https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library"&gt;this one&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the new repo the issue is fixed, and you are free to set it to 0 (to disable notification) or to something &amp;gt;12  as mentioned &lt;a href="https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/blob/master/iOSDFULibrary/Classes/Implementation/DFUServiceInitiator.swift#L73"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67313?ContentTypeID=1</link><pubDate>Fri, 23 Dec 2016 08:22:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bac149cf-2bde-49ab-b17a-f09efcc41cac</guid><dc:creator>Dennis Lan</dc:creator><description>&lt;p&gt;After Several testing, I found out that the problem may be the same as the following link:
&lt;a href="https://github.com/NordicSemiconductor/IOS-DFU-Library/issues/24"&gt;github.com/.../24&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;According to the log in Xcode, the Value for my case return 0&lt;/p&gt;
&lt;p&gt;ex. 10: Packet Receipt Notif Req (Op Code = 8, Value = 0) request sent&lt;/p&gt;
&lt;p&gt;As the upon link said, maybe the .packetReceiptNotificationParameter was modified by user to return 0.  As the result, I modified with following example and it just suceed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;DFUServiceInitiator *initiator = [[DFUServiceInitiator alloc] initWithCentralManager:bluetoothManager target:peripheral];
NSString *selectedPath = [[NSBundle mainBundle] pathForResource:@&amp;quot;selectedfile&amp;quot; ofType:@&amp;quot;zip&amp;quot;];
         NSURL *url = [NSURL fileURLWithPath:selectedPath];
         selectedFirmware = [[DFUFirmware alloc] initWithUrlToZipFile:url];
         [initiator withFirmwareFile:selectedFirmware];
         initiator.forceDfu = [[[NSUserDefaults standardUserDefaults] valueForKey:@&amp;quot;dfu_force_dfu&amp;quot;] boolValue]; 
// initiator.packetReceiptNotificationParameter = [[[NSUserDefaults standardUserDefaults] valueForKey:@&amp;quot;dfu_number_of_packets&amp;quot;] intValue];

         initiator.logger = self;
         initiator.delegate = self;
         initiator.progressDelegate = self;
         controller = [initiator start];
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67312?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 02:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9abb7298-41b9-41d9-a32c-368db796a819</guid><dc:creator>Dennis Lan</dc:creator><description>&lt;p&gt;I see.  I&amp;#39;ll try to modify the code in my application to be the same as Toolbox.  By the way, I&amp;#39;m still purchasing the sniffer from the supplier, it may take some days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67308?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2016 08:11:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:574f188a-4c44-4115-8fcb-170cd5608dff</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you change the code in your application to request notification packet after every 12 data packet, the same as the Toolbox does, would the error still occur ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67306?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 15:36:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f7cb262-2dbb-416a-a932-961844bf803a</guid><dc:creator>Dennis Lan</dc:creator><description>&lt;p&gt;Hi Hung,
I&amp;#39;ll provide the sniffer trace later.
The only difference is the following line:&lt;/p&gt;
&lt;p&gt;from Toolbox
Packet Receipt Notif Req (Op Code= 8, Value = 12) request sent.&lt;/p&gt;
&lt;p&gt;from DFUfulllog:
Packet Receipt Notif Req (Op Code= 8, Value = 0) request sent.
Thanks~&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67311?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 13:27:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dec6aa9-b70e-405d-99bd-4f68c3a1eeab</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dennis, I got the log. It seems it&amp;#39;s not the issue with service discovery or switching between application and bootloader. I suspect the bootloader crashed in the middle of the process.
I would need to see the sniffer trace to understand what went wrong.&lt;/p&gt;
&lt;p&gt;You can also try to catch the log when you do DFU with nRFToolbox and compare to see what makes the difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67310?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 08:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8f7f158-4e65-45ef-aedb-2dd408778de2</guid><dc:creator>Dennis Lan</dc:creator><description>&lt;p&gt;Hi Hung,
I couldn&amp;#39;t provide the full log cause of Internal server error, I&amp;#39;ll just provide the url here.
&lt;a href="https://drive.google.com/file/d/0B6ph2oC4HGD-WC1yZFlBSnFJU0E/view?usp=sharing"&gt;drive.google.com/.../view&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to change the characteristic, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67309?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 08:09:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dbfde13-517d-4fa6-a954-48794f1f0d50</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dennis,
If you are testing with the Buttonless DFU, please make sure you have enabled service changed characteristic IS_SRVC_CHANGED_CHARACT_PRESENT = 1 on both the bootloader and the application.&lt;/p&gt;
&lt;p&gt;I assume you have written to the DFU control point to tell the application to switch to the bootloader and the reconnect to the bootloader.&lt;/p&gt;
&lt;p&gt;The full log is not attached only a local link, please re-attach it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67307?ContentTypeID=1</link><pubDate>Sat, 05 Nov 2016 13:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d70a848-75a4-4a51-830e-da76b9e43d13</guid><dc:creator>Dennis Lan</dc:creator><description>&lt;p&gt;Hi Hung,
You&amp;#39;re right, I&amp;#39;m testing with the bootloader + application (buttonless DFU).  According to the iOSDFULibrary log, I&amp;#39;m sure that DFU service is discovered from the phone within the line 3, please checkout the full log as the attachment above.&lt;/p&gt;
&lt;p&gt;By the way, I&amp;#39;ll try to use sniffer trace, too.  Thanks for your reply!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS DFU Writing to characteristic failed</title><link>https://devzone.nordicsemi.com/thread/67305?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 13:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:171d96d3-da27-4def-9735-6dc3dda82c74</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dennis,&lt;/p&gt;
&lt;p&gt;Are you testing with the bootloader or with your application+ bootloader ( buttonless DFU ) ?
Seems like the write command to 00001531-1212-EFDE-1523-785FEABCD123 failed. Have you made sure the DFU service is discovered from the phone ?
A &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;sniffer trace&lt;/a&gt; would be useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>