<?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>S130 to S132 and conn handles</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11488/s130-to-s132-and-conn-handles</link><description>Hello,
On S130 conn handles were 0 to 2 for connections as central and 3 for connection as device. 
 I migrated to S132. Question, when i set 3 / 1 as configuration, do handles still the sames ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Jan 2016 16:54:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11488/s130-to-s132-and-conn-handles" /><item><title>RE: S130 to S132 and conn handles</title><link>https://devzone.nordicsemi.com/thread/43387?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 16:54:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c1036c0-82a6-451d-b375-9473b9f9eb09</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: S130 to S132 and conn handles</title><link>https://devzone.nordicsemi.com/thread/43386?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 10:25:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c87715d-0b25-41f4-81b0-7c5ec16f96af</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can not rely on the connection handles having specific values. As far as I know the handle values may depend on connection order and/or other things.&lt;/p&gt;
&lt;p&gt;If you need the connection handle, you should read the handle on the connection event and then save it. You should never hard code it. You can check the connection handle on all BLE events, by reading &lt;code&gt;p_ble_evt-&amp;gt;evt.gap_evt.conn_handle&lt;/code&gt;. (Here, &lt;code&gt;p_ble_evt&lt;/code&gt; is the pointer to the BLE event). See the SDK 11 example under &lt;code&gt;&amp;lt;SDK folder&amp;gt;\examples\ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay\&lt;/code&gt;, which uses the latest versions of s130/s132 with two connections as central and one connection as peripheral, using the s130 (pca10028) and the s132 (pca10036, pca10040). It only keeps track of the connection handlers for the central roles. In &lt;code&gt;ble_evt_dispatch&lt;/code&gt; it reads the connection handle from the event, and uses it to determine the connection role. If it is peripheral role then we know this is the one and only peripheral connection.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>