<?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>BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40384/ble-manual-connect-and-disconnect</link><description>Dear Nordic Team, 
 Thanks for supporting. 
 I am working in ble_app_uart_c example in this example is automatically connect with its peripheral. But i need to connect and disconnect manually like nRF_UART android app. please support anyone. 
 My HW </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Nov 2018 08:37:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40384/ble-manual-connect-and-disconnect" /><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157655?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 08:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68b22998-d786-4cf1-bb27-ba11afa8f9cd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I do not immediately see the problem. But going back to your &lt;a href="https://devzone.nordicsemi.com/support-private/support/217708#permalink=410634"&gt;post from two days ago&lt;/a&gt; you wrote that there is a system reset. As I mentioned, that is typically due to an error check so seeing which error check was hit and what the error code was will typically show you the issue in a few minutes. Can you check that? (You can refer to this &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/an-introduction-to-error-handling-in-nrf5-projects"&gt;blog post&lt;/a&gt; for an intro into error handling in the SDK if that is new to you).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157632?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 06:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89710170-aa4e-4951-9dc9-d0883d561357</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;yes, already tested same like your comment. Here with enclosed my code, i dont know what i am doing wrong . please guide me.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/18418.main.c"&gt;devzone.nordicsemi.com/.../18418.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157551?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 14:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d77bc11d-e5ed-4043-8e5f-31ce7f22463e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Yes, you can adjust the scan parameters and filters runtime. But you have to stop scanning by calling nrf_ble_scan_stop() before you reconfigure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157479?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 11:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b553ba6-c260-42b3-be4c-c38877f84193</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;possible to change scan filter while running time ? because while scanning i will set UUID scaning , when establish connection i will set UUID and ADDR both scanning. The above examples are one time initialization process, i want to random scan initialization. Is this possible ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157417?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 08:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33e49a2c-28c5-424a-b756-6ccc7f9ae932</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;It should be straight-forward. You can see how it is used in two examples in SDK 15.2:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;examples\ble_central\ble_app_gatts\main.c (around line 693)&lt;/li&gt;
