<?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>UUID scan</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93872/uuid-scan</link><description>Hi, 
 I do have a question about the ble_app_uart for central device. Now it is set to make connection with the periheral based on the UUID. I can&amp;#39;t find where in the software this is set. Can someone help me out? 
 Because now if I&amp;#39;m changing the device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Nov 2022 13:06:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93872/uuid-scan" /><item><title>RE: UUID scan</title><link>https://devzone.nordicsemi.com/thread/395788?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 13:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72ce48ab-8186-47bc-8fb7-99e35359c2f3</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;If you are using scan filter (UUID) on the central device, you will have to match the UUID of the peripheral, yes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID scan</title><link>https://devzone.nordicsemi.com/thread/395781?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 12:45:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f79f106-5f2e-41a7-bd7e-b65e70b0d5df</guid><dc:creator>Juniorprogrammer</dc:creator><description>&lt;p&gt;So if I&amp;#39;m right, if I make a change in the UUID on the peripheral. I have to make changes in the&amp;nbsp; m_nus_uuid on the central device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID scan</title><link>https://devzone.nordicsemi.com/thread/395779?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 12:42:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a400c8e9-6f73-4e53-9d0a-ce1369e2a363</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;No problem!&lt;/p&gt;
[quote user="Juniorprogrammer"]SCAN_UUID_FILTER includes the UUID of the peripheral device?[/quote]
&lt;p&gt;Not quite. The SCAN_UUID_FILTER just defined the type of filter, i.e an UUID-filter. The &amp;quot;&amp;amp;m_nus_uuid&amp;quot; points to the actual UUID to use when filtering.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID scan</title><link>https://devzone.nordicsemi.com/thread/395732?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 10:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef9acd4f-77b9-4d2c-9939-d7e3c830d348</guid><dc:creator>Juniorprogrammer</dc:creator><description>&lt;p&gt;Thank you Joakim,&lt;/p&gt;
&lt;p&gt;Yes you&amp;rsquo;re right I&amp;rsquo;m working with the nRF5 SDK.&lt;/p&gt;
&lt;p&gt;I find this also but wasn&amp;rsquo;t sure if it is what I&amp;rsquo; searching for. So the SCAN_UUID_FILTER includes the UUID of the peripheral device?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;JP&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID scan</title><link>https://devzone.nordicsemi.com/thread/395719?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 09:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fcdf2c8-7995-4e34-bd8c-985a4c58db96</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;From the information in the question I assume you are working with the nRF5 SDK? Correct me if I&amp;#39;m mistaken.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The following code are copied from the ble_app_uart_c example in the nRF5 SDK v.17.1.0:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for initializing the scanning and setting the filters.
 */
static void scan_init(void)
{
    ret_code_t          err_code;
    nrf_ble_scan_init_t init_scan;

    memset(&amp;amp;init_scan, 0, sizeof(init_scan));

    init_scan.connect_if_match = true;
    init_scan.conn_cfg_tag     = APP_BLE_CONN_CFG_TAG;

    err_code = nrf_ble_scan_init(&amp;amp;m_scan, &amp;amp;init_scan, scan_evt_handler);
    APP_ERROR_CHECK(err_code);

    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;From scan_init() you can see that the scan filter are set (using nrf_ble_scan_filter_set).&amp;nbsp;SCAN_UUID_FILTER is selected and a pointer to the NUS UUID.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID scan</title><link>https://devzone.nordicsemi.com/thread/395716?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 09:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5313606c-c8d6-414d-9064-561754001b4b</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you share which version of the SDK you are working with?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>