<?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>A phenomenon in which NUS&amp;#39;s Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105102/a-phenomenon-in-which-nus-s-central-stops-midway-while-performing-a-ble-scan</link><description>hello. 
 
 I have two NUS Centrals running at the same time. BLE Scan continues to run during standby. 
 
 
 
 
 
 
 
 
 The problem is that when the peripheral PCB is turned on while the two Centrals are performing BLE Scan, One connection is made to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2024 06:54:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105102/a-phenomenon-in-which-nus-s-central-stops-midway-while-performing-a-ble-scan" /><item><title>RE: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/480574?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 06:54:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5f35ff4-878a-49ee-a1e3-885259a4302d</guid><dc:creator>David_Kim</dc:creator><description>&lt;p&gt;Something somewhat strange happened.&lt;/p&gt;
&lt;p&gt;I created a new and improved PCB, and the above problem disappeared.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What was improved&lt;/p&gt;
&lt;p&gt;- Modify the load capacitor value of the 32.768kHz crystal in the peripheral (refer to the formula)&lt;/p&gt;
&lt;p&gt;- Fixed 2-pin GND disconnection among 4 pins of peripheral and central 32Mhz Crystal&lt;br /&gt;- Change peripheral CONN_INTERVAL related parameters&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[ after ]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS) /**&amp;lt; Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */&lt;br /&gt;#define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS) /**&amp;lt; Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */&lt;br /&gt;#define SLAVE_LATENCY 0 /**&amp;lt; Slave latency. */&lt;br /&gt;#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /**&amp;lt; Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[ Before ]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;//#define MIN_CONN_INTERVAL MSEC_TO_UNITS(400, UNIT_1_25_MS) /**&amp;lt; Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */&lt;br /&gt;//#define MAX_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS) /**&amp;lt; Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */&lt;br /&gt;//#define SLAVE_LATENCY 5 /**&amp;lt; Slave latency. */&lt;br /&gt;//#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(10000, UNIT_10_MS) /**&amp;lt; Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/465367?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 14:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e98e8cc-22ef-4cdb-8cbf-51f6b73e7d25</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just ran the basic samples on two nRF52832 DKs on my end to try and reproduce this, but I&amp;#39;m not able to, as the central that doesn&amp;#39;t get connected to simply disconnects with a 0x3E(&lt;strong&gt;CONN_FAILED_TO_BE_ESTABLISHED&lt;/strong&gt;) or 0x08 (&lt;strong&gt;CONN_TIMEOUT&lt;/strong&gt;) and then starts scanning again on its own. Here is some logging on my end. The peripheral I&amp;#39;m trying to connect to is target EE88A50528C2. Please excuse the other device that it tries connecting to, but there are multiple devices in range here at our office causing this.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1705933325347v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It was never necessary resetting either of the DKs to make them start scanning after &amp;quot;not being the chosen one&amp;quot;, and this was done without any changes to the Nordic UART service central/peripheral example projects in nRF5 SDK v17.1.0. Have you made any changes to the projects on your end that might have trigged this to become an issue? For example some check of the connection state of the central no longer being checked or similar?&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: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/465199?ContentTypeID=1</link><pubDate>Sun, 21 Jan 2024 23:04:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acdefe1d-f1a6-442f-96d8-719cc5f6c2ec</guid><dc:creator>David_Kim</dc:creator><description>&lt;p&gt;HI&lt;/p&gt;
&lt;p&gt;I am already using nRF5_SDK_17.1.0 version.&lt;/p&gt;
&lt;p&gt;thank&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/464985?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 09:54:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75335619-1ab2-4986-8f15-7129f4d55d9e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I understand, can you share what exact SDK version you&amp;#39;re working on? If you&amp;#39;re not on nRF5 SDK v17.1.0 already I&amp;#39;d recommend upgrading to that. We&amp;#39;ll try to reproduce and review this on our side as well and get back to you.&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: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/464705?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 00:55:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17975de4-b9b2-4a96-abe0-0eb4b5a669ba</guid><dc:creator>David_Kim</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;My reply was late because I had to take care of other work first. Please understand.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/105102/a-phenomenon-in-which-nus-s-central-stops-midway-while-performing-a-ble-scan/453342"]I&amp;#39;m struggling a bit to understand you here. Does the basic NUS sample also result in the same behavior that if two centrals with the NUS sample tries to connect to the same peripheral, one will connect while the other will just be stuck trying to connect forever and not restart scanning? And how long are you waiting without seeing any response from the central device that didn&amp;#39;t connect?[/quote]
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;As you said, I conducted the following experiment on the nRF52-DK board to check the operation status of the basic NUS.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;1) Prepare two nRF52-DK boards set to Central and start scanning.&lt;/p&gt;
&lt;p&gt;2) Prepare one nRF52-DK board set to Peripheral and start advertising.&lt;/p&gt;
&lt;p&gt;3) Check debugging messages through serial port&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;As you can see in the window below,&lt;/p&gt;
&lt;p&gt;The periphral was connected to the left cental.&lt;/p&gt;
&lt;p&gt;Looking at the MAC to the right central, it appears that an attempt was made to connect periphreal.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:294px;max-width:541px;" height="294" src="https://devzone.nordicsemi.com/resized-image/__size/1082x588/__key/communityserver-discussions-components-files/4/pastedimage1705538766453v3.png" width="541" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;In other words, the condition of attempting to connect one peripheral to two centrals, which was the problem, was reproduced.&lt;/p&gt;
&lt;p&gt;-&amp;gt; Central, which has failed to connect, stops in the connecting state and does not start scanning again.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;In this state, I turned off the peripheral power,&lt;/p&gt;
&lt;p&gt;- The normally connected Central started scanning again.&lt;/p&gt;
&lt;p&gt;- Central, which failed and stopped during connection, does not start scanning again.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; If Periphal, which was connecting, starts advertising again... the connection is completed and the following operations&amp;nbsp; &amp;nbsp; &amp;nbsp; proceed normally.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;Looking at the results above&lt;/p&gt;
&lt;p&gt;While connecting to a periphreal, the failed central appears to be still waiting for that periphral.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;We need improvement in this area.&lt;/p&gt;
&lt;p&gt;This is because we are working on products that frequently require multiple centrals to be installed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/453342?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 15:33:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0d19231-0c47-455c-b5a9-ef3efe0f92e2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m struggling a bit to understand you here. Does the basic NUS sample also result in the same behavior that if two centrals with the NUS sample tries to connect to the same peripheral, one will connect while the other will just be stuck trying to connect forever and not restart scanning? And how long are you waiting without seeing any response from the central device that didn&amp;#39;t connect?&lt;/p&gt;
&lt;p&gt;What are the conn_params; set to in your application? There should be a connection timeout I think that eventually times out if the peripheral doesn&amp;#39;t respond, and then the scanner will restart when it gets out of the connection function.&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: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/453055?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2023 13:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5392b960-0f0d-4fa8-ba78-93805207293d</guid><dc:creator>David_Kim</dc:creator><description>&lt;p&gt;hi,&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I analyzed the part you provided.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you said, the function static void scan_evt_handler(scan_evt_t const * p_scan_evt) has TIMEOUT.&lt;/p&gt;
&lt;p&gt;However, as you can see from the debugging message above, TIMEOUT was not executed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, I looked at the basic NUS example again and there is no difference.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;case&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRF_BLE_SCAN_EVT_SCAN_TIMEOUT&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;printf&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Scan timed out&lt;/span&gt;&lt;span&gt;\n\r&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;scan_start&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &lt;/span&gt;&lt;span&gt;break&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void scan_evt_handler(scan_evt_t const * p_scan_evt)
{
&amp;#160; &amp;#160; int8_t rssi;
&amp;#160; &amp;#160; ret_code_t err_code;
&amp;#160; &amp;#160; //ble_gap_evt_adv_report_t const *p_adv_report &amp;#160; &amp;#160; &amp;#160;= &amp;amp;p_scan_evt-&amp;gt;params.p_whitelist_adv_report;

&amp;#160; &amp;#160; switch(p_scan_evt-&amp;gt;scan_evt_id)
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;case NRF_BLE_SCAN_EVT_CONNECTING_ERROR:
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;{
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; err_code = p_scan_evt-&amp;gt;params.connecting_err.err_code;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; APP_ERROR_CHECK(err_code);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;case NRF_BLE_SCAN_EVT_CONNECTING_ERROR\n\r&amp;quot;);

&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;} break;

