<?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>The difference between (dm_handle_t) &amp;quot;connection_id&amp;quot; and &amp;quot;conn_handle&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19212/the-difference-between-dm_handle_t-connection_id-and-conn_handle</link><description>Hi all, 
 I want to clarify are there any deference between &amp;quot;connection_id&amp;quot; and &amp;quot;conn_handle&amp;quot; ? 
 I use a multilink central application with 8 possible peripherals devices and
I can see that both this parameters all time have the same value. 
 Can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Jan 2017 11:48:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19212/the-difference-between-dm_handle_t-connection_id-and-conn_handle" /><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74423?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 11:48:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d19efb36-c68b-4c78-af07-148262b87436</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Great! If I answered your question, please accept my answer by clicking the circle next to it. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74422?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2017 20:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00c89660-9b12-445e-8c5f-07f79cb1b94a</guid><dc:creator>is</dc:creator><description>&lt;p&gt;Thank you very much! That&amp;#39;s what I need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74421?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2017 15:27:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7419d12-2723-4612-b4c8-317ba5250a4e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It seems it made this way because the valid connection handles are from 0 to 0xFFFD, while valid connection IDs are 0 to 0x7, but in practice the connection handles are always 0 to 0x7 (if 8 connections are supported), so they should always be the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74420?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2017 11:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06f4dd90-c8e3-4144-88e0-1ef6dfc7ac10</guid><dc:creator>is</dc:creator><description>&lt;p&gt;For what should I  use client_find()?
If I could do:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;index = p_evt-&amp;gt;conn_handle;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74419?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2017 11:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07cea893-05ad-4ee4-9144-432885c3afed</guid><dc:creator>is</dc:creator><description>&lt;p&gt;Ok,
Example &amp;quot;multilink central&amp;quot; SDK 10.0.0:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t client_find(uint16_t conn_handle)
{
    for (i = 0; i &amp;lt; MAX_CLIENTS; i++)
    {
        if (m_client[i].srv_db.conn_handle == conn_handle)
        {
            return i;
        }
    }
}

void db_discovery_evt_handler(ble_db_discovery_evt_t * p_evt)
{
	/* ... */
	index = client_find(p_evt-&amp;gt;conn_handle);
	/* ... */
}

void client_handling_ble_evt_handler(ble_evt_t * p_ble_evt)
{
	/* ... */
    index = client_find(p_ble_evt-&amp;gt;evt.gattc_evt.conn_handle);
	/* ... */
}

uint32_t client_handling_create(const dm_handle_t * p_handle, uint16_t conn_handle)
{
	/* ALWAYS: p_handle-&amp;gt;connection_id == conn_handle */
    m_client[p_handle-&amp;gt;connection_id].srv_db.conn_handle = conn_handle;
	/* ... */
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;client_find() - useless!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74418?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2017 10:10:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09e0d995-fa85-4a7d-b716-1d06ebc8e128</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Can you please try to explain some more? What exactly is the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74416?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 15:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81d5e1ba-134b-4795-a744-a6d091b04d19</guid><dc:creator>is</dc:creator><description>&lt;p&gt;Yes, I mean the &amp;quot;connection id&amp;quot;  from device manager events and the &amp;quot;connection handle&amp;quot; form ble events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The difference between (dm_handle_t) "connection_id" and "conn_handle"</title><link>https://devzone.nordicsemi.com/thread/74417?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 14:12:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:917ea04b-da0c-4009-be94-dc697807ae4b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure I understand. If there are any difference? connection_id identifies the active connection instance inside the device manager module. What you mean by &amp;quot;conn_handle&amp;quot;? Do you mean the connection handle that identifies what connection a BLE event belongs to? p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>