<?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>Determining BLE phy mode of connection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62539/determining-ble-phy-mode-of-connection</link><description>I&amp;#39;m using s140_nrf52_6.1.1_softdevice and nRF5_SDK_15.3.0_59ac345 on a nRF52840. 
 We are trying to verify that, indeed, we are successfully entering and using coded phy mode. We don&amp;#39;t seem to see any effective range difference between 1 Mbps mode and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Jun 2020 19:05:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62539/determining-ble-phy-mode-of-connection" /><item><title>RE: Determining BLE phy mode of connection</title><link>https://devzone.nordicsemi.com/thread/255852?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2020 19:05:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:970789d3-f71b-4822-b690-221a7553ae94</guid><dc:creator>jhotvedt</dc:creator><description>&lt;p&gt;Thank you. This was very helpful. But, yes, it would be nice for debugging purposes to have an API call that simply reported the phy for a given connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determining BLE phy mode of connection</title><link>https://devzone.nordicsemi.com/thread/255848?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2020 17:37:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d5403eb-4df4-45a7-bd91-f04e1ca6602e</guid><dc:creator>Mishka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;yes, it can update phy while connected. The change will affect only the requested connection so it&amp;#39;s possible to have different phys for different connections. On the local side the BLE_GAP_EVT_PHY_UPDATE_REQUEST event will be generated and to close the deal the local may respond with the sd_ble_gap_phy_update(). In turn, this will generate the BLE_GAP_EVT_PHY_UPDATE event from where you may know that the phy was actually changed and how. The update procedure is nicely described with the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___g_a_p___c_e_n_t_r_a_l___p_h_y___u_p_d_a_t_e.html"&gt;SoftDevice message sequence charts&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By the way, because the code above misses handler for the request case, it might never get into the BLE_GAP_EVT_PHY_UPDATE if the change were originated by a remote. However, since the scan is preformed solely with the coded phy the connection shall also be established over the coded phy - because this is the only phy for the peripheral to advertise on in order to get connected, and AFAIU this is the peripheral which enforces the coded phy for the connection.&lt;/p&gt;
&lt;p&gt;It seems that for the range measurements it might be reasonable to connect over 1M phy, and then explicitly move to the coded phy. The question still though, is there any possibility to know the actual phy for a connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determining BLE phy mode of connection</title><link>https://devzone.nordicsemi.com/thread/255826?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2020 14:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a75f4a0-f3b9-4d94-b0bb-5b034edc8e81</guid><dc:creator>jhotvedt</dc:creator><description>&lt;p&gt;Okay, this is very good to know. Thank you.&lt;/p&gt;
&lt;p&gt;Your response prompts one&amp;nbsp;more question. Once a connection has been established, can the peripheral device switch phy mode &lt;strong&gt;while connected&lt;/strong&gt; by simply calling&amp;nbsp;sd_ble_gap_phy_update() with a different phy? Or would we have to disconnect and have the peripheral begin advertising over the desired phy?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determining BLE phy mode of connection</title><link>https://devzone.nordicsemi.com/thread/255776?ContentTypeID=1</link><pubDate>Thu, 18 Jun 2020 12:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:175304d0-6b44-4208-bb48-29e3d066529d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Jay,&lt;/p&gt;
&lt;p&gt;If the central has received the adv packets on CODED (primary and secondary) then the connect request will also be sent on the same PHY and by defaul the connection established will be on the same PHY as the connect request sent, in your case, that is CODED. Hence your application will not receive any new request of PHY change since it is by spec that the connection is established on CODED and there is no need to let the application know about this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;to get the&amp;nbsp;BLE_GAP_EVT_PHY_UPDATE event, you can call sd_ble_gap_phy_update and force the softdevice to give you an&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_PHY_UPDATE&amp;nbsp; where you can verify which PHY yhe connection is on.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>