<?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>Distinguish between Coded S2 and S8 (NRF52840)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107755/distinguish-between-coded-s2-and-s8-nrf52840</link><description>Hi, 
 I&amp;#39;m trying to understand how I exactly can differentiate between CODED S=2 and S=8. I&amp;#39;ve experimented with the BLE fundamentals Lesson 3, Exercise 2 and set the PHY modes (1M, 2M, S2 and S8) (Also CONFIG_BT_CTLR_PHY_CODED =y is set in prj.conf)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Aug 2024 05:35:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107755/distinguish-between-coded-s2-and-s8-nrf52840" /><item><title>RE: Distinguish between Coded S2 and S8 (NRF52840)</title><link>https://devzone.nordicsemi.com/thread/500502?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 05:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df8465ac-2501-4813-9106-862a0ad5554f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Fabio&lt;/p&gt;
&lt;p&gt;This config only enables support for the Bluetooth 5.0 Coded PHY in the controller. You still need to enable it in the application. Here it seems like you&amp;#39;re setting the preferred PHY in the connection parameters, but the device likely still advertises in 1MBPS PHY. I&amp;#39;d recommend checking out the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/samples/bluetooth/peripheral_hr_coded/README.html"&gt;peripheral_hr_coded sample available here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinguish between Coded S2 and S8 (NRF52840)</title><link>https://devzone.nordicsemi.com/thread/500451?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2024 14:23:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87b1a3ef-746a-43fe-b2c3-aa0cb2bf828f</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;I&amp;#39;m try same exercise to test different Coded PHY, but settings as below into the update_phy function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	const struct bt_conn_le_phy_param preferred_phy = {
		.options = BT_CONN_LE_PHY_OPT_CODED_S8,
		.pref_rx_phy = BT_GAP_LE_PHY_CODED,
		.pref_tx_phy = BT_GAP_LE_PHY_CODED,
	};
	err = bt_conn_le_phy_update(conn, &amp;amp;preferred_phy);
	if (err) {
		LOG_ERR(&amp;quot;bt_conn_le_phy_update() returned %d&amp;quot;, err);
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;also I&amp;#39;ve enabled the Kconfig&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#569cd6;"&gt;CONFIG_BT_CTLR_PHY_CODED&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;into the prj.conf file but the log always write PHY updated. New PHY: 1M.&lt;/p&gt;
&lt;p&gt;Also by nRF Connect App (Android) it give in Log view PHY = LE 1M.&lt;/p&gt;
&lt;p&gt;How to be sure about the mode?&lt;/p&gt;
&lt;p&gt;Thanks and best regards.&lt;/p&gt;
&lt;p&gt;Fabio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinguish between Coded S2 and S8 (NRF52840)</title><link>https://devzone.nordicsemi.com/thread/466472?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 11:40:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89cc6f87-49ce-48a5-af66-b6110cba64b8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;So, after looking at this it seems you&amp;#39;re reading the incorrect defines here.&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;code&gt;struct bt_conn_le_phy_info&lt;/code&gt; &amp;nbsp;only provides &lt;code&gt;uint8_t tx_phy&lt;/code&gt; and &lt;code&gt;uint8_t rx_phy&lt;/code&gt; &amp;nbsp;and only correspond to 1MBPS PHY, 2MBPS PHY and CODED PHY, so you should look at these instead of the&amp;nbsp;&lt;strong&gt;BT_CONN_LE_PHY_OPT_CODED&lt;/strong&gt; parameters.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;pre class="ui-code" data-mode="text"&gt;/** All LE PHYs. */
#define BT_CONN_LE_PHY_PARAM_ALL BT_CONN_LE_PHY_PARAM(BT_GAP_LE_PHY_1M |   \
						      BT_GAP_LE_PHY_2M |   \
						      BT_GAP_LE_PHY_CODED, \
						      BT_GAP_LE_PHY_1M |   \
						      BT_GAP_LE_PHY_2M |   \
						      BT_GAP_LE_PHY_CODED)&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;By hovering BT_GAP_LE_PHY_CODED you can see that it also returns 4 if in use:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706528398197v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;I think you&amp;#39;re running in the option you&amp;#39;re setting, but you will need to check the option&amp;#39;s return code specifically to&amp;nbsp;make sure. Or connect with the nRF Connect app for Android/iOS and see what PHY is used there.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Simon&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinguish between Coded S2 and S8 (NRF52840)</title><link>https://devzone.nordicsemi.com/thread/466288?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 16:01:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31df4c00-cfaf-44d8-82d1-0cb04cd38ace</guid><dc:creator>Phobios</dc:creator><description>&lt;p&gt;I&amp;#39;m using the NRF Connect SDK with version v2.4.2 and the SoftDevice Controller.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tested the peripheral_hr_coded examples now and there the coded connection is used with value 4&lt;br /&gt;(Connected: D9:E5:ED:BF:7E:69 (random), tx_phy 4, rx_phy 4)&lt;/p&gt;
&lt;p&gt;Does value 4 now mean S2 or S8? Or in a simpler question. How can I set the coded PHY to S8 in user code?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Manuel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinguish between Coded S2 and S8 (NRF52840)</title><link>https://devzone.nordicsemi.com/thread/466205?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2024 12:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d0c332e-24ad-40fb-9748-9b7aaa90cf64</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t recall seeing this issue on I.E. the Peripheral Heart Rate Monitor with Coded PHY sample, so can you provide some more details on what exactly you&amp;#39;re doing?&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/nrf/samples/bluetooth/peripheral_hr_coded/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/nrf/samples/bluetooth/peripheral_hr_coded/README.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What SDK version and what Bluetooth controller are you using exactly, the SoftDevice Controller or Zephyr Controller? Then I can confirm this on my end and potentially report it internally.&lt;/p&gt;
&lt;p&gt;The easiest way to distinguish S2 and S8 in a measurable way would be with throughput I think, as S2 should be able to run up to 500kbps, while S8 is only able run up to 125kbps.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>