<?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 CENTRAL: select which peripheral to connect to from the available ones.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58427/ble-central-select-which-peripheral-to-connect-to-from-the-available-ones</link><description>Hi all, I am checking the Uart central and peripheral projects, also the one with usbd and I have one question that may be obvious for you. How do you select the peripheral to connect to? 
 
 I see there is a scan_start function and the NRF_BLE_SCAN_EVT_CONNECTED</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Feb 2020 19:49:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58427/ble-central-select-which-peripheral-to-connect-to-from-the-available-ones" /><item><title>RE: BLE CENTRAL: select which peripheral to connect to from the available ones.</title><link>https://devzone.nordicsemi.com/thread/237246?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 19:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d09f66ae-8fc0-49b8-9bfa-b18f9dcdc0c0</guid><dc:creator>manuwind</dc:creator><description>&lt;p&gt;Thank you very much, I will check those other options as well.&lt;/p&gt;
&lt;p&gt;In the final app I thing I&amp;#39;ll print the found peripherals so the user can choose among them.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE CENTRAL: select which peripheral to connect to from the available ones.</title><link>https://devzone.nordicsemi.com/thread/237115?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 12:25:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99db9db2-a5be-46d6-a616-af3360051946</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The ble_app_uart_c will connect to the first peripheral it finds that is advertising the UUID of the Nordic UART Service(NUS).&lt;/p&gt;
&lt;p&gt;This is done by setting a UUID filter in&amp;nbsp;scan_init(). Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    err_code = nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_UUID_FILTER, &amp;amp;m_nus_uuid);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_UUID_FILTER, false);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The scan module supports different types of filters. Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Types of filters.
 */
typedef enum
{
    SCAN_NAME_FILTER,       /**&amp;lt; Filter for names. */
    SCAN_SHORT_NAME_FILTER, /**&amp;lt; Filter for short names. */
    SCAN_ADDR_FILTER,       /**&amp;lt; Filter for addresses. */
    SCAN_UUID_FILTER,       /**&amp;lt; Filter for UUIDs. */
    SCAN_APPEARANCE_FILTER, /**&amp;lt; Filter for appearances. */
} nrf_ble_scan_filter_type_t;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>