<?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>Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114888/unable-to-pass-2-seconds-for-the-pawr-sync-ad</link><description>Hi Nordic Community I have a problem with the PAwR examples were I&amp;#39;m unable to place a sync interval bigger than 2 secs. 
 The example starts with an interval of 0xFF * 1.25 = 318.75 ms. I altered it to 1 sec and everything works. But if I increase it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Sep 2024 14:15:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114888/unable-to-pass-2-seconds-for-the-pawr-sync-ad" /><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503794?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 14:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56b47864-d81a-4a9f-b9f5-c9bedbdedd43</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;After some testing everything seems to be working ok.&lt;/p&gt;
&lt;p&gt;Solutions:&lt;/p&gt;
&lt;p&gt;1 - PAST does not permit disconnect without a response from the peripheral to the Host about how the synchronization went.&lt;/p&gt;
&lt;p&gt;2 - Updating from sdk 2.5.2 to 2.7.0 fixed the connectivity problem that occurred when trying to synchronize to a Per. Adv. bigger than 2 sec.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503533?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2024 09:29:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24998273-c43d-485f-8909-18a8f637d3a0</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Thank you for the update.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503473?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 22:01:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a75da76f-0136-462b-a0ec-7bcc99524ff2</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;After updating to sdk 2.7.0 the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_conn/README.html"&gt;periodic_adv_conn&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_conn/README.html"&gt;periodic_sync_conn&lt;/a&gt; samples no longer give a sync error. Initially there was also the message received was also garbage, but that was my fault, and now it works as expected. I&amp;#39;m presuming the softdevices controller had a bug in version 2.5.2 that was corrected in future updates.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Tomorrow will do more test and confirm if everything is really working as should.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503465?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 20:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fca124cb-8ec2-4d39-a76b-4a23f50a963e</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;So I went digging in the Bluetooth 5.4 core for more information and found this:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;5.1.13 Periodic Advertising Sync Transfer procedure&lt;/strong&gt;&lt;br /&gt;A Controller may use the Periodic Advertising Sync Transfer procedure to transfer, to a connected peer device, the synchronization information necessary to synchronize to a periodic advertising train (see Section 4.4.3.4). Either the Central or the Peripheral Link Layer initiates this procedure by sending an LL_PERIODIC_SYNC_IND PDU or an LL_PERIODIC_SYNC_WR_IND PDU. The PDU used is determined by the type of the periodic advertising used. For PAwR, the LL_PERIODIC_SYNC_WR_IND PDU shall be used, otherwise the LL_PERIODIC_SYNC_IND PDU shall be used. If the LL_PERIODIC_SYNC_WR_IND PDU is used, then the RspAA shall be set to an Access Address value as specified in Section 2.1.2.&lt;br /&gt;If the Host has enabled receipt of transfers and the Link Layer receives an LL_PERIODIC_SYNC_IND PDU or an LL_PERIODIC_SYNC_WR_IND PDU that describes a periodic advertising train that the Link Layer is neither already synchronized with nor in the process of synchronizing with, the Link Layer shall synchronize with the described periodic advertising train and then notify the Host; it shall also notify the Host if synchronization fails. However, if the PHY field of the LL_PERIODIC_SYNC_IND PDU or the LL_PERIODIC_SYNC_WR_IND PDU has no bits or more than one bit set, or the bit set corresponds to a PHY that the recipient does not support or is reserved for future use, the recipient shall ignore the PDU.&lt;br /&gt;The procedure has completed when an LL_PERIODIC_SYNC_IND PDU or an LL_PERIODIC_SYNC_WR_IND PDU has been sent or received.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;page 2886&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;hr /&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Correct me if I&amp;#39;m wrong but, in the second paragraph where it says &amp;quot;and then notify the Host; it shall also notify the Host if synchronization fails&amp;quot;, it means that the Host (the one giving the Per. Adv. information trough PAST) must be informed of the success of the synchronization.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Applying this to the example it means that the connection established with the Host must be maintained until the synchronization is resolved, has to inform it of the result.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;If this is correct it explains why the example does not work without the delay, but it does explained the example that does not utilize PAST failing. I still have to test it with version 2.7.0 of the sdk, will update when done.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503411?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 13:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e02617-f1f1-4085-bc09-d173330c275d</guid><dc:creator>TheLittleFish</dc:creator><description>[quote userid="111786" url="~/f/nordic-q-a/114888/unable-to-pass-2-seconds-for-the-pawr-sync-ad/503403"]Is it that you tried to change interval_min and interval_max to the value 0x1F40 to get 10 s interval and this worked well when you added 10 seconds delay using&amp;nbsp;&lt;span&gt;k_msleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;10000&lt;/span&gt;&lt;span&gt;) in periodic_adv_rsp sample (and&amp;nbsp;&lt;/span&gt;used both periodic_adv_rsp and periodic_sync_rsp samples)?[/quote]
&lt;p&gt;Yes i followed the low-power examples available in this link&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/periodic-advertising-with-responses-pawr-a-practical-guide"&gt;Periodic Advertising with Responses (PAwR): A practical guide&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote userid="111786" url="~/f/nordic-q-a/114888/unable-to-pass-2-seconds-for-the-pawr-sync-ad/503403"]There are 2 pairs of PAwR samples which should be used for testing. First pair consists of&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_rsp/README.html"&gt;periodic_adv_rsp&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_rsp/README.html"&gt;periodic_sync_rsp&lt;/a&gt;&amp;nbsp;samples and the second pair consists of&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_conn/README.html"&gt;periodic_adv_conn&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_conn/README.html"&gt;periodic_sync_conn&lt;/a&gt;&amp;nbsp;samples. What are you trying to achieve by combining periodic_sync_conn and periodic_adv_rsp?[/quote]
&lt;p&gt;That is my fault it was suppose to be as you have written &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_rsp/README.html"&gt;periodic_adv_rsp&lt;/a&gt; with &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_rsp/README.html"&gt;periodic_sync_rsp&lt;/a&gt; and &amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_conn/README.html"&gt;periodic_adv_conn&lt;/a&gt; with &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_conn/README.html"&gt;periodic_sync_conn&lt;/a&gt;. Altered in update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503403?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 13:04:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3d145c4-0085-44c9-aad6-6e456210da1b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Is it that you tried to change interval_min and interval_max to the value 0x1F40 to get 10 s interval and this worked well when you added 10 seconds delay using&amp;nbsp;&lt;span&gt;k_msleep&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;10000&lt;/span&gt;&lt;span&gt;) in periodic_adv_rsp sample (and&amp;nbsp;&lt;/span&gt;used both periodic_adv_rsp and periodic_sync_rsp samples)?&lt;/p&gt;
&lt;p&gt;There are 2 pairs of PAwR samples which should be used for testing. First pair consists of&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_rsp/README.html"&gt;periodic_adv_rsp&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_rsp/README.html"&gt;periodic_sync_rsp&lt;/a&gt;&amp;nbsp;samples and the second pair consists of&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_conn/README.html"&gt;periodic_adv_conn&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_conn/README.html"&gt;periodic_sync_conn&lt;/a&gt;&amp;nbsp;samples. What are you trying to achieve by combining periodic_sync_conn and periodic_adv_rsp?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pass 2 seconds for the PAwR sync ad</title><link>https://devzone.nordicsemi.com/thread/503314?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2024 20:46:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f54a2b33-19a9-482f-8d57-ee54af3ec52f</guid><dc:creator>TheLittleFish</dc:creator><description>&lt;p&gt;Update:&lt;br /&gt;&lt;br /&gt;Found the problem with the&lt;strong&gt; &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_rsp/README.html"&gt;periodic_adv_rsp&lt;/a&gt;&amp;nbsp;&lt;/strong&gt;and&amp;nbsp;&lt;strong&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_rsp/README.html"&gt;periodic_sync_rsp&lt;/a&gt; &lt;/strong&gt;(PAST) versions.&lt;br /&gt;In the same website give for the 10 s a version of these codes developed for low power is available for download. After analyzing the differences between it and the original, I discovered that if the 10 s delay, before the&amp;nbsp;&lt;em&gt;&lt;strong&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_rsp/README.html"&gt;periodic_adv_rsp&lt;/a&gt;&lt;/strong&gt; &lt;/em&gt;gives an order to disconnect, is removed the program fails. &lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;		err = k_sem_take(&amp;amp;sem_written, K_SECONDS(10));
		if (err) {
			printk(&amp;quot;Timed out during GATT write\n&amp;quot;);
			num_synced--;

			goto disconnect;
		}

		printk(&amp;quot;PAwR config written to sync %d, disconnecting\n&amp;quot;, num_synced - 1);

