<?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>How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16663/how-to-connect-two-nrf-dk-boards-through-ble</link><description>hi,
i have a requirement to connect two nrf51(PCA10028) boards to connect each other. 
 1).if i turn on the Board1 should scan the bluetooth devices if any other bluetooth devices(other Board2(PCA10028)) present it should connect. 
 2).if i send any</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Sep 2016 08:11:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16663/how-to-connect-two-nrf-dk-boards-through-ble" /><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63755?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2016 08:11:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a816acc-81fc-4343-a863-56a2bcc6027e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It looks like it&amp;#39;s your peripheral device that is restarting. This is usually due to an error resulting in a reset. Have you tried debugging your program to see where is stops?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63753?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2016 06:50:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716dbe77-f5bb-488e-b827-9c5d18c79cff</guid><dc:creator>saiteja</dc:creator><description>&lt;p&gt;hey, sorry (i have flashed SDK12  ble_app_uart_c on nrf52 )&lt;/p&gt;
&lt;p&gt;the central device is keep on connecting and disconnecting to peripheral device which is PCA1001 &amp;amp; s110. it is restarting every time. but LED on the nRF52 is keep on glowing.&lt;/p&gt;
&lt;p&gt;how to maintain stable connection.&lt;/p&gt;
&lt;p&gt;the info in the UART is like this..&lt;/p&gt;
&lt;p&gt;Uart_c Scan started&lt;/p&gt;
&lt;p&gt;Connecting to target fd50cc82b8ca&lt;/p&gt;
&lt;p&gt;The device has the Nordic UART Service&lt;/p&gt;
&lt;p&gt;////data which i am recieving from PCA1001&lt;/p&gt;
&lt;p&gt;&amp;lt;3-0:L1,R1&amp;gt;[00]&amp;lt;1-1,2-2,3-3&amp;gt;[00]&amp;lt;1-1,2-2,3-3&amp;gt;[00]&lt;/p&gt;
&lt;p&gt;Disconnected&lt;/p&gt;
&lt;p&gt;Connecting to target fd50cc82b8ca&lt;/p&gt;
&lt;p&gt;The device has the Nordic UART Service&lt;/p&gt;
&lt;p&gt;Disconnected&lt;/p&gt;
&lt;p&gt;Connecting to target fd50cc82b8ca&lt;/p&gt;
&lt;p&gt;The device has the Nordic UART Service&lt;/p&gt;
&lt;p&gt;Disconnected&lt;/p&gt;
&lt;p&gt;Connecting to target fd50cc82b8ca&lt;/p&gt;
&lt;p&gt;The device has the Nordic UART Servic&lt;/p&gt;
&lt;p&gt;////data which i am recieving from PCA1001&lt;/p&gt;
&lt;p&gt;&amp;lt;3-0:L1,R1&amp;gt;[00]&amp;lt;1-1,2-2,3-3&amp;gt;[00]&amp;lt;1-1,2-2,3-3&amp;gt;[00]&lt;/p&gt;
&lt;p&gt;Disconnected&lt;/p&gt;
&lt;p&gt;Connecting to target fd50cc82b8ca&lt;/p&gt;
&lt;p&gt;The device has the Nordic UART Service&lt;/p&gt;
&lt;p&gt;Disconnected&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63754?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2016 14:48:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5a8efed-70b8-45d3-9db1-eb24d449e0a1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;1/2: Then you need to have the name of the device in the advertising data and extract and compare this to your target device name on every BLE_GAP_EVT_ADV_REPORT event in your BLE event handler.&lt;/p&gt;
&lt;p&gt;I have added an example function that can extract the name in my original example above.&lt;/p&gt;
&lt;p&gt;3/4: Can you try to explain your problem in another way? I don&amp;#39;t understand what you mean.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63752?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2016 12:05:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a16ad033-3323-4e04-ad24-45029544968a</guid><dc:creator>saiteja</dc:creator><description>&lt;p&gt;hi,
i made my code peripheral to central&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;if i turn on the the device it is connecting to what ever peripheral device is advertising.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;2)i want to restrict the central device only to connect with specified device name. how i can do this.&lt;/p&gt;
&lt;p&gt;3)if i send data from peripheral to central and displaying it in uart to termite(by pressing button (i handiled this button action)) it is working fine. unable to handle push button events in ble_app_uart_c example.&lt;/p&gt;
&lt;p&gt;4)where as if i send the data from central to peripheral it is only sending once after just connecting to the peripheral device. but by pressing button i am unable to send data using ble_nus_c_string_send().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63751?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2016 11:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9f4f03b-2106-4a79-a0ab-8ce455933f12</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Then you need to change your main-file to use scanning instead of advertising, and implement the relevant handler functions. See the above mentioned examples for how this is done. I also recommend that you read the &lt;a href="https://devzone.nordicsemi.com/tutorials/21/"&gt;BLE central tutorial&lt;/a&gt; to understand the various parts. You also have to edit the CENTRAL_LINK_COUNT and PERIPHERAL_LINK_COUNT parameters, and set the corresponding required &lt;a href="https://devzone.nordicsemi.com/question/84008/how-many-central_link_count-in-ble_app_hrs_rscs_relay-can-do-so-far/?answer=84118#post-id-84118"&gt;RAM settings&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63750?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2016 09:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d1666a4-2908-4f0e-96b8-f81ce4f62224</guid><dc:creator>saiteja</dc:creator><description>&lt;p&gt;i am using S130 i made so many changes in that ADC example which is peripheral. i need to change it as central now. not possible to again restart the changes with central application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63749?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2016 09:17:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:630e5267-6dd0-48a2-8f4b-ac3bb349d61b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Which softdevice are you using? S130 can work as both central and peripheral concurrently. In many cases it will be easier to start off with a central example and add your functionality to the this, instead of changing your existing code from peripheral to central. Have a look at the differences of the main files of ble_app_uart (peripheral) and ble_app_uart_c (central). The peripheral starts advertising while the central starts scanning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63748?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2016 08:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46222fb0-025c-48ec-b77e-2cc25848b4b3</guid><dc:creator>saiteja</dc:creator><description>&lt;p&gt;hi, thank you for responding.
i have a code which is nrf_adc_example which is peripheral. i want to make it as central.
how i can change the code peripheral to central  otherwise peripheral to both peripheral and central.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect two nrf DK boards through BLE</title><link>https://devzone.nordicsemi.com/thread/63747?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2016 07:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1f9da43-df07-4f1f-bb07-24697d73d9eb</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/ble_sdk_app_nus_c.html?cp=4_0_0_4_2_0_3"&gt;Nordic UART Service Client&lt;/a&gt; example should fit your needs. This example scans for devices that advertises with the NUS UUID in its advertisement report, and connects to the device. You can then transfer data between the boards using the Nordic UART service.&lt;/p&gt;
&lt;p&gt;You will have to modify the example if you want it to only connect to nRF51 devices, or if you want the central to be able to connect to multiple client-boards.&lt;/p&gt;
&lt;p&gt;[EDIT:]&lt;/p&gt;
&lt;p&gt;To extract name from advertising report, you can use a function like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    static bool get_name_from_adv_report(char *p_dev_name,
                        const ble_gap_evt_adv_report_t *p_adv_report)
{
    uint32_t index = 0;
    uint8_t *p_data = (uint8_t *)p_adv_report-&amp;gt;data;
    char *name;
    while (index &amp;lt; p_adv_report-&amp;gt;dlen)
    {
        uint8_t field_length = p_data[index];
        uint8_t field_type   = p_data[index + 1];

    if ( (field_type == BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME )
       || (field_type == BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME)
       )
    {
        name =  (char *)&amp;amp;p_data[index + 2];
        name[field_length-1] = &amp;#39;\0&amp;#39;;
        memcpy(p_dev_name,name, field_length);
        p_dev_name = name;
        return true;
    }
    index += field_length + 1;
}
return false;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;You can then call this function in BLE_GAP_EVT_ADV_REPORT event and check the name agains what you have set as your target device name.&lt;/p&gt;
&lt;p&gt;Best regards,
Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>