<?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/Using nus characteristics in the DFU Service.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93062/enabling-using-nus-characteristics-in-the-dfu-service</link><description>Hi, I&amp;#39;m using nRF52840 in my project. I successfully integrated the BLE DFU service and its characteristics in my firmware, Now I can update the firmware through the nrf-connect app. Now the issue is I want to enable/use the nus characteristics(Rx and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Oct 2022 13:13:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93062/enabling-using-nus-characteristics-in-the-dfu-service" /><item><title>RE: Enabling/Using nus characteristics in the DFU Service.</title><link>https://devzone.nordicsemi.com/thread/391905?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2022 13:13:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abadb596-1f24-4743-b4de-d1980dd9b690</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Inam,&lt;/p&gt;
&lt;p&gt;You most likely can. I am assuming you are using the nRF5 SDK? I will give some hints below&amp;nbsp;assuming nRF5 SDK v17.1.0.&lt;/p&gt;
&lt;p&gt;I would start by creating a custom replacement of the DFU BLE service files. Modifying the SDK file also works, but I&amp;nbsp;personally recommend against that since it modifies the environment for all projects using the SDK.&lt;/p&gt;
&lt;p&gt;Assuming you only&amp;nbsp;use the TX/RX characteristics in the application you are probably fine with only&amp;nbsp;replacing &lt;em&gt;&lt;strong&gt;ble_dfu.c&lt;/strong&gt;&lt;/em&gt;. You probably will need to make sure your Android app is still happy when it doesn&amp;#39;t find the characteristics once the device goes into bootloader though.&lt;/p&gt;
&lt;p&gt;If you also need it during bootloader operation, assuming you are based on the &lt;em&gt;&lt;strong&gt;secure_bootloader&lt;/strong&gt;&lt;/em&gt; example, you will also need to replace &lt;em&gt;&lt;strong&gt;nrf_dfu_ble.c&lt;/strong&gt;&lt;/em&gt;.&amp;nbsp;It feels like there might be some risk regarding processing, since flashing will take&amp;nbsp;most of the CPU time.&lt;/p&gt;
&lt;p&gt;Regarding what to do in the replacement, you can start by looking at where&amp;nbsp;&lt;em&gt;&lt;strong&gt;characteristic_add()&lt;/strong&gt;&lt;/em&gt; is called in &lt;em&gt;&lt;strong&gt;ble_nus.c&lt;/strong&gt;&lt;/em&gt;. From there you should trace back how the characteristics are built up.&lt;/p&gt;
&lt;p&gt;Hope those&amp;nbsp;serves as a decent starting point for you. Let me know if you need any further help.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>