<?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>sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63320/sending-data-to-a-particular-peripheral-in-multi-connection-in-central</link><description>hai , 
 i am connecting 5 peripherals in one central (used ble_central example modified like multilink central) 
 i referred this link for sending particular data... 
 https://devzone.nordicsemi.com/f/nordic-q-a/47745/multi-link-central-uart-with-multiple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 04 Jul 2020 00:43:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63320/sending-data-to-a-particular-peripheral-in-multi-connection-in-central" /><item><title>RE: sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/thread/258420?ContentTypeID=1</link><pubDate>Sat, 04 Jul 2020 00:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c44f21a7-974e-4433-9b34-bbe7feafedd8</guid><dc:creator>sowmiya</dc:creator><description>&lt;p&gt;Ya...thank you for your&amp;nbsp; reply ...&lt;/p&gt;
&lt;p&gt;Completed the implementation and its working fine...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/thread/258417?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 20:35:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc1165b4-4b32-4c8e-9658-34fe9c2abfca</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;If you&amp;#39;re asking about an&amp;nbsp;implementation of mapping algorithm - sorry, I don&amp;#39;t have a ready solution, but it&amp;#39;s quite simple: an array of structures containing two fields (handle and address), and a function that walks through this array, comparing each address with that you want to send data to, and returning corresponding handle field. In case of 5 entres there&amp;#39;s even no need to worry about optimization.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/thread/258350?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 13:40:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da8a2812-3fd1-4fe0-a782-aa4c57290b21</guid><dc:creator>sowmiya</dc:creator><description>&lt;p&gt;yes found that but&amp;nbsp; to passing a conn_handle for only particular peripheral ,&lt;/p&gt;
&lt;p&gt;i m strucked at the place of mapping in c code&amp;nbsp; when connected ??&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if u have any code based on this mapping kindly share the code ..it would be grateful for me&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;sowmiya&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/thread/258332?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 13:11:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7419b146-792c-435e-910a-4334b6682066</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;&lt;span&gt;ble_lbs_c_t structure has conn_handle field, you can call&amp;nbsp;ble_lbs_led_status_send() only in case&amp;nbsp;m_lbs_c[i].conn_handle matches the handle for required peer address in your map.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/thread/258221?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 06:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1f142e5-8f9a-4b3e-ad56-c15ecba8b8cd</guid><dc:creator>sowmiya</dc:creator><description>&lt;p&gt;yes ,thank you ..i can able to get evt-&amp;gt;evt.gap_evt.conn_handle and&amp;nbsp;evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for every connection.&lt;/p&gt;
&lt;p&gt;but in my application after&amp;nbsp;5 connections of peripheral to one central , i will send data along with anyone of the connected peripheral peer address that time,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;1.how can i choose in central to send data to a particular peripheral&amp;nbsp; ??&lt;/p&gt;
&lt;p&gt;&amp;nbsp;2 .how can i map the peer address with that id ??&lt;/p&gt;
&lt;p&gt;for (uint32_t i = 0; i&amp;lt; NRF_SDH_BLE_CENTRAL_LINK_COUNT; i++)&lt;br /&gt; {&lt;br /&gt; err_code = ble_lbs_led_status_send(&amp;amp;m_lbs_c[i], 0);&lt;br /&gt;if (err_code != NRF_SUCCESS &amp;amp;&amp;amp;&lt;br /&gt; err_code != BLE_ERROR_INVALID_CONN_HANDLE &amp;amp;&amp;amp;&lt;br /&gt; err_code != NRF_ERROR_INVALID_STATE)&lt;br /&gt; {&lt;br /&gt; return err_code;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;if i used like above function , its sending data to all peripherals , here how can i differentiate the one peripheral and that connection id???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sending data to a particular peripheral  in multi connection in central</title><link>https://devzone.nordicsemi.com/thread/258194?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 20:07:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa07b6b3-1162-4a31-bee5-86b287ff31ed</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Peer address&amp;nbsp;can be found in &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fstructble__gap__evt__connected__t.html"&gt;connection event data&lt;/a&gt; passed along with&amp;nbsp;BLE_GAP_EVT_CONNECTED event. You can create a map that will store connection handle and corresponding peer address for each connection.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (evt-&amp;gt;header.evt_id == BLE_GAP_EVT_CONNECTED) {
    uint16_t handle = evt-&amp;gt;evt.gap_evt.conn_handle;
    uint8_t *addr = evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr;
    // add handle:addr pair to the map
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>