disconnect:
		//added a delay so that the peer has enough time to sync before disconnection
		//k_msleep(10000); //  &amp;lt;---- This one
		if (default_conn)
		{
			err = bt_conn_disconnect(default_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN);
			if (err) {
					printk(&amp;quot;Failed to disconnect, can be that the connection is already terminated, continue \n&amp;quot;);		
			}
		}
		printk(&amp;quot;Waiting for disconnected\n&amp;quot;);
		k_sem_take(&amp;amp;sem_disconnected, K_FOREVER);
	}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When reducing the delay to 5 s, it give the following error:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;Waiting for periodic sync...
Connected (err 0x00)
New timing: subevent 1, response slot 3
Not synced yet
Disconnected (reason 0x13)
Timed out while synchronizing
[00:01:10.012,603] &amp;lt;err&amp;gt; bt_adv: No valid legacy adv&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Lowering the delay below 10 s makes the error appear, its chance of triggering seams to increase the lower the delay.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;This means that for the &lt;strong&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_sync_rsp/README.html"&gt;periodic_sync_rsp&lt;/a&gt;&lt;/strong&gt; needs for some reason to be in a connection with the&lt;em&gt;&lt;strong&gt; &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/periodic_adv_rsp/README.html"&gt;periodic_adv_rsp&lt;/a&gt;&lt;/strong&gt; &lt;/em&gt;to synchronize.&lt;br /&gt;&lt;br /&gt;Any ideas why this is necessary? &lt;br /&gt;I read a bit of the Bluetooth core but could not find this necessity.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>