<?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>Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17041/changing-advertisement-data-in-every-packet</link><description>Hi, 
 I need to change advertisement data while advertising. The goal is to set new data for every packet. Firstly, I was trying to put new value like this, but it didn&amp;#39;t work: 
 #...
int COUNTER = 1;
uint8_t data[] = &amp;quot;123456789123456&amp;quot;;
#...
//</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Oct 2016 12:41:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17041/changing-advertisement-data-in-every-packet" /><item><title>RE: Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/thread/65364?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 12:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04d8344e-ecb8-4855-8e97-05299819240f</guid><dc:creator>tomole</dc:creator><description>&lt;p&gt;Yes, this is a beacon application. I am not connecting devices to the nRF51, but in next versions of my app it can be needed. I want to advertise my dynamic data which come from another part of my application.
I can send 62 bytes in case I don&amp;#39;t make connections. Am I right?
Thank you for the links. I have already used BLE tutorial.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/thread/65363?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 10:30:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ddf8112-8a35-4384-a4a5-83b929a15a9b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Is this a kind of beacon application? You are not connecting any devices to the nRF51, only advertising? What kind of data are you advertising? Is it temperature or battery voltage that is changing?&lt;/p&gt;
&lt;p&gt;The advertising packet only supports up to 31 bytes, so the scan response data packet is an optional &amp;quot;secondary&amp;quot; advertising payload which allows scanning devices that detect an advertising device to request a second advertising packet. This allows you to send two advertising frames with a total payload of 62 bytes.&lt;/p&gt;
&lt;p&gt;See this &lt;a href="https://devzone.nordicsemi.com/tutorials/5/"&gt;tutorial&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/blogs/782/bluetooth-smart-and-the-nordics-softdevice-part-1-/"&gt;this&lt;/a&gt; blog post about advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/thread/65362?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 10:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9402fc26-64f6-4ae4-9565-dedec88539e4</guid><dc:creator>tomole</dc:creator><description>&lt;p&gt;Thank you, this is a very good option. I am looking forward for the link.
I am using nRF51. For my application every packet is important and I need to count sent packets, give them kind of id and markers.
I am not very clear what do you mean by puting data in the scan response packet. Right now, I don&amp;#39;t have problems with packet size, but in other versions of application it may be an issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/thread/65361?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2016 09:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eac627b1-20c0-4ca0-af54-2d09a0fe7a5b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;I can create a Keil example for you if you want. What chip are using? nRF51 or nRF52?  Why do you need to change advertisement data every packet? You can also put data in the scan response packet, if you can&amp;#39;t fit all the data in the advertisement packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/thread/65360?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2016 14:23:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:073059ac-078e-44d2-b6f4-cdcdd418e1cd</guid><dc:creator>tomole</dc:creator><description>&lt;p&gt;Dear Sigourd,
Thank you for a fast answer. I face some problems with GCC. Are there any Keil example projects for that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing advertisement data in every packet</title><link>https://devzone.nordicsemi.com/thread/65359?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2016 14:38:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9d13a57-7754-44b8-be06-30102eb924e2</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;The solution here is to use &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/group__ble__radio__notification.html?resultof=%22%62%6c%65%5f%72%61%64%69%6f%5f%6e%6f%74%69%66%69%63%61%74%69%6f%6e%5f%69%6e%69%74%22%20"&gt;radio notifications&lt;/a&gt;. You will have to change the advertisement packet every time the radio has been active, which typically is after every advertisement interval. You will have to setup a callback function in &lt;code&gt;ble_radio_notification_init(…)&lt;/code&gt; that changes the advertisement packet.&lt;/p&gt;
&lt;p&gt;A user has uploaded his implementation of this solution &lt;a href="https://github.com/alexvanboxel/eddystone_nrf5x_beacon"&gt;here&lt;/a&gt;, where he switches between different eddystone-format advertising packets using the callback function &lt;code&gt;eddystone_interleave(..)&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>