<?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>Regarding the connection between Bluetooth 5 center and peripherals</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110081/regarding-the-connection-between-bluetooth-5-center-and-peripherals</link><description>Hi， I want to use the nrf52840 chip as a Bluetooth center to build a star shaped network topology. Due to the excessive number of peripherals in the network structure, I would like to have specified connection and disconnection devices. Do you have a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Apr 2024 01:17:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110081/regarding-the-connection-between-bluetooth-5-center-and-peripherals" /><item><title>RE: Regarding the connection between Bluetooth 5 center and peripherals</title><link>https://devzone.nordicsemi.com/thread/478414?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 01:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30100987-7ad4-4a8c-b1cb-9a8130940468</guid><dc:creator>xiang san </dc:creator><description>&lt;p&gt;thank you !&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;Let me study it first！&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Regarding the connection between Bluetooth 5 center and peripherals</title><link>https://devzone.nordicsemi.com/thread/478261?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 10:18:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87a3ee32-d049-4b5e-8a1b-c70b9bdabfc7</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I understand. In that case, you can use the connection handle to send data to a specific device. Please look at the ble_app_uart example, and how this uses ble_nus_data_send() to send data to the connected device. Even though this only supports one connection, it still uses the connection handle (m_conn_handle) to tell the Bluetooth stack where to send the message.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In your case, you will get callbacks whenever a device connects. This is the BLE_GAP_EVT_CONNECTED callback in ble_evt_handler. This event has the address of the device that just connected (Bluetooth address/MAC address), and it has a connection handle.&lt;/p&gt;
&lt;p&gt;address:&amp;nbsp;p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr[N], N= 0 .. 5&lt;/p&gt;
&lt;p&gt;connection handle: p_ble_evt-&amp;gt;evt.gap_evt.conn_handle&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You should store this connection handle, and use it later when you want to determine which device to send data to, or which device you received data from. The events after this only contains the connection handle, not the address. When the device disconnects (BLE_GAP_EVT_DISCONNECTED), you can remove that connection handle. It is not certain that the connection handle will be the same the next time the device connects.&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><item><title>RE: Regarding the connection between Bluetooth 5 center and peripherals</title><link>https://devzone.nordicsemi.com/thread/478162?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 01:47:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f52fa52e-8c4e-4f7c-9ff4-347573a787e2</guid><dc:creator>xiang san </dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; The nRF5 SDK version I am using is 17.02, as you understand, which means that the central device acts as a Bluetooth gateway, and through some protocols and configurations (such as Bluetooth MAC address), the server data is only transmitted to the specified Bluetooth device;&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Regarding the connection between Bluetooth 5 center and peripherals</title><link>https://devzone.nordicsemi.com/thread/478143?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 21:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85b2fb09-49f7-476d-b639-a013546a28d8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What SDK version are you using? The nRF Connect SDK (NCS), or the nRF5 SDK?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What do you mean by: &amp;quot;I would like to have specified connection and disconnection devices&amp;quot;?&lt;/p&gt;
&lt;p&gt;It sounds like what you are looking for is how to decide who you connect to, and how to disconnect from certain devices, is that so?&amp;nbsp;&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>