<?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 handle multiple simultaneous centrals with different security levels</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111430/how-to-handle-multiple-simultaneous-centrals-with-different-security-levels</link><description>Hello, 
 We are working with an NRF5340 and SDK 2.5.0. Things are generally going very well, but I think Ive hit a snag for which im not sure how to proceed. 
 Our device needs to handle two centrals connected simultaneously. Our device exposes two services</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 May 2024 06:45:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111430/how-to-handle-multiple-simultaneous-centrals-with-different-security-levels" /><item><title>RE: How to handle multiple simultaneous centrals with different security levels</title><link>https://devzone.nordicsemi.com/thread/485721?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 06:45:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:131dbd39-91ff-451b-ad6f-765c264b3ad0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Using bt_conn_set_security() on the peripheral simply &amp;quot;requests&amp;quot; the central to establish security. Whether security is actually achieved still depends on the central.&lt;/p&gt;
&lt;p&gt;Also,&amp;nbsp;if the characteristics themselves don&amp;#39;t have security access requirements, then&amp;nbsp;a central can still&amp;nbsp;access it even if the link isn&amp;#39;t secured.&lt;/p&gt;
&lt;p&gt;Changing the security requirements of certain characteristics is covered in Exercise 1, Lesson 5, of our free online course Bluetooth Low Energy Fundamentals.&lt;/p&gt;
&lt;p&gt;Could you please take a look at that and let me know if you have any questions?&lt;/p&gt;
&lt;p&gt;Hieu&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle multiple simultaneous centrals with different security levels</title><link>https://devzone.nordicsemi.com/thread/485685?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 16:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a5c02da-1efd-45e8-9f68-397e35ef624b</guid><dc:creator>i_4556</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;thank you for your answer, but I am afraid I dont fully understand it. Do you have an example of how to set the characteristics to require different security levels, perhaps that might help me better understand, or just and example where a specific characteristic has a specific security level?&lt;/p&gt;
&lt;p&gt;My understanding was the usual way was to just declare everything, then connect and then after the connection was established to manually call bt_conn_set_security?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle multiple simultaneous centrals with different security levels</title><link>https://devzone.nordicsemi.com/thread/485593?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 10:14:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3566ca12-308b-43ef-9892-076c738e380d</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi i_4556,&lt;/p&gt;
&lt;p&gt;In your scenario, you should setup the two characteristics to require different level of security. In that way, only the central with&amp;nbsp;Security level 2 can access both HIDS and NUS, and the central with Just-work can only access NUS.&lt;/p&gt;
&lt;p&gt;Regarding differentiating the two connections, you can use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.1/zephyr/connectivity/bluetooth/api/connection_mgmt.html#c.bt_conn_get_dst"&gt;bt_conn_get_dst()&lt;/a&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&amp;nbsp;to get the address of the central in a connection and keep track of it.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Hieu&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>