<?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>ble_advdata_encode and 128-bit UUIDS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67994/ble_advdata_encode-and-128-bit-uuids</link><description>SDK 15.3.0, code is based on examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput. 
 After getting the project to work with nRF Connect on the desktop and Android, we are now trying to get it to work with nRF Connect on iOS13+.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Nov 2020 07:07:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67994/ble_advdata_encode-and-128-bit-uuids" /><item><title>RE: ble_advdata_encode and 128-bit UUIDS</title><link>https://devzone.nordicsemi.com/thread/280239?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 07:07:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49961616-4eb5-4439-a70e-f6b77e6389a5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for the late reply David, Edvin became a new father and is on leave. I am responsible for this thread now.&lt;/p&gt;
[quote user="David Ormand"] Is Nordic recommending the use of the Advertising Module over the previous SD calls?&amp;nbsp; (I&amp;#39;m sure the Advertising Module just wraps the SD calls in an easier-to-use framework.)[/quote]
&lt;p&gt;Depends on your experience with Nordic solutions and also depends on your requirement. Advertising Module is a library and is more heavy weight than using the SD calls directly. A new user would find advertising module easier to use as it handles most of the pre and post processing functionality. But if your application does need the pre and post processing of an advertising packet to be more specific, then you can use the SD calls directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_advdata_encode and 128-bit UUIDS</title><link>https://devzone.nordicsemi.com/thread/278850?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 17:43:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4126c93-c982-450b-a208-6ec9fb8f6129</guid><dc:creator>David Ormand</dc:creator><description>&lt;p&gt;Yes, well, I used the throughput example as a baseline on the advice from another Nordic engineer in view of our concern about throughput.&amp;nbsp; There&amp;#39;s actually not much left of the Central capability left in our Peripheral-only program.&amp;nbsp; I notice that in the UART example, advertising setup is done through the Advertising Module rather than the&amp;nbsp;ble_advdata_encode() and&amp;nbsp;sd_ble_gap_adv_set_configure() API.&amp;nbsp; This is also true of the DFU service (which is included in our custom bootloader) and is presumably Apple-friendly.&amp;nbsp; Is Nordic recommending the use of the Advertising Module over the previous SD calls?&amp;nbsp; (I&amp;#39;m sure the Advertising Module just wraps the SD calls in an easier-to-use framework.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_advdata_encode and 128-bit UUIDS</title><link>https://devzone.nordicsemi.com/thread/278849?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 17:36:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ec6b76c-1a57-46f2-8a86-94e9d0f4e0df</guid><dc:creator>David Ormand</dc:creator><description>&lt;p&gt;Thanks, this was the tip I needed.&amp;nbsp; I discovered I was setting up advertising _before_ setting up the custom service.&amp;nbsp; sd_ble_uuid_vs_add() wasn&amp;#39;t being called to register the vendor-specific UUID until after the the call to&amp;nbsp;ble_advdata_encode().&amp;nbsp; Once I swapped those, I am getting the 128-bit UUID displayed in nRF Connect.&lt;/p&gt;
&lt;p&gt;Along with a truncated Full Name.&amp;nbsp; If I read the spec right, advertising data is (as you say) 31 bytes max.&amp;nbsp; 128-bit UUID plus 1 byte length plus 1 byte data type* is 18 bytes.&amp;nbsp; Flags is 1 byte data plus 1 byte length plus 1 byte data type, or 3 bytes.&amp;nbsp; Name field plus 1 byte length plus 1 byte data type* is n + 2.&amp;nbsp; Max n = 31 - 18 - 3 - 2 = 8.&amp;nbsp; My program is truncating the name to 8 bytes.&lt;/p&gt;
&lt;p&gt;This is interesting. The Apple guidelines say flags and UUID (&amp;quot;Services&amp;quot;) are in the minimum recommended set of advertising data items.&amp;nbsp; The guidelines also say that only three &amp;quot;legacy&amp;quot; advertising PDU types are allowed, with the 31-byte limit on advertising data.&amp;nbsp; Therefore devices with vendor-specific UUIDs are limited to 8-byte names (or 5-byte names, if the also-recommended TX Power Level is included).&amp;nbsp; I think the lesson is to just leave out the UUID and let the iPhone get the services through discovery, like everyone else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_advdata_encode and 128-bit UUIDS</title><link>https://devzone.nordicsemi.com/thread/278555?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 09:17:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebbe9dde-44d6-416d-a729-f72339b3f70c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I wouldn&amp;#39;t recommend using the ble_app_att_mtu_throughput as a starting point for your application. The reason for this is that this example is a bit complex, and really intended only to test throughput. I suggest you look at how e.g. the ble_app_uart example includes the UUID in it&amp;#39;s advertisement.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I know that it only takes&amp;nbsp;BLE_UUID_NUS_SERVICE (0x0001) in advertising_init(), but as long as the service is initialized, there is some softdevice magic that includes the full 128 bit UUID. You can verify this by changing a byte in the UUID, and see that the advertisement changes as well.&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: ble_advdata_encode and 128-bit UUIDS</title><link>https://devzone.nordicsemi.com/thread/278520?ContentTypeID=1</link><pubDate>Thu, 05 Nov 2020 00:31:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ead264ac-4e63-4bb5-b685-0ab5d3dc296e</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="69444" url="~/f/nordic-q-a/67994/ble_advdata_encode-and-128-bit-uuids"]Or is uuid actually supposed to be an index into some array where the 128-bit UUID resides?[/quote]
&lt;p&gt;Look at the type output value for &lt;span&gt;sd_ble_uuid_vs_add&lt;/span&gt;(). &lt;/p&gt;
&lt;p&gt;Note that &amp;quot;Full Name&amp;quot; and 128 Bit UUID probably won&amp;#39;t fit into a 31 byte advertizing data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>