&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;case NRF_BLE_SCAN_EVT_CONNECTED:
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;{
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;rssi = p_scan_evt-&amp;gt;params.p_whitelist_adv_report-&amp;gt;rssi;

&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ble_gap_evt_connected_t const * p_connected =
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;p_scan_evt-&amp;gt;params.connected.p_connected;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;// Scan is automatically stopped by the connection.
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;\n\r&amp;gt; Connecting %02x %02x %02x %02x %02x %02x &amp;#160;%ddBm\n\r&amp;quot;,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[0],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[1],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[2],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[3],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[4],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[5],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;rssi
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; );
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;/*
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;NRF_LOG_INFO(&amp;quot;Connecting to target %02x%02x%02x%02x%02x%02x&amp;quot;,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[0],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[1],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[2],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[3],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[4],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_connected-&amp;gt;peer_addr.addr[5]
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; );
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; */
&amp;#160;

&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;} break;

&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;case NRF_BLE_SCAN_EVT_SCAN_TIMEOUT:
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;{
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;printf(&amp;quot;Scan timed out\n\r&amp;quot;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;scan_start();
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;} break;

&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;default:
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;break;
&amp;#160; &amp;#160; }
}&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;And I looked at the nrf_ble_scan_connect_with_target() function where the actual connection is made.&lt;br /&gt;nrf_ble_scan_stop(), which again stops scanning; There is a function.&lt;br /&gt;&lt;br /&gt;Likewise, there seems to be no problematic differences from the basic NUS source.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void nrf_ble_scan_connect_with_target(nrf_ble_scan_t &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; const * const p_scan_ctx,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;ble_gap_evt_adv_report_t const * const p_adv_report)
{
&amp;#160; &amp;#160; ret_code_t err_code;
&amp;#160; &amp;#160; scan_evt_t scan_evt;

&amp;#160; &amp;#160; &amp;#160;int8_t rssi;

&amp;#160; &amp;#160; // For readability.
&amp;#160; &amp;#160; ble_gap_addr_t const &amp;#160; &amp;#160; &amp;#160; &amp;#160;* p_addr &amp;#160; &amp;#160; &amp;#160; &amp;#160;= &amp;amp;p_adv_report-&amp;gt;peer_addr;
&amp;#160; &amp;#160; ble_gap_scan_params_t const * p_scan_params = &amp;amp;p_scan_ctx-&amp;gt;scan_params;
&amp;#160; &amp;#160; ble_gap_conn_params_t const * p_conn_params = &amp;amp;p_scan_ctx-&amp;gt;conn_params;
&amp;#160; &amp;#160; uint8_t &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; con_cfg_tag &amp;#160; = p_scan_ctx-&amp;gt;conn_cfg_tag;


&amp;#160; &amp;#160; rssi = p_adv_report-&amp;gt;rssi;
&amp;#160; &amp;#160; printf(&amp;quot;&amp;gt; ble_scan RSSI Filter: %ddBm&amp;quot;, rssi);
&amp;#160; &amp;#160; if( rssi &amp;lt; gRSSI_Filter_mode )
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot; ble_scan_connect_with_target - RSSI Filter fail\n\r&amp;quot;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; return;
&amp;#160; &amp;#160; }
&amp;#160; &amp;#160;

&amp;#160; &amp;#160; // Return if the automatic connection is disabled.
&amp;#160; &amp;#160; if (!p_scan_ctx-&amp;gt;connect_if_match)
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; return;
&amp;#160; &amp;#160; }

&amp;#160; &amp;#160; // Stop scanning.
&amp;#160; &amp;#160; nrf_ble_scan_stop();

&amp;#160; &amp;#160; memset(&amp;amp;scan_evt, 0, sizeof(scan_evt));

&amp;#160; &amp;#160; // Establish connection.
&amp;#160; &amp;#160; err_code = sd_ble_gap_connect(p_addr,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_scan_params,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; p_conn_params,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; con_cfg_tag);

&amp;#160; &amp;#160; printf(&amp;quot;&amp;gt; ble_scan_connect Connecting\n\r&amp;quot;);

&amp;#160; &amp;#160; scan_evt.scan_evt_id &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;= NRF_BLE_SCAN_EVT_CONNECTING_ERROR;
&amp;#160; &amp;#160; scan_evt.params.connecting_err.err_code = err_code;

&amp;#160; &amp;#160; printf(&amp;quot;&amp;gt; ble_scan Connection status: %d\n\r&amp;quot;, err_code);

&amp;#160; &amp;#160; // If an error occurred, send an event to the event handler.
&amp;#160; &amp;#160; if ((err_code != NRF_SUCCESS) &amp;amp;&amp;amp; (p_scan_ctx-&amp;gt;evt_handler != NULL))
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; p_scan_ctx-&amp;gt;evt_handler(&amp;amp;scan_evt);
&amp;#160; &amp;#160; }

}&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The conclusive problem is that case NRF_BLE_SCAN_EVT_SCAN_TIMEOUT: does not occur.&lt;br /&gt;Why is that so? I can&amp;#39;t find the difference.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/453039?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2023 12:50:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:947f840c-8619-4e6e-8098-594ca9a22e5b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;From the bottom screenshot you provided it seems like both central tries to connect to the peripheral at the same time, as &lt;strong&gt;ble_scan_connect Connecting&amp;nbsp;&lt;/strong&gt;is printed on both sides. If so it makes sense that both devices stops scanning and tries to connect, however only one of them will be able to and then it depends how the central handles a connection procedure that doesn&amp;#39;t end up connecting.&lt;/p&gt;
&lt;p&gt;In the default NUS example project in the nRF5 SDK, the scan_evt_handler handles scan events, where scanning is stopped when it gets a connection event, but it also has a timeout event that&amp;#39;s triggered and restarts scanning if it times out, but you seem to be using a custom ble_scan_connect() function from what I can tell, so maybe it doesn&amp;#39;t handle a timeout?&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: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/452873?ContentTypeID=1</link><pubDate>Sat, 28 Oct 2023 15:00:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b238202-f526-400a-a70a-abfa075da796</guid><dc:creator>David_Kim</dc:creator><description>&lt;p&gt;hi,&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/105102/a-phenomenon-in-which-nus-s-central-stops-midway-while-performing-a-ble-scan/452789"]This sounds like it might be a misunderstanding. When you connect to one central with the peripheral, that peripheral will naturally stop advertising. So if it is the only advertising device your other central is scanning for it might seem like it stops scanning, or have you debugged and specifically see that the radio or scan function stops once the peripheral is connected to the other central?[/quote]
&lt;p&gt;I am connecting two peripheral devices to the PC and checking the debugging messages.&lt;/p&gt;
&lt;p&gt;And when you turn on pheipheal, the above phenomenon occurs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you can see in the captured image below, Central in the left terminal program and Central in the right terminal program&lt;/p&gt;
&lt;p&gt;are running simultaneously.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;ble_evt_handler&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;ble_evt_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;p_ble_evt&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;p_context&lt;/span&gt;&lt;span&gt;&lt;span&gt;) -&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;BLE_GAP_EVT_ADV_REPORT&lt;/div&gt;
&lt;p&gt;&lt;img style="max-height:379px;max-width:831px;" height="379" src="https://devzone.nordicsemi.com/resized-image/__size/1662x758/__key/communityserver-discussions-components-files/4/pastedimage1698504563658v1.png" width="831" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When the two centrals are scanning as shown in the captured image above, when the peripheral is turned on, it looks like the image below.&lt;/p&gt;
&lt;p&gt;( Name filter )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The left central stopped scanning and the right central connected normally.&lt;/p&gt;
&lt;p&gt;What makes me think that the left central has stopped scanning is that debugging messages for scans no longer appear.&lt;/p&gt;
&lt;p&gt;Additionally, even if the peripheral device is turned on, it does not connect.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:351px;max-width:729px;" height="351" src="https://devzone.nordicsemi.com/resized-image/__size/1458x702/__key/communityserver-discussions-components-files/4/pastedimage1698505091738v2.png" width="729" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Isn&amp;#39;t it possible that the scan stops during the connection process and there is no time-out function for failure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A phenomenon in which NUS's Central stops midway while performing a BLE scan.</title><link>https://devzone.nordicsemi.com/thread/452789?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 12:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:418acd38-6f2b-441d-bc64-60c722b8f933</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This sounds like it might be a misunderstanding. When you connect to one central with the peripheral, that peripheral will naturally stop advertising. So if it is the only advertising device your other central is scanning for it might seem like it stops scanning, or have you debugged and specifically see that the radio or scan function stops once the peripheral is connected to the other central?&lt;/p&gt;
&lt;p&gt;To make sure it isn&amp;#39;t the case that you&amp;#39;re only seeing the one peripheral stops advertising you can have two devices advertising that the central will detect. Either another DK running the BLE NUS peripheral sample, or a phone with the nRF Connect app advertising with the Nordic UART Service.&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>