<?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>SCAN REQUEST HELP</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38615/scan-request-help</link><description>Hello, i am using NRF52840 board with NRF52840 SDK version 15.2 with softdevice 140 Version 6.1. I am using the BLE_NUS_UART_C example and id like to send a scan request to a particular peripheral with uuid A6F30000-74EB-A788-9CC4-68C594834D10. I redefined</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Sep 2018 13:57:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38615/scan-request-help" /><item><title>RE: SCAN REQUEST HELP</title><link>https://devzone.nordicsemi.com/thread/149260?ContentTypeID=1</link><pubDate>Tue, 18 Sep 2018 13:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40988b15-d9f7-422d-9572-d0bb655c64ef</guid><dc:creator>gdutk001</dc:creator><description>&lt;p&gt;Thank you, i managed to get it working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCAN REQUEST HELP</title><link>https://devzone.nordicsemi.com/thread/149224?ContentTypeID=1</link><pubDate>Tue, 18 Sep 2018 12:22:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64b08b29-dd1c-41e7-aad8-4efc1553845d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So if you have opened \nRF5_SDK_15.2.0_9412b96\examples\ble_central\ble_app_uart_c\, then this example by default will connect to peripheral devices which advertise/scan response with a preconfigured UUID:&lt;/p&gt;
&lt;p&gt;#define NUS_BASE_UUID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**&amp;lt; Used vendor specific UUID. */&lt;/p&gt;
&lt;p&gt;In your case you only need to update this BASE UUID, and it will automatically connect to specific peripheral that advertise with that specific UUID in scan response packet.&lt;/p&gt;
&lt;p&gt;But to explain a bit more:&lt;/p&gt;
&lt;p&gt;The UUID is set in&amp;nbsp;ble_nus_c_init() when calling&amp;nbsp;sd_ble_uuid_vs_add().&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;scan_init() the exact filter is set to look for this UUID when calling&amp;nbsp;nrf_ble_scan_filter_set(&amp;amp;m_scan, SCAN_UUID_FILTER, &amp;amp;m_nus_uuid); and&amp;nbsp;nrf_ble_scan_filters_enable(&amp;amp;m_scan, NRF_BLE_SCAN_UUID_FILTER, false);.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;scan_evt_handler() you can receive several events as the BLE scanning module have a match or connect to the device.&lt;/p&gt;
&lt;p&gt;Btw: A scan request is automatically sent when an advertising packet is received, so no special handling for this. You can refer to&amp;nbsp;nrf_ble_scan_on_ble_evt() in nrf_ble_scan.c on how to parse the&amp;nbsp;BLE_GAP_EVT_ADV_REPORT (which include the scan response).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>