<?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 buttonless get correct handle for notify but not for write</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47160/dfu-buttonless-get-correct-handle-for-notify-but-not-for-write</link><description>Hallo 
 Im trying to get the system into DFU mode from a PC application (not the Nordic connect) 
 The DFU works perfectly with the Connect application and nordic tools 
 Im developping a PC GUI and Im able to control all other services, 
 However when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 May 2019 20:33:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47160/dfu-buttonless-get-correct-handle-for-notify-but-not-for-write" /><item><title>RE: DFU buttonless get correct handle for notify but not for write</title><link>https://devzone.nordicsemi.com/thread/187365?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 20:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:813218ef-d937-4669-b15a-b5fbb6199d7b</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="67544" url="~/f/nordic-q-a/47160/dfu-buttonless-get-correct-handle-for-notify-but-not-for-write/187330"]it doesn&amp;#39;t work [/quote]
&lt;p&gt;Could you explain what happens when you do this?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You have programmed the bootloader as well, right?&lt;/p&gt;
[quote userid="67544" url="~/f/nordic-q-a/47160/dfu-buttonless-get-correct-handle-for-notify-but-not-for-write/187330"]here it arrived with a slightly different handle[/quote]
&lt;p&gt;So the write fails ?&lt;/p&gt;
&lt;p&gt;If you know the handle, could you try&amp;nbsp;&lt;span&gt;char_write_handle() instead ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is&amp;nbsp;&lt;em&gt;wait_for_response&lt;/em&gt; set to true or false?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless get correct handle for notify but not for write</title><link>https://devzone.nordicsemi.com/thread/187330?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 15:27:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:418371a1-07b9-4965-9979-1abcb86707f0</guid><dc:creator>Ron</dc:creator><description>&lt;pre&gt;Hi,&lt;br /&gt;&lt;br /&gt;This is what I use for enable notifications and it works :&lt;/pre&gt;
&lt;pre&gt;device.subscribe(&lt;span&gt;&amp;#39;8e400001-f315-4f60-9fb8-838830daea50&amp;#39;&lt;/span&gt;, &lt;span&gt;callback&lt;/span&gt;=BlueGigaThread.dfu_event_handler)&lt;br /&gt;&lt;br /&gt;and this is what I use for writing :&lt;br /&gt;device.char_write(&lt;span&gt;&amp;#39;8e400001-f315-4f60-9fb8-838830daea50&amp;#39;&lt;/span&gt;,&lt;span&gt;bytearray&lt;/span&gt;([&lt;span&gt;1&lt;/span&gt;]))&lt;br /&gt;I use the same UUID as I understand that&amp;#39;s ok, anyway it doesn&amp;#39;t work &lt;br /&gt;&lt;br /&gt;the same synatx worked for other services, but as I say here it arrived with a slightly different handle ..&lt;br /&gt;Any ideas ?&lt;br /&gt;Thanks !&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless get correct handle for notify but not for write</title><link>https://devzone.nordicsemi.com/thread/187311?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 14:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0210ef2f-d19b-4732-a420-0353854a9470</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, the UUID seems to have changed from SDK 12 to SDK 13.&lt;/p&gt;
[quote user="EranR"]anyway how would the handle be different between enable notifications and write ?[/quote][quote user=""]&lt;p&gt;&lt;/p&gt;&lt;p&gt;it does get the &amp;#39;enable notifications&amp;#39; correctly with handle 0x19 (which equal to the CCCD Handle)&lt;/p&gt;&lt;p&gt;but when sending a write command it receives it with a 0x18 handle for some reason,&lt;/p&gt;&lt;p&gt;aren&amp;#39;t the handle the same ?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;span&gt;No, the handles are different, so that is as expected. Enable the notification(CCCD handle), and then write 1 to the DFU control point to enter DFU mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless get correct handle for notify but not for write</title><link>https://devzone.nordicsemi.com/thread/187074?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 18:40:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41c8f48e-edec-40fa-bc1e-fceb5a4f6036</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi Siguard,&lt;br /&gt;Thanks for your answer,&lt;/p&gt;
&lt;p&gt;regarding the UUID, Im using sdk12 so maybe it&amp;#39;s different but this is what I have on the ble_dfu.h :#define BLE_DFU_BASE_UUID {{0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F, 0x60, 0x4F, 0x15, 0xF3, 0x00, 0x00, 0x40, 0x8E}} /**&amp;lt; Used vendor specific UUID. */&lt;/p&gt;
&lt;p&gt;see also :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17580/implementing-buttonless-dfu-w-sdk12"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/17580/implementing-buttonless-dfu-w-sdk12&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t find an equivalent explanation for sdk12 on infocenter,&lt;/p&gt;
&lt;p&gt;anyway how would the handle be different between enable notifications and write ?&lt;/p&gt;
&lt;p&gt;Thanks again and have a great day&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU buttonless get correct handle for notify but not for write</title><link>https://devzone.nordicsemi.com/thread/187020?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 14:18:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49d0723b-a35a-41fc-85a9-0d9ec047f2aa</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]-&amp;nbsp;&lt;span&gt;8e400001-f315-4f60-9fb8-838830daea50&lt;/span&gt;[/quote]
&lt;p&gt;That does not seem to be correct. Looking at &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_dfu_transport_ble.html?cp=5_0_3_5_2_2_0#lib_dfu_transport_ble_chars"&gt;this page&lt;/a&gt;, it should be&amp;nbsp;0x8EC90001-F315-4F60-9FB8-838830DAEA50.&lt;/p&gt;
&lt;p&gt;If you are creating your PC application with javascript, you might want to take a look at &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver-js/tree/master/api/dfu/bleTransport"&gt;this repo&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>