<?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>Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71182/error-when-trying-to-update-to-2m-phy-with-some-dongles</link><description>I have an nRF 52832 running the SDK 15.2 as peripheral and have tried connecting to different Windows PCs: a laptop running a native bluetooth 5 adapter and a desktop PC running a Laird 851 bluetooth dongle (this is BLE 5 too). 
 
 On the connection event</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Feb 2021 18:29:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71182/error-when-trying-to-update-to-2m-phy-with-some-dongles" /><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/295209?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 18:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11007474-a0ff-45e0-acc9-4162aca3ffb3</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You have updated latest windows 10 build and drivers?&lt;/p&gt;
&lt;p&gt;I could find these threads that seems to indicate that Bluetooth is problematic on the specific DELL model (&lt;span&gt;Dell XPS 13 9350 laptop)&lt;/span&gt;, there is some suggestions in the below threads of things you can try:&lt;br /&gt;&lt;a href="https://www.dell.com/community/Networking-Internet-Bluetooth/Bluetooth-not-working-on-new-XPS-13-9350-Windows-10/td-p/4760065/page/3"&gt;https://www.dell.com/community/Networking-Internet-Bluetooth/Bluetooth-not-working-on-new-XPS-13-9350-Windows-10/td-p/4760065/page/3&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dell.com/community/Networking-Internet-Bluetooth/Windows-10-Bluetooth-Problem/td-p/4626667/page/3"&gt;https://www.dell.com/community/Networking-Internet-Bluetooth/Windows-10-Bluetooth-Problem/td-p/4626667/page/3&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, try to comment out&amp;nbsp;pm_handler_secure_on_connection() and/or pm_conn_secure() if you have it in main.c to see if that make a difference.&lt;/p&gt;
&lt;p&gt;One final comment: Try to set&amp;nbsp;SEC_PARAM_LESC 0, in case the laptop can&amp;#39;t handle this bit.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/295193?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 16:31:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cd485e8-2a7f-4d48-b4bd-52838e5bb2b2</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;I was using the default NRF_SDH_CLOCK_LF_ACCURACY, with a value of 7 which corresponds to NRF_CLOCK_LF_ACCURACY_20_PPM. I changed it to 1, that should be NRF_CLOCK_LF_ACCURACY_500_PPM.&lt;/p&gt;
&lt;p&gt;I got the same result, the nRF aborts transmission anyway and I&amp;#39;m still getting the wrong CRC on the sniffer. At this point the only two clues to go on are the wrong CRC on the sniffer and the logged errors:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;[00:00:39.677,825] &amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x2 requested an ATT MTU of 527 bytes.&lt;br /&gt;[00:00:39.677,856] &amp;lt;debug&amp;gt; nrf_ble_gatt: Updating ATT MTU to 0 bytes (desired: 0) on connection 0x2.&lt;br /&gt;[00:00:39.677,886] &amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gatts_exchange_mtu_reply() returned NRF_ERROR_INVALID_PARAM.&lt;/p&gt;
&lt;p&gt;But they might not be related at all&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/295175?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 15:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4577623-df68-4803-94ca-bc8a0ab38e95</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;What is the ppm tolerance you have set for the 32kHz lfclk when enable the BLE softdevice? Can you try to increase it (e.g. 500ppm for test)?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/295168?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 15:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a2e6e28-4158-48ea-83c1-185e6f08bdae</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;That would log an error to the debug console right? It would also stop execution on the NRF_BREAKPOINT_COND at the end of app_error_fault_handler, or reset the nRF. I can&amp;#39;t see any of these things happening, execution seems to resume normally. What other condition could cause the nRF to stop transmitting altogether?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/295139?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 14:24:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdfd0486-0936-4337-9103-5041403b7e16</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Quickly looking at the&amp;nbsp;screenshot it looks like the peripheral just stop responding, are you sure you are not having an assert? Maybe check the&amp;nbsp;app_error_fault_handler() for any error?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/295133?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 14:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:467a9611-08d1-46a5-8e3a-35ed08c7d28d</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;I contacted the manufacturer, they are looking into it so I&amp;#39;ll update when they get back to me. On the other hand, I&amp;#39;ve found another issue with a different laptop that bears some resemblance to this error, albeit without the incorrect answer issue. I posted it here: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71779/unable-to-pair-with-bluetooth-4-1-windows-10-laptop"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/71779/unable-to-pair-with-bluetooth-4-1-windows-10-laptop&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/294271?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2021 13:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b487523-4893-4170-b90f-ca9671daf4e2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If the problem consistently seems to be triggered by the&amp;nbsp;&lt;span&gt;LL_PHY_REQ, even when changing timing, then I agree that the peer seems to not follow spec no by replying&amp;nbsp;with a correct LL_PHY_UPDATE_IND or LL_UNKNOWN_RSP.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/294071?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 20:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e891b2ea-33e5-4daf-9b6d-3e8f64b082b2</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;I tried adding a delay for the PHY update request and for the&amp;nbsp;&lt;span&gt;sd_ble_gattc_exchange_mtu_request, but I get the same result. I also tried adding a huge delay for the PHY update, like 2s, to make sure that it happens after the pairing has finished, but still the result is the same.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At this point I think it&amp;#39;s not very useful to debug the dongle itself, maybe I could contact the manufacturer to report this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much for the help.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/293845?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 16:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97713157-f86e-42cc-b616-cdec7dab0b84</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;It really does look like the central (master) in this case is misbehaving yes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I know that the application by default for instance may call sd_ble_gattc_exchange_mtu_request() on BLE_GAP_EVT_CONNECTED event in on_connected_evt() in nrf_ble_gatt.c. It may be that the peer can’t handle this call if it’s called early in the connection, can you try to add a nrf_delay_ms(100); before calling sd_ble_gattc_exchange_mtu_request() in on_connected_evt() to see if that affect the issue? Something like:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;static void on_connected_evt(nrf_ble_gatt_t * p_gatt, ble_evt_t const * p_ble_evt)&lt;br /&gt;{&lt;br /&gt;…&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_delay_ms(100); // #include &amp;quot;nrf_delay.h&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; err_code = sd_ble_gattc_exchange_mtu_request(conn_handle, p_link-&amp;gt;att_mtu_desired);&lt;br /&gt;…&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/293827?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 15:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00db65bc-a57d-427d-a416-390636e7add8</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;I checked the link you sent, it shows the same thing I had found earlier. There seems to be no case where the Central should send an LL_PHY_RSP. It should either send LL_PHY_UPDATE_IND or LL_UNKNOWN_RSP (variants 3 and 4). Could this confirm the dongle is out of spec? This would explain the problem I guess. &lt;br /&gt;&lt;br /&gt;Slave latency is set to 0 when calling sd_ble_gap_ppcp_set.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m attaching the first sniffer capture.&lt;/p&gt;
&lt;p&gt;Again, thank you very much for the help&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/293797?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 14:18:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8a5a15d-6cc4-4d5e-a6fa-b563311f94de</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You&amp;nbsp;can find message sequence charts here that describe 7 variants of the PHY update:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_p___p_e_r_i_p_h_e_r_a_l___p_h_y___u_p_d_a_t_e.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_p___p_e_r_i_p_h_e_r_a_l___p_h_y___u_p_d_a_t_e.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think you best look at these on what may occurring, if you still have issues I would need an nRF sniffer log and I may be of more help.&lt;/p&gt;
&lt;p&gt;Have in mind that if you have slave latency enabled, then any packets will appear as retransmits from the central if the peripheral don&amp;#39;t have any data to send during the slave latency period.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/293641?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 20:55:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:032e8553-919c-4bed-901b-d8654683b2d3</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Thank you very much for the advise and answer. I&amp;#39;m working with s132_nrf52_6.1.0_softdevice.&lt;/p&gt;
&lt;p&gt;I can see that the identical packets are re-transmits now, that makes sense. However, I&amp;#39;ve traced all calls to sd_ble_gap_phy_update and this is the only one that is executing.&lt;/p&gt;
&lt;p&gt;I tried the setup again and this time, it works a little differently (not sure what changed, I&amp;#39;m on a different PC but everything is the same). Now, the nRF never answers. I only get a bunch of LL_PHY_RSP after the first and only LL_PHY_REQ. All the LL_PHY_RSP have the same sequential number. After 10 seconds, the communication stops; it would appear that a timeout expires on the nRF because it never got the expected answer. However, if this was the case, I would expect retransmissions, as in the original post.&lt;/p&gt;
&lt;p&gt;What event should the LL_PHY_RSP raise in the nRF? Is it possible I&amp;#39;m not answering and that&amp;#39;s why it&amp;#39;s retransmitting all the time?&lt;/p&gt;
&lt;p&gt;The LL_PHY_RSP packets have an incorrect CRC flag in the sniffer, is this relevant? Could they be malformed packets, and that&amp;#39;s why the nRF never answers?&lt;/p&gt;
&lt;p&gt;This &lt;a href="https://jimmywongiot.com/2020/05/06/how-to-work-with-ble-codec-1mbps-2mbps-and-codec-phy-on-nrf52-series/"&gt;link&lt;/a&gt; shows a few communication diagrams, where it would appear that the Laird dongle is out of spec. When the Slave initiates the PHY change (6.31 - 6.33), the Master never answers LL_PHY_RSP, it can answer either LL_PHY_UPDATE_IND or LL_UNKNOWN_RSP. I have tested both these cases and they work fine: a BT5 laptop accepts and sends LL_PHY_UPDATE_IND to change to 2Mbps, a 4.0 dongle sends LL_UNKNOWN_RSP because it doesn&amp;#39;t support PHY change. Could this be the issue?&lt;/p&gt;
&lt;p&gt;Thank you very much for your time&lt;br /&gt;&lt;br /&gt;Edit: all LL_PHY_RSP packets have the exact same (incorrect, according to wireshark) CRC. This would seem to discard an interference error, more like a systematic error on either the transmission or reception. Also, the LL_PHY_REQ that the nRF keeps sending are also retransmits (they have the same sequence number; the SN and ENSN seem to indicate that the nRF is not processing the LL_PHY_RSP)&lt;br /&gt;&lt;br /&gt;This is the nRF log while this is happening:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:13.761,962] &amp;lt;debug&amp;gt; nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x1.
[00:00:13.761,993] &amp;lt;debug&amp;gt; nrf_ble_gatt: Updating data length to 251 on connection 0x1.
[00:00:13.762,207] &amp;lt;info&amp;gt; app: Connected.
[00:00:13.762,268] &amp;lt;info&amp;gt; app: Restarted advertising.
[00:00:14.014,770] &amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 251 on connection 0x1.
[00:00:14.014,770] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 251
[00:00:14.014,801] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 251
[00:00:14.014,801] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_time: 2120
[00:00:14.014,801] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_time: 2120
[00:00:14.014,831] &amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 251 on connection 0x1.
[00:00:14.014,862] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 251
[00:00:14.014,862] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 251
[00:00:14.014,862] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_time: 2120
[00:00:14.014,892] &amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_time: 2120
[00:00:14.014,892] &amp;lt;info&amp;gt; app: Data length updated to 251 bytes.
[00:00:14.074,707] &amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x1 requested a data length of 251 bytes.
[00:00:14.074,737] &amp;lt;debug&amp;gt; nrf_ble_gatt: Updating data length to 0 on connection 0x1.
[00:00:14.074,768] &amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x1 requested a data length of 251 bytes.
[00:00:14.074,798] &amp;lt;debug&amp;gt; nrf_ble_gatt: Updating data length to 251 on connection 0x1.
[00:00:23.795,196] &amp;lt;info&amp;gt; app: Disconnected.
[00:00:23.795,227] &amp;lt;info&amp;gt; app: Restarted advertising.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error when trying to update to 2M PHY with some dongles</title><link>https://devzone.nordicsemi.com/thread/292541?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 15:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2fa31fc-5f00-4db9-9a80-7d8f8df003b3</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have found in general that initiating exchanges directly on connected event is not a good idea, I have seen many reports&amp;nbsp;that some peers&amp;nbsp;don&amp;#39;t handle this very well. Likely they may have internal state machines that are not ready or can&amp;#39;t handle the exchanges on first connection event. So if possible start an app_timer that may&amp;nbsp;execute&amp;nbsp;the exchange after for instance 100 ms or later. This doesn&amp;#39;t really address your issue, but more of a fyi.&lt;/p&gt;
&lt;p&gt;The 4 identical packets are simply retransmits, you can see the packet content and sequence numbers are not changed, so this means they are simply retransmits until the peer, in this case the nRF52,&amp;nbsp;send anything in reverse direction to acknowledge the packet is received and the sequence numbers are incremented.&lt;/p&gt;
&lt;p&gt;In this case it does indeed look as you have a back-and-forth PHY update requests, so I suggest that you search through your project to find all instances where the&amp;nbsp;sd_ble_gap_phy_update() may be called, likely you have some module in your application that cause this to be called more than once.&lt;/p&gt;
&lt;p&gt;What softdevice number and version are you using here?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>