<?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>Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71110/weird-connection-blocking-behavior---nrf52</link><description>HW: MDBT50Q-P1MV2 (Raytac NRF52 module) 
 Android SDK: 2.2.4 
 NRF52840_SDK_VER = 16.0.0 NRF52840_SOFTDEVICE_NUM = SD140 NRF52840_SOFTDEVICE_VER = 7.0.1 
 Currently, we are making NRF52 based devices that will be used in office settings where multiple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Feb 2021 08:58:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71110/weird-connection-blocking-behavior---nrf52" /><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/295013?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 08:58:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59b70d92-b12a-4e22-9455-82ef37fdbf41</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;I have discussed this strange behavior with one of my colleagues, and we agree that changing the address type&amp;nbsp;&lt;strong&gt;shouldn&amp;#39;t&amp;nbsp;&lt;/strong&gt;have anything to do with auto-reconnects, but it seems to do in this case.&lt;/p&gt;
&lt;p&gt;We can safely conclude with this&amp;nbsp;issue being with the OS on the RedMi, as&amp;nbsp;various&amp;nbsp;scanner apps will inherit some BLE functionalities from the phone OS.&lt;/p&gt;
&lt;p&gt;In this case, it seems like the RedMi for some reason is set to autoconnect to devices with a RANDOM_STATIC address for instance, while it will not auto reconnect with PUBLIC addresses for instance. To confirm this, you could do a sniffer trace of this occurring when you&amp;#39;ve set the RANDOM_STATIC address type, as well as one where this does not occur with the PUBLIC address set.&lt;/p&gt;
&lt;p&gt;For this you can use the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRFSniffer&lt;/a&gt; for instance, and upload the sniffer traces here on DevZone so we can examine/compare them.&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: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294857?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 12:48:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:969f40e2-7acd-42a4-be0a-cddc83da5eec</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;I had seen that post, for finding out what could be the practical difference. Still unable to figure out why that would cause this issue to happen though. Am I missing something from that article?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294847?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 12:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b5773b-43fd-4283-aaf8-27222f1cb9ab</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27012/how-to-distinguish-between-random-and-public-gap-addresses"&gt;this thread&lt;/a&gt; to learn of the differences between public and random static GAP addresses.&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><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294780?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 09:53:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6249d6b5-e695-49f6-86cf-e41bf64232d6</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt; I was doing some testing trying to implement what you were saying. While doing that I tried the following that seems to have fixed the problem. Previously we were not setting the address specifically, but now I am just setting the same using the below logic. I Will experiment further to see if it indeed fixes the problem completely. Also, we have some cases in the field where these are happening, we will check there too if this fixes the problem&lt;/p&gt;
&lt;p&gt;By default, the address type seems to be&amp;nbsp;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___a_d_d_r___t_y_p_e_s.html#gabe27b8f22c3a52413fa064c2ee1e4fba"&gt;BLE_GAP_ADDR_TYPE_RANDOM_STATIC&lt;/a&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;and now we are changing it to &lt;a class="el" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___a_d_d_r___t_y_p_e_s.html#gaa5e499423d88b16817efd4d5ec10fd6e"&gt;BLE_GAP_ADDR_TYPE_PUBLIC&lt;/a&gt;&amp;nbsp;but still not sure why it causes the problem in the first place.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    ble_gap_addr_t       m_my_addr;                                                              
    err_code = sd_ble_gap_addr_get(&amp;amp;m_my_addr);
    ERROR_HANDLER_CRITICAL_CHECK(err_code, true);
    m_my_addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
    err_code = sd_ble_gap_addr_set(&amp;amp;m_my_addr);
    ERROR_HANDLER_CRITICAL_CHECK(err_code, true);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294552?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 08:47:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3da756bf-a9ec-475e-aedc-04aa4c87d091</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="Chakradhar Reddy"]Also, what we have seen is that this doesn&amp;#39;t happen with any other BLE device even on this device. Happens with only our access control devices. This is why I strongly feel there could be something in the firmware which can help with this.[/quote]
