<?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>adding dfu service, uuid shows dfu uuid but characteristic shows base uuid..</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89751/adding-dfu-service-uuid-shows-dfu-uuid-but-characteristic-shows-base-uuid</link><description>My project is based on &amp;#39;ble_app_uart&amp;#39; and I added dfu service.. 
 so there&amp;#39;s two custom 128bit uuid in my project.. 
 But before this, I only want to test dfu service mode so I comment base uuid (for ble), and I set dfu uuid.. like this. 
 
 
 1. The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jul 2022 07:56:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89751/adding-dfu-service-uuid-shows-dfu-uuid-but-characteristic-shows-base-uuid" /><item><title>RE: adding dfu service, uuid shows dfu uuid but characteristic shows base uuid..</title><link>https://devzone.nordicsemi.com/thread/376127?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2022 07:56:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0314700-c58a-4c95-9d8f-cd1ccca6091d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Lyrics,&lt;/p&gt;
&lt;p&gt;There are a few things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adding a DFU in the advertising packet adds it just there, it does not add the service etc. to your application. Have you done that?&lt;/li&gt;
&lt;li&gt;As this is your application, you&amp;nbsp;probably do not want to add the DFU service UUID (0xFE59), as this is used in the bootloader which implements DFU.&amp;nbsp;If you just want an application that support buttonless DFU, you have to include the DFU service by doing exactly the same as is demonstrated in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_buttonless_dfu.html"&gt;Buttonless DFU Template Application&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;There is normally no point in adding the DFU service UUID in the&amp;nbsp;advertising packet at all. You would still see it after connecting and doing service discovery. (If you look at the buttonless application you will see that it does not include the buttonless DFU service).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In short, there seems to be a lot of&amp;nbsp;confusion so I really&amp;nbsp;suggest spending time to understand the example before you continue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding dfu service, uuid shows dfu uuid but characteristic shows base uuid..</title><link>https://devzone.nordicsemi.com/thread/376119?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2022 07:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc48b6e1-446a-4d94-9dae-faba4685df53</guid><dc:creator>lyrics</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is a lack of complete understanding of bleuuid.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Let me summarize and explain again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/89751/adding-dfu-service-uuid-shows-dfu-uuid-but-characteristic-shows-base-uuid/375998"]I am having problems understanding why you are combining the DFU UUID with the NUS type?&amp;nbsp;[/quote]
&lt;p&gt;It is my mistake to define DFU uuid as custom uuid.&lt;br /&gt;I changed it to 16 bit UUID BLE_DFU_SERVICE_UUID and redefined it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ble_uuid_t m_adv_uuids[] = {{BLE_DFU_SERVICE_UUID, BLE_UUID_TYPE_BLE}};&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After that, I try to connect My Device using nRF Connect app first.&lt;br /&gt;It says &amp;#39;DFU Service&amp;#39; as below&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1657265308170v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But when I try to pair it with my device,&lt;br /&gt;The DFU Service cannot be found due to the following problems.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1657265355293v4.png" alt=" " /&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;F6D8000-... &amp;lt; this is my custom uuid characteristic.&lt;/p&gt;
&lt;p&gt;Why it find base uuid service, not dfu service? Why can&amp;#39;t I find my DFU service?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;this is nRF Toolbox.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1657265490610v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope this explanation is delivered well.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;ll ask you again if there&amp;#39;s anything I don&amp;#39;t understand.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;lyrics&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding dfu service, uuid shows dfu uuid but characteristic shows base uuid..</title><link>https://devzone.nordicsemi.com/thread/375998?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2022 11:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baacc2ac-a624-47fd-abd5-3be62c8b0d26</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am a bit confused. You write about DFU but refer to the NUS UUID. I am not sure about the link here? The DFU UUID is a registered 16 bit UUID&amp;nbsp;BLE_DFU_SERVICE_UUID, and the NUS UUID is a custom UUID that is not registered, so they are different. I am having problems understanding why you are combining the DFU UUID with the NUS type?&amp;nbsp;&lt;/p&gt;
[quote user=""]1.&amp;nbsp;&lt;span&gt;The reason for increasing the type value +1 is &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/54580/with-custom-128bit-uuid-custom-uuid-shows-in-advertising-packet-but-dfu-service-always-shows-base-uuid"&gt;referring to this post&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;Otherwise, uuid shows 0000 value..[/quote]
&lt;p&gt;The type is really just a handle for the UUID base, and that is incremented each time a new base is added. So I cannot say if incrementing by 1 is correct in your case or not, as it depends on the order you add base UUIDs (if this is the problem you could just experiment though, as I assume you do not have that many different base UUIDs?).&lt;/p&gt;
[quote user=""]2. So, advertising uuid shows right value.. but when I try to connect, then service characterisitc value is base uuid value.. not dfu value.[/quote]
&lt;p&gt;The array of advertised UUIDs (your m_adv_uuids) is completely independent, so if you make a mistake here or where you add your services, those will not be the same. If you needed to add 1 to the base you also , you will also need to add 1 elsewhere.&lt;/p&gt;
[quote user=""]and can you recommend using two custom uuid example?[/quote]
&lt;p&gt;The NUS examples are good demonstrations of a custom service. The only thing to note if you want to use two custom services is that the type is incremented for each base you add as mentioned, so when referring to the second add +1, or better, simply refer to the type you get from the call to&amp;nbsp;sd_ble_uuid_vs_add(), as the second parameter there is an output that is set to the type.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>