<?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>NRF8001 set Service data in advertisment packets</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23025/nrf8001-set-service-data-in-advertisment-packets</link><description>Hi, I need to set dynamic advertisement data with nRF8001. To achieve this with nRFgo Studio my idea was to set &amp;quot;Service Data&amp;quot; in &amp;quot;Selected fields to advertise&amp;quot; (ACI Bond for example) within GAP settings, create characteristic with property &amp;quot;Set pipe</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Sep 2017 08:07:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23025/nrf8001-set-service-data-in-advertisment-packets" /><item><title>RE: NRF8001 set Service data in advertisment packets</title><link>https://devzone.nordicsemi.com/thread/90581?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 08:07:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f56e5c9-68a2-42c8-a635-fc115869b05b</guid><dc:creator>Romain</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Yes it works fine as you described.
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF8001 set Service data in advertisment packets</title><link>https://devzone.nordicsemi.com/thread/90580?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 10:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:147d7cd7-a4b0-460f-a256-887ddd40e1a6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Romain,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s been awhile since last time I used nRF8001. I quote here an answer from one of my coworker, could you try to follow and let me know if it works:&lt;/p&gt;
&lt;p&gt;=========&lt;/p&gt;
&lt;p&gt;The broadcasted data is sent as Service Data.&lt;/p&gt;
&lt;p&gt;You can change the Service Data during advertising.&lt;/p&gt;
&lt;h1&gt;Steps in nRFgo studio:&lt;/h1&gt;
&lt;h1&gt;Select a broadcast property on one of the Characteristics that you want to Broadcast. (Make sure that the Characteristic is within a Service identified by a Bluetooth UUID and not a vendor UUID) [Choose the DIS as the Service or any other Service using a 16bit UUID].
In the GAP settings tab. Select the “Service data” in the “Selected fields to Advertise”, Make sure that the selection tab (Connect/Bond/Broadcast) corresponds to the ACI Commands that you are using to advertise.
You can choose to put the Service Data in the Advertising packet or in the Scan Response.
Steps in the Code:&lt;/h1&gt;
&lt;p&gt;Use the ACI command OpenAdvPipe to enable the broadcasting of Service Data for the Broadcast pipe that was added in the nRFgo studio.&lt;br /&gt;
Use the utility functions lib_aci_open_adv_pipe or lib_aci_open_adv_pipes
Use the ACI commands (Connect/Bond/Broadcast) to start advertising as usual
Use the ACI command SetLocalData on the broadcast pipe to update the data for the advertising&lt;br /&gt;
Note:
The bit mask that must be supplied is the structure as mentioned in Table 98 of the nRF8001_PS_v.1.0.pdf. (The same structure as in the PipeStatusEvent).&lt;/p&gt;
&lt;p&gt;There is are 2 utility functions to open the pipe in the sdk.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; lib_aci_open_adv_pipe(pipe_number_broadcast); //Open a single pipe
 
  lib_aci_open_adv_pipes(pipe bit mask); //Open multiple pipes
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Result&lt;/h1&gt;
&lt;p&gt;You will see the Advertising tag “Service Data” with the UUID of the Service and the data used the SetLocalData in the advertising.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>