&lt;p&gt;&amp;nbsp;Yes, it&amp;#39;s strange that this only occurs when using these BLE devices. But if that&amp;#39;s the case, it should persist in more phone models I would think. Can you show me what your BLE_GAP_EVT_DISCONNECTED event looks like?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can try changing the local Bluetooth identity adderss &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=gaef69dc212534adf4b78d211edce2267b"&gt;sd_ble_gap_addr_set&lt;/a&gt;() after disconnecting, if it is changeed, the peer device should not be able to reconnect without being asked to do so by the central.&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: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294466?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 17:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2627f582-55fe-45d5-8777-a21879b68a74</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt; no worries, thanks for getting back soon !!&lt;/p&gt;
&lt;p&gt;Apologies for the confusion in the video. The reconnection is showcased at&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;0:03&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;itself, wherein turning on BLE in the NRF Connect app automatically initiates a connection to multiple devices automatically without me doing anything&lt;/p&gt;
&lt;p&gt;I have not enabled autoconnect as you can see in the video at&lt;strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;0:07&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to take one more video where it is more clear if possible. In that case I&amp;#39;ll try to capture where the device disconnects forcible after 15-20 seconds of inactivity but the android phone reinitiates connection almost immediately.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, what we have seen is that this doesn&amp;#39;t happen with any other BLE device even on this device. Happens with only our access control devices. This is why I strongly feel there could be something in the firmware which can help with this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294353?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 11:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e810aa-55cd-4a7c-90bc-4a64b391b99e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;For some reason your last reply didn&amp;#39;t notify me here on DevZone, so I wasn&amp;#39;t aware that you had an update. Very sorry about this slip-up, so thank you for pinging me/us!&lt;/p&gt;
&lt;p&gt;From the video you shared (sharepoint link) I don&amp;#39;t see where the &amp;quot;automatic reconnection&amp;quot; occurs. Can you try explaining what you&amp;#39;re trying to show in the video?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please make sure that autoConnect is not enabled in the nRFConnect (or custom app you&amp;#39;re using)&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/238098_5F00_2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;How does your peripheral application handle the BLE_GAP_EVT_DISCONNECTED event?&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: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/294309?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 07:59:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a169d49c-6f5e-4214-aaff-254b0f05004f</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;Can anyone help me with this please?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/292383?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 08:14:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5593540-d3f1-46ed-951a-8df9d937cafe</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;UPDATE:&lt;br /&gt;&lt;br /&gt;After clearing the cache and data of the system app named &amp;quot;Bluetooth&amp;quot; in Android, the auto reconnection stopped completely&lt;/p&gt;
&lt;p&gt;After this, I connected one device using nrfConnect once, and then that started reconnecting automatically. But only that one device itself&lt;/p&gt;
&lt;p&gt;Then I connected one more device using nrfConnect. After that, the second device also started reconnecting automatically&lt;/p&gt;
&lt;p&gt;At the same time, if I try to do this on other devices that are present in the office, like a different vendor&amp;#39;s smart lock or a smart band, this doesn&amp;#39;t happen with those devices. Could that mean, there is some issue in the device firmware&amp;#39;s disconnection logic that is causing/indicating the Android somehow that it should reconnect post disconnection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/292362?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 06:22:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13b04faf-aa67-4d37-9559-19c7eabb63f6</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;Hi @ Simonr,&lt;/p&gt;
&lt;p&gt;Please check this link to showcase exactly what is going on&lt;/p&gt;
&lt;p&gt;&lt;a href="https://snglty-my.sharepoint.com/:v:/g/personal/chakradhar_singularity_services/EWnjTAbJR05Atmpb1CnFwd8B02LK5hMnq9AE5jim6wH0LA?e=MgROYm"&gt;https://snglty-my.sharepoint.com/:v:/g/personal/chakradhar_singularity_services/EWnjTAbJR05Atmpb1CnFwd8B02LK5hMnq9AE5jim6wH0LA?e=MgROYm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As soon as I turn on Bluetooth, the device connects to existing devices (even more than one of them). This happened even after uninstalling our app completely&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/292307?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2021 15:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:072e7e21-9d1a-4bd3-bbfc-20a1c1485b75</guid><dc:creator>Charadhar Rddy</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;@Simonr,&lt;/p&gt;
&lt;p&gt;We are not using any bonding/pairing process at all. It is just an open connection and all our encryption happens post that. I did try clearing cache using NRF SDK too to see if that helps. None of that seems to have any effect.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, just realized one more thing today, I got one more phone of the same model, same OS, and everything same. The issue doesn&amp;#39;t happen in that phone though for some reason&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Weird connection blocking behavior - NRF52</title><link>https://devzone.nordicsemi.com/thread/292260?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2021 14:00:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25bb477d-7532-4354-8504-190955b9256f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;First off, I don&amp;#39;t see that you have tried deleting the bonding information on the Android device at all, have you? The behavior you explain seems strange though, especially since only the one phone model shows this behavior. I agree that it seems Android related, as a peripheral device doesn&amp;#39;t have any ways to affect the central&amp;#39;s behavior I&amp;#39;m afraid.&lt;/p&gt;
&lt;p&gt;Can you explain the connection and pairing process in detail for me? I&amp;#39;ll also check with our Android experts whether we have any explanations as to what this could mean.&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>