<?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>BLE connect device but don&amp;#39;t have connect handle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110300/ble-connect-device-but-don-t-have-connect-handle</link><description>When I am in BLE_GAP_CONNECTED event, the connection handle is empty? This is log: 
 [17:54:15.251]input←◆&amp;lt;info&amp;gt; app: Received BLE event: 16 &amp;lt;info&amp;gt; app: Connected. &amp;lt;info&amp;gt; app: Connection handle: 0x0 &amp;lt;info&amp;gt; app: Connected to device with handle: 0x0000</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Apr 2024 20:32:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110300/ble-connect-device-but-don-t-have-connect-handle" /><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479547?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 20:32:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb57e020-72cd-4b2c-8be7-730a4b771d51</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Genfeng,&lt;/p&gt;
&lt;p&gt;No need to be sorry &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; I am glad you figured it out. A part of my job is to ask questions that make you discover bugs (either by us or by you &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; )&lt;/p&gt;
&lt;p&gt;So does this mean that you figured out both the connection handle issue and the disconnect (reason 19) issue?&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: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479306?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 18:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdf1532e-eacf-4310-a363-ad596c6a36cb</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;Tanks for your help. I found the problem. It&amp;#39;s my own programming error. I&amp;#39;m very sorry.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Genfeng&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479272?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 14:29:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf677e34-53a6-46dc-b25a-e83e1faeb4c6</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;There is another phenomenon. After a period of time after I connect to the device, the device will automatically disconnect and the feedback code is 19 (BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION). However, this problem did not occur when I used SD_API_V5 before. My scanning parameters and connection The parameters are the same as before.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Genfeng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479267?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 14:12:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8ebf264-0ebe-4bee-af77-b1e33f5c114a</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;OK, Thank for your help.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Genfeng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479265?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 14:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c93842f-4f37-48cf-a314-8b9b46aedd1b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, I don&amp;#39;t have time to look into it now at the end of the day, but try printing, or debugging the value of&amp;nbsp;m_connection_handle right before you call sd_ble_gap_disconnect(), and see if it is still 0x0000.&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: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479260?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:58:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f42fa45-7221-4801-b845-a002cd144330</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;I use the pca10059 with nRF52840 dongle.&lt;/p&gt;
&lt;p&gt;The command is :&amp;quot;&amp;gt;SD:Connect=3_1122334455f6&amp;quot;, &amp;quot;3&amp;quot; is type, &amp;quot;1122334455f6&amp;quot; is address. And &amp;quot;&amp;gt;SD:Disconnect&amp;quot;.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Genfeng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479251?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f637c14-ec9b-4e26-a340-816efc21c423</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;Of course, Thanks for your help.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_connectivity.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_connectivity.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Genfeng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479248?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee44150d-72cb-4a01-ac24-c47ff3fb2eba</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Can you please .zip and upload the application that you are using so that I can have a look? Will I be able to reproduce this using an nRF52840DK?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479242?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07a54894-f478-497d-b579-1cdb6c7e86c4</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I open a serial port to control my app, than I call sd_ble_gap_disconnect() after BLE_GAP_EVT_CONNECT event. So I sure I am in the connection.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Genfeng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479236?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:19:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cd24e9d-5275-48b2-9e05-a0a20cebc36d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;0x3002 is&amp;nbsp;BLE_ERROR_INVALID_CONN_HANDLE, so I understand that you would think that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where do you try to disconnect? Could it be that you are trying to do that in the disconnected event? If so, it would already have been disconnected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it is not in the BLE_GAP_EVT_DISCONNECTED event, from where are you trying to call sd_ble_gap_disconnect?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479234?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:11:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:900cdaa0-5c17-4065-a87a-1e867ab3c927</guid><dc:creator>MapleBay</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, but I think it shouldn&amp;#39;t be 0x0000, because I use this handle to disconnect it will return error 0x3002.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Genfeng&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE connect device but don't have connect handle</title><link>https://devzone.nordicsemi.com/thread/479202?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 12:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5836f18-b6d3-4998-acc8-6a6b821cb0e0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What do you mean by &amp;quot;In connect event, I can&amp;#39;t get the connect handle.&amp;quot;?&lt;/p&gt;
[quote user=""][17:54:15.251]input←◆&amp;lt;info&amp;gt; app: Received BLE event: 16&lt;br /&gt;&amp;lt;info&amp;gt; app: Connected.&lt;br /&gt;&amp;lt;info&amp;gt; app: Connection handle: 0x0&lt;br /&gt;&amp;lt;info&amp;gt; app: Connected to device with handle: 0x0000[/quote]
&lt;p&gt;According to this log, it seems like you got the connection handle. It is 0x0000, isn&amp;#39;t it?&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>