<?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>Help needed with pairing a central UART over BLE module to a peripheral UART over BLE advertiser using whitelisting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40669/help-needed-with-pairing-a-central-uart-over-ble-module-to-a-peripheral-uart-over-ble-advertiser-using-whitelisting</link><description>Hello, 
 I am attempting to program nRF52 DK modules to communicate using the UART over BLE central and peripheral roles as in the examples provided in SDK 15.2. The data transmitted is a string of 4 characters which is generated on the peripheral end</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Dec 2018 10:10:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40669/help-needed-with-pairing-a-central-uart-over-ble-module-to-a-peripheral-uart-over-ble-advertiser-using-whitelisting" /><item><title>RE: Help needed with pairing a central UART over BLE module to a peripheral UART over BLE advertiser using whitelisting</title><link>https://devzone.nordicsemi.com/thread/160915?ContentTypeID=1</link><pubDate>Mon, 10 Dec 2018 10:10:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81212ba1-a52a-47c0-aecd-23f3c5b61854</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sorry for the long delay.&lt;/p&gt;
&lt;p&gt;Strange, It is working fine for me. If you haven&amp;#39;t made any modifications to the ble_app_uart peripheral example, the act of sending and receiving messages are event driven and handled by interrupts and event handlers. Thus, it sounds like you have modified the example by sending messages directly from main.&lt;/p&gt;
&lt;p&gt;If you upload your main function, I might be able to see where it fails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed with pairing a central UART over BLE module to a peripheral UART over BLE advertiser using whitelisting</title><link>https://devzone.nordicsemi.com/thread/159104?ContentTypeID=1</link><pubDate>Mon, 26 Nov 2018 17:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be26af87-8be0-4eeb-87a1-f3b9736e8166</guid><dc:creator>coop</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for your reply! I implemented the whitelisting functionality in the same way you suggested and noticed that the peripheral paired with the central whose MAC address was recorded in the XX fields of whitelist_addrs = {0, BLE_GAP_ADDR_TYPE_RANDOM_STATIC, {0x XX, 0x XX, 0x XX, 0x XX, 0x XX, 0x XX}}, but I also noticed that the program stops&amp;nbsp;sending the string of characters over BLE. In other words, once the connection is established, the peripheral stops&amp;nbsp;executing any of the code in main.&lt;/p&gt;
&lt;p&gt;Could you please help me figure out why that might be?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;Alin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help needed with pairing a central UART over BLE module to a peripheral UART over BLE advertiser using whitelisting</title><link>https://devzone.nordicsemi.com/thread/158556?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 08:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:010ed495-34da-4466-974e-7e949e6d4186</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;After some trial and error I managed to communicate between the central and peripheral, with whitelisting added to the peripheral side. Here I will go through the steps taken.&lt;/p&gt;
&lt;p&gt;First, you will need the MAC address of the device in which the central is running on. I got it by flashing and running the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fble_sdk_app_nus_eval.html&amp;amp;cp=4_0_0_4_1_2_24"&gt;BLE UART Peripheral example&lt;/a&gt;&amp;nbsp;on the device (it can also be found by reading the FICR register in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2112/how-to-get-6-byte-mac-address-at-nrf51822"&gt;this&lt;/a&gt;&amp;nbsp;manner), then&amp;nbsp;I opened the nRF Connect app on the mobile phone and wrote down the 6 byte MAC address. In my case it was 0xE2:8B:65:53:71:9B. Then I erased the chip, and flashed the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fble_sdk_app_nus_c.html&amp;amp;cp=4_0_0_4_1_0_7"&gt;BLE UART Central Example&lt;/a&gt;&amp;nbsp;onto the chip.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Changes to made to the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fble_sdk_app_nus_eval.html&amp;amp;cp=4_0_0_4_1_2_24"&gt;BLE UART Peripheral Example&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Initially I added this line at the top of main&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_gap_addr_t whitelist_addrs = {0, BLE_GAP_ADDR_TYPE_RANDOM_STATIC, {0x9B, 0x71, 0x53, 0x65, 0x8B, 0xE2}};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;em&gt;advertising_init()&amp;nbsp;&lt;/em&gt;I added this line&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;init.config.ble_adv_whitelist_enabled          = true;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Inside the function&amp;nbsp;&lt;em&gt;advertising_start()&amp;nbsp;&lt;/em&gt;these lines were added&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret_code_t err_code;
ble_gap_addr_t const     *p_whitelist_addr[] = {&amp;amp;whitelist_addrs};
err_code = sd_ble_gap_whitelist_set(p_whitelist_addr, 1);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Eventually, I modified the handler for advertising events (&lt;em&gt;on_adv_evt()&lt;/em&gt;), by including the case&amp;nbsp;BLE_ADV_EVT_WHITELIST_REQUEST&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case BLE_ADV_EVT_WHITELIST_REQUEST:
        {

             // Apply the whitelist.
             err_code = ble_advertising_whitelist_reply(&amp;amp;m_advertising,
                                                       &amp;amp;whitelist_addrs,
                                                       1,
                                                       NULL,
                                                       0);
        } break; //BLE_ADV_EVT_WHITELIST_REQUEST&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Remember to call&amp;nbsp;&lt;em&gt;sd_ble_gap_whitelist_set()&amp;nbsp;&lt;/em&gt;before running&amp;nbsp;&lt;em&gt;ble_advertising_start()&lt;/em&gt;, if not&amp;nbsp;the function&amp;nbsp;&lt;em&gt;sd_ble_gap_adv_set_configure(..)&amp;nbsp;&lt;/em&gt;will fail with the error&amp;nbsp;NRF_ERROR_INVALID_PARAM.&lt;/p&gt;
&lt;p&gt;It is also important to add the function&amp;nbsp;&lt;em&gt;ble_advertising_whitelist_reply(..)&amp;nbsp;&lt;/em&gt;as shown above. The comment above the function declaration says the following:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&amp;quot;The whitelist must be set by the application upon receiving a&amp;nbsp;BLE_ADV_EVT_WHITELIST_REQUEST event.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Hopefully I haven&amp;#39;t forgotten anything, just in case, I have attached the code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-913e0c670c4b4193a0709794ab4c40f7/ble_5F00_app_5F00_uart_5F00_whitelist.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_whitelist.zip&lt;/a&gt;&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>