&lt;li&gt;examples\ble_central\ble_app_hrs_c\main.c (around line 882)&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157396?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 04:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b77cc81-7407-4933-b41c-cf792d64745f</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;i want to know filter settings are correct based on &lt;span&gt;SCAN_ADDR_FILTER&amp;nbsp;&lt;/span&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157317?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 13:47:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:892230f8-af71-43ec-bbca-84792540a952</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If the system goes to reset that is typically due to an APP_ERROR_CHECK. If you build debug version of the project and use logging, you should see which file, line and error code triggered this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157247?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 09:50:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ab76738-722e-47d7-b73e-cf8b44853c44</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;@&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;as per your suggestion&amp;nbsp;&lt;span&gt;set&amp;nbsp;init_scan.connect_if_match = false scan the device list then try to connect like below&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;init_scan.connect_if_match = true;&lt;br /&gt; init_scan.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;&lt;/p&gt;
&lt;p&gt;err_code = nrf_ble_scan_init(&amp;amp;m_scan, &amp;amp;init_scan, scan_evt_handler);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_ADDR_FILTER, &amp;amp;GI8u_Device_List[GI8u_Device_ID-1][0]);&amp;nbsp;&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_ADDR_FILTER, false);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;after calling this function the system goes to reset. I thing filter setting may be wrong ?. please help further process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157215?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 07:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59f34b9d-1e9d-4c87-95bd-cf76ef8edd57</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;now scanning process ok. little error in&amp;nbsp;&lt;span&gt;ble_evt_handler i am just modified&amp;nbsp;ble_gap_evt_adv_report_t const * p_adv_report to&amp;nbsp;ble_gap_evt_adv_report_t const * p_adv_report= &amp;amp;p_gap_evt-&amp;gt;params.adv_report.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;then i will try connection process in case any issue i will come back. Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157214?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 07:39:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78f67d55-37f1-4d71-bfa4-70e596abf5f3</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;also i am tried as per your suggestion set&amp;nbsp;init_scan.connect_if_match = false and add some code in&amp;nbsp;ble_evt_handler like below&amp;nbsp;&lt;/p&gt;
&lt;p&gt;case BLE_GAP_EVT_ADV_REPORT:&lt;br /&gt; &lt;br /&gt; ble_gap_evt_adv_report_t const * p_adv_report;&lt;br /&gt; uint16_t data_len;&lt;br /&gt; data_len = p_adv_report-&amp;gt;data.len;&lt;/p&gt;
&lt;p&gt;if (ble_advdata_name_find(p_adv_report-&amp;gt;data.p_data,data_len,&amp;quot;Nordic_UART&amp;quot;))&lt;br /&gt; {&lt;br /&gt; &lt;br /&gt; NRF_LOG_INFO(&amp;quot;Scan Device %02x%02x%02x%02x%02x%02x&amp;quot;,&lt;br /&gt; p_adv_report-&amp;gt;peer_addr.addr[0],&lt;br /&gt; p_adv_report-&amp;gt;peer_addr.addr[1],&lt;br /&gt; p_adv_report-&amp;gt;peer_addr.addr[2],&lt;br /&gt; p_adv_report-&amp;gt;peer_addr.addr[3],&lt;br /&gt; p_adv_report-&amp;gt;peer_addr.addr[4],&lt;br /&gt; p_adv_report-&amp;gt;peer_addr.addr[5]&lt;br /&gt; );&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;break;&lt;/p&gt;
&lt;p&gt;but unable to process&amp;nbsp;&lt;span&gt;ble_advdata_name_find () this function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157199?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 04:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95728bc5-bca2-4cb7-95aa-10c7c7b9876d</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;in SDK12.3.0 i have complete my requirement. Function&amp;nbsp;on_ble_evt have&amp;nbsp;BLE_GAP_EVT_ADV_REPORT field, here i will do filter name(p=strstr((const char *)p_adv_report-&amp;gt;data,&amp;quot;Nordic_UART&amp;quot;)) , list the peripherals and connect if match UUID&amp;nbsp; (is_uuid_present(&amp;amp;m_nus_uuid, p_adv_report)). but i dont have option&amp;nbsp;in SDK15.2.0 .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/157061?ContentTypeID=1</link><pubDate>Tue, 13 Nov 2018 11:45:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a42fa507-5895-45d1-b065-97717e7cc337</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. Then, referring to NUS central example, you should do the initial scanning with&amp;nbsp;connect_if_match set to false to find all peripherals that match your criteria. Then when you subsequently want to connect to a specific peripheral you adjust the criteria so that it only matches one of them (typically filtering on the BLE address using SCAN_ADDR_FILTER). Then set connect_if_match to true before you start to scan so that it will connect to the peripheral with the specific address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/156993?ContentTypeID=1</link><pubDate>Tue, 13 Nov 2018 07:29:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1156e0d6-2e5e-474a-8edd-6a35fc743cc6</guid><dc:creator>Murugan</dc:creator><description>&lt;p&gt;Thanks for reply. connection and disconnection ok , but I want to collect the peripheral list and choose one from the list for connection. Here when we start scan its automatically connected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Flow : 1) Start Scan 2) List the&amp;nbsp;&lt;span&gt;peripheral 3) Choose one from list for connection 4) Then Disconnect when we need&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE manual connect and Disconnect</title><link>https://devzone.nordicsemi.com/thread/156843?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 10:14:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91dbf254-27ea-4092-8d4e-b6d67adfc412</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;ble_app_uart_c example uses the scan module and configures it so that it will automatically connect if it finds a peripheral with the NUS service. If you want to control weather to connect or disconnect yourself I would say that the most natural would be to modify the example so that it only calls scan_start() (which in turn calls nrf_ble_scan_start()) when you want to connect, or instance after a button press. You may also want to stop scanning after a timeout or for another reason. In that case you can call nrf_ble_scan_stop(). Similarly you could use a button press to decide if you should call&amp;nbsp;sd_ble_gap_disconnect() to disconnect (allready implemented in the example, just search for BSP_EVENT_DISCONNECT).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>