<?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>UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34471/uart-bridge-between-central-and-peirpheral</link><description>Hello, 
 
 I want to make a simple UART Bridge between Central and Peirpheral. I&amp;#39;m usign nRF52832 with nRF5_SDK v15. There are central and peripheral uart examples in the SDK. 
 I can connect to any mobile phone by peripheral example. However I can not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 May 2018 07:38:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34471/uart-bridge-between-central-and-peirpheral" /><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/133748?ContentTypeID=1</link><pubDate>Tue, 29 May 2018 07:38:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3e403ae-8177-4b0e-a4d1-99fc95e327e9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Correct,&amp;nbsp;&lt;a title="sd_ble_gap_connect" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_0_2_1_2_11#gacca0e56084c7b3ed832b1bfa3911b7fe"&gt;sd_ble_gap_connect&lt;/a&gt;() will connect to the device that&amp;nbsp;has the&lt;span&gt;&amp;nbsp;&lt;/span&gt;address you provide. Note that ongoing scanning is not stopped if you don&amp;#39;t connect, so&amp;nbsp;sd_ble_gap_scan_start() may return&lt;span&gt;&amp;nbsp;&lt;/span&gt;NRF_ERROR_INVALID_STATE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/133392?ContentTypeID=1</link><pubDate>Fri, 25 May 2018 10:20:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b5d9173-5c94-4ba9-bcbc-26a22da08831</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;I have modified the&lt;strong&gt; on_adv_report()&lt;/strong&gt; function. Now it prints all BLE devices nearby.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I feed the selected BLE device addres to&amp;nbsp;array&amp;nbsp;&lt;strong&gt;p_adv_report-&amp;gt;peer_addr&lt;/strong&gt;, will it connect to that device ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
static void on_adv_report(ble_gap_evt_adv_report_t const * p_adv_report)
{
    ret_code_t err_code;

    if (ble_advdata_uuid_find(p_adv_report-&amp;gt;data.p_data, p_adv_report-&amp;gt;data.len, &amp;amp;m_nus_uuid))
    {
        //err_code = sd_ble_gap_connect(&amp;amp;p_adv_report-&amp;gt;peer_addr,
        //                              &amp;amp;m_scan_params,
        //                              &amp;amp;m_connection_param,
        //                              APP_BLE_CONN_CFG_TAG);

        //if (err_code == NRF_SUCCESS)
        {
            // scan is automatically stopped by the connect
            err_code = bsp_indication_set(BSP_INDICATE_IDLE);
            APP_ERROR_CHECK(err_code);
            //NRF_LOG_INFO(&amp;quot;Connecting to target %02x%02x%02x%02x%02x%02x&amp;quot;,
            NRF_LOG_INFO(&amp;quot;%02x:%02x:%02x:%02x:%02x:%02x&amp;quot;,
                     p_adv_report-&amp;gt;peer_addr.addr[0],
                     p_adv_report-&amp;gt;peer_addr.addr[1],
                     p_adv_report-&amp;gt;peer_addr.addr[2],
                     p_adv_report-&amp;gt;peer_addr.addr[3],
                     p_adv_report-&amp;gt;peer_addr.addr[4],
                     p_adv_report-&amp;gt;peer_addr.addr[5]
                     );
        }
    }
    else
    {
        
    }

    err_code = sd_ble_gap_scan_start(NULL, &amp;amp;m_scan_buffer);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/133352?ContentTypeID=1</link><pubDate>Fri, 25 May 2018 07:41:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ee8c73a-374e-4835-8705-bdbd6ab9fef4</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; As I see from the code in the function&amp;nbsp;&lt;span&gt;&lt;strong&gt;on_adv_report()&lt;/strong&gt; it connect to peripheral. However I can not understand How should be the code structure in order to establish a specifically selected peripheral BLE device.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;p_adv_report-&amp;gt;peer_addr.addr&lt;/strong&gt; keeps the address of the peripheral device.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ble_advdata_uuid_find() &lt;/strong&gt;this function is called one time. if it finds a connectible device, it connect. never called again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How can I list the nearby devices? I do not want to connect at first found device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/133341?ContentTypeID=1</link><pubDate>Fri, 25 May 2018 07:19:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aefdcaf4-ef14-4a3d-ae8f-6f75ccbc8552</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The NUS service UUID is defined in ble_nus_c.h (NUS_BASE_UUID +&amp;nbsp;BLE_UUID_NUS_SERVICE)&lt;/p&gt;
&lt;p&gt;&amp;quot;In case there are two BLE devices nearby, Which one is selected by the central to connect ?How can I connect the one that I want to. In short, I just want to seach for the specific UUID devices nearby, and then I will select one of them to connect.&amp;quot;&lt;/p&gt;
&lt;p&gt;The central example will connect to the first device it&amp;nbsp;sees, and the decision to connect is made in main.c::on_adv_report(). So the&amp;nbsp;on_adv_report() needs to be modified if you want to connect to a device based on user input. You could use the UART interface to display discovered devices and receive user input.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/132934?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 09:04:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b397821a-5351-4bc1-b8b2-db4503e0ab60</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;I can successfully connect to my phone by defining the UUID &amp;quot;&lt;span&gt;6E400001-B5A3-F393-E0A9-E50E24DCCA9E&amp;quot; to my phone. However, I can not find Where it is defined in the central example. Could you please be more specific ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In case there are two BLE devices nearby, Which one is selected by the central to connect ?&lt;/p&gt;
&lt;p&gt;How can I connect the one that I want to. In short, I just want to seach for the specific UUID devices nearby, and then I will select one of them to connect.&lt;/p&gt;
&lt;p&gt;Can I do that with the uart example ?&lt;/p&gt;
&lt;p&gt;How can I do that ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/132930?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 08:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2703d8b7-3187-4221-8e57-b1ff56c262f4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can create a custom advertiser in the nRF connect app&amp;nbsp;that advertises the NUS service UUID. The UART central example&amp;nbsp;scans for advertisement that contains this service UUID and will try to connect to any device that advertises this UUID.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-26029bf4fbf3439bab1265ea44a80430/Screenshot_5F00_20180523_2D00_104423_5B00_2_5D00_.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;In addition, In my final design, there will be multiple of BLE peripheral device. Therefore I need an acceptible solution. Do I need to connect that I need a MAC address ? I will select to connect a specific BLE peripheral from the central.&amp;quot;&lt;/p&gt;
&lt;p&gt;The central needs a way to identify the device you want to connect to. That could be device name, service uuid(s), MAC address, etc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/132730?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 11:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6a77164-3ee2-411b-a633-49e7e559b3e9</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;Can I use &lt;strong&gt;nRF Connect&lt;/strong&gt;&amp;nbsp;android app as the second board ? I want to use nRF Connect as the central. Is this possible and How ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In addition, In my final design, there will be multiple of BLE peripheral device. Therefore I need an acceptible solution. Do I need to connect that I need a MAC address ? I will select to connect a specific BLE peripheral from the central.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/132726?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 11:07:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb48b3cc-5d1c-49a9-b48d-abd2f101d59c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ble_sdk_app_nus_c.html?cp=4_0_0_4_1_0_7"&gt;UART central&lt;/a&gt;&amp;nbsp;searches for peripherals that are advertising the NUS service UUID, so you need two boards to test this example, one with the central code, and another one with the UART peripheral example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Bridge between Central and Peirpheral</title><link>https://devzone.nordicsemi.com/thread/132458?ContentTypeID=1</link><pubDate>Fri, 18 May 2018 05:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7ca5169-2bd3-4ba1-af86-da1083a67f01</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;Any idea ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>