<?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>Extending Buttonless DFU app to include UART. Fails when trying to advertise.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68280/extending-buttonless-dfu-app-to-include-uart-fails-when-trying-to-advertise</link><description>HIGH LEVEL: I am simply trying to build the ble_app_uart example on top of the Buttonless DFU example from the NRF SDK. I have confirmed that I can successfully get the default &amp;quot;Nordic_Buttonless&amp;quot; DFU example to work properly. When I try and add the Nordic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Nov 2020 00:52:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68280/extending-buttonless-dfu-app-to-include-uart-fails-when-trying-to-advertise" /><item><title>RE: Extending Buttonless DFU app to include UART. Fails when trying to advertise.</title><link>https://devzone.nordicsemi.com/thread/279832?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2020 00:52:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ac39e81-5ac8-4e97-8f7c-bc53a1022db8</guid><dc:creator>cor10</dc:creator><description>&lt;p&gt;Thanks Hung. This makes sense. I am able to debug and verify that the ble_uuid.type is actually 0x03 rather than the VENDOR_BEGIN type, which is 0x02. I now save this uuid type that is returned from&amp;nbsp;&lt;strong&gt;sd_ble_uuid_vs_add()&lt;/strong&gt; and add this second UUID advertising information to the scan response data in the&amp;nbsp;&lt;strong&gt;advertising_init()&lt;/strong&gt; function before calling&amp;nbsp;&lt;strong&gt;ble_advertising_init()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;`And my custom app now successfully advertises and can perform DFU!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extending Buttonless DFU app to include UART. Fails when trying to advertise.</title><link>https://devzone.nordicsemi.com/thread/279764?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 14:31:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:035331ae-97ab-4ade-a274-017df0f171a9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Corten,&amp;nbsp;&lt;br /&gt;Please try to add the UUIDs to scan response packet and check if you can get it there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a look at &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.0.0%2Fgroup___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga265b4251110a15120d0aa97e5152163b"&gt;sd_ble_uuid_vs_add() &lt;/a&gt;&lt;span&gt;description you can find that&amp;nbsp;p_uuid_type is the output. You need to save this value after you call and use this value&amp;nbsp;when you add the UUID to the advertising packet.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extending Buttonless DFU app to include UART. Fails when trying to advertise.</title><link>https://devzone.nordicsemi.com/thread/279687?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 11:27:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d630855b-f1ff-4c01-807f-f0f9f863e3ab</guid><dc:creator>cor10</dc:creator><description>&lt;p&gt;I forgot to mention it but I&amp;nbsp;already&amp;nbsp;made my code call&amp;nbsp;&lt;strong&gt;services_init()&lt;/strong&gt; before&amp;nbsp;&lt;strong&gt;advertising_init()&lt;/strong&gt;. Doing this resolved a previous error I was getting about invalid parameters, but now I face this new and different error that I described above.&lt;/p&gt;
&lt;p&gt;I will try and change that use of BLE_UUID_TYPE_VENDOR_BEGIN. I only used that because it was the value used for the NUS Service in the ble_app_uart example code. And I confirm that the buttonless DFU init code is called before the nus init code in my services_init() func, so the DFU part calls sd_ble_uuid_vs_add() first. If this is what is truly happening, what should I do next to try and get this to work properly? How can I get it to advertise correctly? Is it just changing this VENDOR_BEGIN type?&lt;/p&gt;
&lt;p&gt;My device name that is advertised is just four letters &amp;quot;TLDB&amp;quot;, and all I am adding is these 2 UUIDs. Should this fit into one advertising packet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Extending Buttonless DFU app to include UART. Fails when trying to advertise.</title><link>https://devzone.nordicsemi.com/thread/279680?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 11:15:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee7eeb55-38d4-4277-b544-12ffc665c571</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Corten,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please make sure you call services_init before you call advertising_init. The reason is that you need to add the NUS UUID base to the softdevice before you can use the UUID type of it.&amp;nbsp;&lt;br /&gt;Also using the&amp;nbsp;BLE_UUID_TYPE_VENDOR_BEGIN as the UUID type is not always correct. You should use what&amp;nbsp;uuid_type value returned from&amp;nbsp;sd_ble_uuid_vs_add() call.&amp;nbsp;&lt;br /&gt;If it&amp;#39;s the first UUID base you register using&amp;nbsp;&lt;span&gt;sd_ble_uuid_vs_add() it will equal to&amp;nbsp;BLE_UUID_TYPE_VENDOR_BEGIN&amp;nbsp;. But if the second one then it will be&amp;nbsp;BLE_UUID_TYPE_VENDOR_BEGIN&amp;nbsp; + 1 .&amp;nbsp;&lt;br /&gt;In this case when you combine NUS and Buttonless DFU, I suspect that the Buttonless DFU has already registered&amp;nbsp;BLE_NORDIC_VENDOR_BASE_UUID using&amp;nbsp;sd_ble_uuid_vs_add() and you may have an issue with the uuid_type.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also, please aware that the advertising packet is only 31 bytes payload with a lot of overhead. If&amp;nbsp; you have a long device name, multiple UUIDs, it may not fit into one advertising packet. You may want to use the scan response if you want to include a 128 bit UUID in the advertising packets.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>