<?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>Multilink example code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45324/multilink-example-code</link><description>Hi i am using SDK15.2, nrf52832 board. 
 Which function is necessary to achieve multilink in example code. I dont understand how the central is connecting multiple peripherals at the same? 
 
 Please provide me some more details because i have the similar</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 May 2019 13:06:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45324/multilink-example-code" /><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185981?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 13:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58b0f7b9-1682-407e-a460-c5c04ac22bf1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. I see.&lt;/p&gt;
&lt;p&gt;Depending on what service you have, it is the service handler of that service. In an unmodified ble_app_multilink_central, which uses the lbs (led button service), this would be the&amp;nbsp;lbs_c_evt_handler() in main.c.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An event will be triggered when one of the connected boards pushes a button. This event is BLE_LBS_C_EVT_BUTTON_NOTIFICATION.&lt;/p&gt;
&lt;p&gt;Note that it is the same event for all devices, but you can see in the message that is printed in the log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_LOG_INFO(&amp;quot;Link 0x%x, Button state changed on peer to 0x%x&amp;quot;,
            p_lbs_c_evt-&amp;gt;conn_handle,
            p_lbs_c_evt-&amp;gt;params.button.button_state);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So a message could be: &amp;quot;Link 0x2, Button state changed on peer to 0x1&amp;quot;, which means that the device with connection handle 2 pressed the button.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So you use the connection handle, conn_handle, to determine which device that sent the message, and depending on what characteristic you have, the data will be found in that characteristic.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185915?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 10:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b6593e3-72b9-4bc4-b464-fc74ad4906f1</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Sorry if my question was not clear.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/45324/multilink-example-code/185914"]Do you mean where you can see if any of the devices that are connected sends a message,[/quote]
&lt;p&gt;Yes i meant this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185914?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 10:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ace4a7fb-0df6-4986-8462-bbcc262b1eb3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What do you mean by &amp;quot;being tracked&amp;quot;? Do you mean where you can see if any of the devices that are connected sends a message, or how you can send messages to a specific device? How you connect to the devices, or how to know when the devices are disconnected?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Basically, the SoftDevice (BLE stack) handles all of the connections, so you will not notice anything, unless something happens, such as a connection event, disconnection event, or if someone sends a message.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185897?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 09:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11e6b0a1-15a8-4d4d-80ce-bafe9163001f</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;since this example code is suggested for multiple connections, where are these multiple connections are being tracked in the code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185861?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 08:39:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18cc5aa2-84e0-4448-9487-cbf085d50fd6</guid><dc:creator>Edvin</dc:creator><description>[quote user="Rekha"]How does the links(connections) are&amp;nbsp;tracked in multilink example code?[/quote]
&lt;p&gt;&amp;nbsp;What do you mean?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185714?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 11:58:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:175d02d3-b103-4f79-bcd9-8e5b7d1685f4</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Thank you for the details.&lt;/p&gt;
&lt;p&gt;How does the links(connections) are&amp;nbsp;tracked in multilink example code?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185631?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 07:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80d4cbd3-c29f-40a5-80f4-084bdc667b70</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Is that a question?&lt;/p&gt;
&lt;p&gt;Yes. The scan will be stopped when you connect. If you want to connect to more devices after connecting to a device, you must start scanning again, as I tried to explain in my previous reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185614?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 07:16:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09aaee8a-a661-4405-9c6e-3d72cecada4d</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After scan operation i have stored set of devices to connect.&lt;/p&gt;
&lt;p&gt;currently scan will be stopped and i start connecting the MAC address which i already have with me.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185610?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 07:04:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0df99c3d-daea-448a-83cd-64f4f48b7d27</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;continue to scan even if you are connected to a device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please look at how this is done in ble_app_multilink_central in ble_evt_handler -&amp;gt; BLE_GAP_EVT_CONNECTED.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (ble_conn_state_central_conn_count() == NRF_SDH_BLE_CENTRAL_LINK_COUNT) // Connected to all devices
{
    bsp_board_led_off(CENTRAL_SCANNING_LED);    // all devices connected. Don&amp;#39;t scan
}
else    //Not all devices connected. Restart scanning.
{
    bsp_board_led_on(CENTRAL_SCANNING_LED);
    scan_start(); //&amp;lt;-- Here. Start scan
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185604?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 06:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d98a93d5-90f8-407a-88da-830cfa1173ea</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;But i still have my previous question unanswered.&lt;/p&gt;
&lt;p&gt;I have array of MAC address to connect. which is the best way to connect all devices at the same time?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Rekha&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/185603?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 06:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00c547da-bb90-4cd4-941c-6dc108251663</guid><dc:creator>Rekha</dc:creator><description>&lt;p&gt;Thank you i followed example code to implement discovery module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/178950?ContentTypeID=1</link><pubDate>Thu, 28 Mar 2019 13:32:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:535fdeb7-129d-4664-bffb-f71ff0e82054</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Yes, you do.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suggest that you start with the ble_app_multilink_central example, and switch the services lbs_c to whatever services you intend to use.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/178859?ContentTypeID=1</link><pubDate>Thu, 28 Mar 2019 09:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d74ab89-126b-4afd-8a9f-876b4c4da6cc</guid><dc:creator>Rekha</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/45324/multilink-example-code/178117"]BLE_DB_DISCOVERY_DEF [/quote]
&lt;p&gt;Do i need to connect the devices first to make this ble_dbz-discovery function work?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink example code</title><link>https://devzone.nordicsemi.com/thread/178117?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 13:23:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baa57d1c-08ec-4d1a-ae02-126a61ddded0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;There is no single function that is used for this, but I suggest you check out the ble_app_multilink_central example found in:&lt;/p&gt;
&lt;p&gt;SDK15.2.0\examples\ble_central\ble_app_multilink_central.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A few keywords that you should check out are:&lt;/p&gt;
&lt;p&gt;NRF_SDH_BLE_CENTRAL_LINK_COUNT&lt;/p&gt;
&lt;p&gt;BLE_DB_DISCOVERY_ARRAY_DEF (compared to BLE_DB_DISCOVERY_DEF in the non-multilink examples).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also note that you have the BLE_LBS_C_&lt;strong&gt;ARRAY_&lt;/strong&gt;DEF. This will apply to any services that you use. You need to use an array instance instead of a single instance, to keep track of all the devices you are connected to.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>