<?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>Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120554/change-adv-interval-in-pawr-ble-in-runtime</link><description>Hello, 
 I am using PAwR (Pe riodic Adve rtsing with Response) in coded PHY (S8) with SDK 2.7.0, following the Nordic demo : 
 8562.PAwR_Demo.zip 
 Periodic Advertising with Responses (PAwR): A practical guide - Software - nRF Connect SDK guides - Nordic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Apr 2025 12:25:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120554/change-adv-interval-in-pawr-ble-in-runtime" /><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531354?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 12:25:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9775fcac-34b7-4744-beab-94fa807b023a</guid><dc:creator>Yanis</dc:creator><description>&lt;p&gt;Yes, timing parameters should be adjusted acconrdingly.&lt;/p&gt;
&lt;p&gt;Thank you very much for your relevant suggestions and explanations, I am going to try this out and let you all know.&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531334?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 11:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9833758-43fe-4fcf-b702-cf2c81a50f9d</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;Yes, I have tried this approach.&lt;/p&gt;
&lt;p&gt;The snippet you have shared is indeed a good start. Here is a function that subscribes to the `num` first Subevents:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int listen_to_subevents(struct bt_le_per_adv_sync *sync, uint8_t num)
{
	static uint8_t subevents[256];
	static bool subevents_initialized = false;

	if (!subevents_initialized) {
		for (size_t i = 0; i &amp;lt; ARRAY_SIZE(subevents); i++) {
			subevents[i] = i;
		}
		subevents_initialized = true;
	}

	struct bt_le_per_adv_sync_subevent_params params = {
		.properties = 0,
		.num_subevents = num,
		.subevents = subevents,
	};

	return bt_le_per_adv_sync_subevent(sync, &amp;amp;params);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;A subscriber gets the number of Subevents in the sync callback as part of the `bt_le_per_adv_sync_synced_info` struct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to reserve one Response Slot for each subscriber. 15 Response Slots should fit without problem in a Subevent of 500 ms. You need to adjust the Response Slot Delay so that the broadcaster have time to transmit and the subscribers time to process the request and prepare a response. The Response Slot Spacing should be adjusted so that each Subscriber can send the amount of data needed to be sent.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531320?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 10:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33d4fb67-5d59-4594-93f9-e7fe1a255719</guid><dc:creator>Yanis</dc:creator><description>&lt;p&gt;Interesting approche !&lt;/p&gt;
&lt;p&gt;I did not know that a subscriber can respond to many subevents in one periodic advertising interval. Have you tryed this before ?&lt;/p&gt;
&lt;p&gt;I will have to see if it is not too complex to toggle the subevent listening from one to multiple subevents.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So based on your approche, the subevent to listen to can be changed as the following snippet by changing the &amp;quot;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bt_le_per_adv_sync_subevent_params&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;params&amp;quot; and calling &amp;quot;&lt;/span&gt;&lt;span&gt;bt_le_per_adv_sync_subevent&lt;/span&gt;&lt;span&gt;()&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	struct bt_le_per_adv_sync_subevent_params params;
	
	uint8_t subevents[]; // here define the subevents to listen to
	subevents[0] = pawr_timing.subevent;

	params.properties = 0;
	params.num_subevents = 1;
	params.subevents = subevents;

	bt_le_per_adv_sync_subevent(default_sync, &amp;amp;params);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did not mention that, in the application, we want to have at least 15 subscribers. I guess that, your approche is possible even with many subscribers, since each subscriber will take one slot and the subevent lestening remains the same.&lt;/p&gt;
&lt;p&gt;I agree that ideally, even in standby mode, the subscriber should be able to send something often to make sure it is runing even if there a packet loss.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531301?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 09:23:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59fe614c-1643-424b-9fd4-0330f0caff79</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;I see. If you use for example the following:&lt;/p&gt;
&lt;p&gt;- Subevent Interval: 0.5 seconds&lt;br /&gt;- Number of Subevents: 30&lt;br /&gt;- Periodic Interval: 15 seconds (30 x 0.5)&lt;/p&gt;
&lt;p&gt;During a high data rate session, a subscriber&amp;nbsp;listens to all Subevents and sends a packet in its Response Slot every 0.5 second&amp;nbsp;&lt;/p&gt;
&lt;p&gt;During a low data rate session, a subscriber can choose to listen only to subevent 0, which takes place with an interval of 15 seconds. A subscriber can choose to respond in every 4th of those in order to send something every minute. A good approach is to let the broadcaster decide when it wants a subscriber to show that it is alive.&lt;/p&gt;
&lt;p&gt;Note that packets can get lost so therefore it is probably a good idea to wake up a bit more often than just every minute. Listening at a short period takes very little energy.&lt;/p&gt;
&lt;p&gt;Would this work for your use case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531291?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 08:48:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b74c2ac-e5c1-46d0-a1b2-0f40f291c5af</guid><dc:creator>Yanis</dc:creator><description>&lt;p&gt;In my application, for instance, I want the subscriber to send data during 5 minutes at a high data rate (period of 0.5 s) and sleep for the next 15 minutes (send one packet per minute in the sleep period). I can trigger these routines and change the adv period of PAwR,&amp;nbsp;but the sync is lost and a new sync cycle is required.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531279?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 07:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f7ff2dd-5b0a-404b-8710-7338cd0be1a0</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;A subscriber does not have to respond to Subevents to stay in sync. On the broadcaster side it is up to the application to decide if a subscriber should be treated as in sync or not.&lt;/p&gt;
&lt;p&gt;However, a subscriber that does not receive the AUX_SYNC_SUBEVENT_IND from the broadcaster for a while, will eventually get out of sync from the PAwR train.&lt;/p&gt;
&lt;p&gt;Which subevent(s) and which response slot a Subscriber is allowed to use is completely up to the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A subscriber may call `&lt;span&gt;bt_le_per_adv_sync_subevent()` at any time to change the subset of Subevents to listen to.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You have a lot of freedom when it comes to how PAwR should be used in a system. It is powerful enough to cover almost any use case.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you explain on a higher level what you would like to accomplish it might be possible to guide you even more. But hopefully this is a good start for you. To learn more about PAwR there are good videos available and Nordic Developer Academy is also very good.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Good luck with your project!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531150?ContentTypeID=1</link><pubDate>Wed, 09 Apr 2025 10:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b7db021-b6c0-40a3-9629-9172482cd002</guid><dc:creator>Yanis</dc:creator><description>&lt;p&gt;In this case, do you think that&amp;nbsp;this reset should be done before the timeout (&lt;span&gt;past_param&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;timeout) ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Otherwise the sync would be lost if the adv is stopped for too long (&amp;gt; past_param.timeout).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531148?ContentTypeID=1</link><pubDate>Wed, 09 Apr 2025 10:06:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbffe28f-c3b5-4661-858b-5da83eefbe6e</guid><dc:creator>Yanis</dc:creator><description>&lt;p&gt;Thank you for your&amp;nbsp;reply Jakob,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you mean&amp;nbsp;to switch between one &amp;quot;standby&amp;quot; subevent with no expected response and all subevents to send response ?&lt;/p&gt;
&lt;p&gt;But if no response it will timeout the sync ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Besides, It is the broadcaster that writes the subevents and slots to sych to,&lt;/p&gt;
&lt;p&gt;Changing the subevent to listen to means to go through another sync subscription cycle, isn&amp;#39;t it ?&lt;/p&gt;
&lt;p&gt;The subevent to listen to is set when the&amp;nbsp;sync_cb call back is triggered (bt_le_per_adv_sync_subevent).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531093?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2025 20:07:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17561037-38c4-4cbb-a149-8c3bfa8fa3ad</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;Now I do not know anything about your use case. But, depending on what you want to accomplish, you can also consider another approach.&lt;/p&gt;
&lt;p&gt;Instead of changing the Advertising Interval of the PAwR train on the broadcaster, subscribers can choose a different subset of Subevents to subscribe to. So if you want to save power on a subscriber node, it can listen to only subevent 0 by default, and to all Subevents during selected periods.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change adv interval in PAwR BLE in runtime</title><link>https://devzone.nordicsemi.com/thread/531043?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2025 13:10:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a10ce7e8-4fc8-4920-beae-61708b6e832d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It needs to stop the current advertising, update the parameters, and then restart advertising with the new parameters.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>