<?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>Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64817/enabling-indications-in-buttonless-secure-dfu-service-without-bonds</link><description>Referring to the Nordic message sequence chart in the following link: 
 https://infocenter.nordicsemi.com/index.jsp 
 (Software Development Kit -&amp;gt; Previous Versions of nRF5 SDK -&amp;gt; Libraries -&amp;gt; BLE Services -&amp;gt; Buttonless Secure DFU Service -&amp;gt; Buttonless</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Sep 2020 08:19:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64817/enabling-indications-in-buttonless-secure-dfu-service-without-bonds" /><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/268661?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 08:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc5fc726-86d1-4141-917d-4f0442fa564f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have any DFU host over BLE code written in C. The closest would be the nrfutil repository (or to use nrfutil directly, if you are running it on an nRF52).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Other than that, if you want to do this in a custom project, you should know that the protocol is similar, whether it is serial or BLE. You can read about the protocol &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/lib_dfu_transport_ble.html" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that when you write 0x01 to the buttonless dfu characteristic (if you use that), then the device will reboot. If you are not bonded, then the device will start advertising with BLE address = old address+0x01.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You will still use nrfutil to generate the dfu image, just as if you were to run the update from a computer / mobile phone.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In case it is useful, we have a handful of experimental serial DFU hosts &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h108sjziaxo3m81rkgr1has5r1d72qtu"&gt;here&lt;/a&gt; and &lt;a href="https://github.com/jimmywong2003/nrf-slim-serial-uart-dfu-host-c-code"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/268607?ContentTypeID=1</link><pubDate>Tue, 08 Sep 2020 22:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4968b74-e2f8-4d37-9f2a-4dff3ac2a7a2</guid><dc:creator>ant</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Do you have C code for NRF52 (nrf52840) to be the BLE host?&amp;nbsp; or a series of links that point to how to implement such functionality in C? (Because the end goal is to have the BLE dfu ota capability running in NRF52 which is able to dfu ota update an nrf52 based sensor.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/266160?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 09:32:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:429ce56c-71fa-41e3-9cd2-7f7f48879680</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I am in no way an expert on python. Remember that we work mostly with C programming. Perhaps try something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/IanHarvey/bluepy/pull/151"&gt;https://github.com/IanHarvey/bluepy/pull/151&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have never touched bluepy before, so I have no idea whether this is correct. But if you can use this to get services and characteristic, you should be able to follow the same logic using bluepy.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that if you hover the mouse over the &amp;quot;Secure DFU&amp;quot; and &amp;quot;Buttonless Secure DFU without bonds&amp;quot; in nRF Connect, it will show you the UUID of the service/characteristic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/266062?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 16:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54de6f1a-482c-4033-b6e9-cf9c0157d6bb</guid><dc:creator>ant</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;How do you go about implementing this correct sequence to toggle the remote sensor to broadcasting DfuTarg like in using bluepy in python for example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/265951?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 11:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e54f0af0-b7ad-453a-8496-d546cd1d3140</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;That is correct!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/265839?ContentTypeID=1</link><pubDate>Sat, 22 Aug 2020 05:14:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e116be8-2132-4b83-b391-0a06ce83e09a</guid><dc:creator>ant</dc:creator><description>&lt;p&gt;Thanks for the info and,&lt;/p&gt;
&lt;p&gt;To clarify,&amp;nbsp;the user&amp;nbsp;needs to place and click the mouse cursor within the bright pink rectangle area highlighted below, in order to successfully &amp;quot;click and modify (and type &amp;quot;0001&amp;quot;) into the characteristic UUID to activate the DFU mode of the target sensor, after clicking the &amp;quot;play&amp;quot; button to the right of the text &amp;quot;Buttonless Secure DFU without bonds&amp;quot; - then and only then , would the target sensor reboot into the bootloader and from there advertise &amp;quot;DfuTarg&amp;quot; with the corresponding previous MAC address incremented by 1 i.e. the last octet to the right +1&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="386" src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/Screen-Shot-2020_2D00_08_2D00_21-at-10.00.24-PM.png" width="311" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling Indications in Buttonless Secure DFU Service Without Bonds</title><link>https://devzone.nordicsemi.com/thread/264644?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2020 14:02:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:587cbbf2-d161-429d-a634-e4d5e05b5219</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can experiment with this by using the nRF Connect for Desktop, or nRF Connect for mobile (Android/iOS).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using nRF Connect for Desktop, you can use the &amp;quot;play button&amp;quot; next to the service that you want to enable notifications or indications:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c42aabbec27146bc94c13aa87a308902/pastedimage1597413373103v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The play button will become a square, and the Client Characteristic Configuration will change the value. If a characteristic supports notifications, the&amp;nbsp;&lt;span&gt;Client Characteristic Configuration Description (CCCD) will have the value 0x0001, and if the characteristic supports indications it will be 0x0002. A characteristic can not support both notifications and indications.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The Buttonless DFU characteristic in particular supports indications, so you would want to write 0x0002 to the CCCD (not the buttonless characteristic itself) to enable indications.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To activate the DFU mode, you want to write 0x01 to the characteristic UUID (0x8EC90003-F315-4F60-9FB8-838830DAEA50). You can test this as well in nRF Connect for Desktop/Mobile. If you are using a DK, you should see that LED1 and LED2 will turn on after you write 0x01 to this characteristic, and the device should start advertising as &amp;quot;DfuTarg&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>