<?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>Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75511/connection-handle-16-and-19</link><description>Hi, 
 I get BLE_GATTS_EVT_WRITE with connection handles 16 and 19 which seems to be some defaults of the softdevice. 
 Can you explain the source and usage of these connection handles? 
 Thanks, 
 Daniel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 May 2021 09:35:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75511/connection-handle-16-and-19" /><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/312012?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 09:35:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa17457c-d959-4c3e-9e22-0e082a84fa32</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Hung,&lt;/p&gt;
&lt;p&gt;I think I understand it now - thanks&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311887?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 15:45:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:190385fa-607e-40eb-bb6d-41c86f849a05</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Thanks Hung,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll check it first myself.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311876?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 15:08:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:258f28d6-8ddd-4898-8d7a-fb5d0b03b671</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please provide the service UUID (0x2902 is only the UUID of the CCCD, not the service UUID).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t want to send the sniffer trace, you can use nRF Connect app on PC and do a service discovery of the attribute table, something like this:&amp;nbsp;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1022x1152/__key/communityserver-discussions-components-files/4/pastedimage1622041658083v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you want you can convert this case to private (GO PRIVATE) if you have confidential information.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311873?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 14:56:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee916cdc-fcf1-4085-941c-12e8141f753d</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Hung,&lt;/p&gt;
&lt;p&gt;The nrf52840 is the peripheral and server. The phone (using Web bluetooth) writes the 0x2902 upon connection and before disconnecting. I haven&amp;#39;t defined explicitly this service. I wonder which services are implicitly defined by the Softdevice.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311855?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 14:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f09845a0-08bf-4cde-bfde-c6e12b21d146</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Daniel,&amp;nbsp;&lt;br /&gt;We can&amp;#39;t help you if you don&amp;#39;t provide enough information.&amp;nbsp;&lt;br /&gt;I don&amp;#39;t know if the softdevice is acting as a central or a peripheral, if it has gatt server or gatt client. We can&amp;#39;t &amp;quot;guess&amp;quot; what you want to know without proper context (or a sniffer trace).&lt;/p&gt;
&lt;p&gt;Please&amp;nbsp;provide information such as:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Which device is central which is peripheral&lt;/p&gt;
&lt;p&gt;- Which device is GATT client and which is GATT server&lt;/p&gt;
&lt;p&gt;- Which device send the write request /write command&lt;/p&gt;
&lt;p&gt;- Which service it&amp;#39;s writing to.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to know what&amp;#39;s 0x2902 is you can have a look at the list &lt;a href="https://www.bluetooth.com/specifications/assigned-numbers/"&gt;here&lt;/a&gt;&amp;nbsp;(16-bit UUID Numbers)&lt;/p&gt;
&lt;p&gt;It can be the CCCD for the service changed characteristic.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311841?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 13:52:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4dc8c76-e045-45f8-9885-3e6738630260</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Hung hi,&lt;/p&gt;
&lt;p&gt;I specifically described the following:&lt;/p&gt;
&lt;p&gt;1. I&amp;nbsp;&lt;span&gt;would like to understand which services that are not explicitly defined are being communicated by the Softdevice (for example - I see a service&amp;nbsp;&lt;/span&gt;0x2902 which I don&amp;#39;t see anywhere in my code.&lt;/p&gt;
&lt;p&gt;2. The documentation is cryptic. There is absolutely no way to understand what is going on under the hood.&lt;/p&gt;
&lt;p&gt;3. The Softdevice code is not available, therefore, there is no way to overcome the poor documentation by reading the code itself.&lt;/p&gt;
&lt;p&gt;You ask for a snifet and I don&amp;#39;t wish to go this way because I&amp;#39;m not trying to fix a bug. I need to know if my program is robust. It is working well but I don&amp;#39;t understand the source of the extra services I haven&amp;#39;t explicitly defined.&lt;/p&gt;
&lt;p&gt;Is there a way to get an explanation of the services Softdevice is implicitly defining? Do you acknowledge that such services exists?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311714?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 10:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47a8679d-78a6-4aa4-8d04-3e061ce3074a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I would strongly suggest to capture a sniffer trace to fully understand what happened over the air.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t provide source code of the softdevice but what you can do is to look at the message sequence charts &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_p___m_s_c.html?cp=4_7_3_1_2_1_5"&gt;here&lt;/a&gt;&amp;nbsp;or &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.2.0/group___b_l_e___g_a_t_t_s___m_s_c.html?cp=4_7_3_1_2_4_3"&gt;here&lt;/a&gt;&amp;nbsp;. They would explain most of the behaviors of the softdevice and how you should react to the event from the softdevice.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Connection handle is the handle that identify the connection. Usually when you have only one connection with a single peer the connection handle should be 0.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311693?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 09:02:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e42e850-b34b-4824-9fcc-2248a85e1b64</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Hung hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using Web Bluetooth (&lt;a href="https://webbluetoothcg.github.io/web-bluetooth/"&gt;https://webbluetoothcg.github.io/web-bluetooth/&lt;/a&gt;). I also use Softdevice directly without additional libraries since I couldn&amp;#39;t get consistent behaviour across devices that I could understand using the libraries that are in the examples. This has been a frustrating experience since examples are a poor substitute to a good documentation. My program works fine and consistently now but I obviously haven&amp;#39;t tested it on all the phones out there. Since I don&amp;#39;t have access to the source code of the Softdevice, there are still some things I don&amp;#39;t understand and I cannot resolve myself by reading your code. I would like to understand which services that I haven&amp;#39;t explicitly defined are being communicated by the Softdevice.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311676?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 08:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9beb5518-5cb0-4423-afe0-28310fc125c6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Daniel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please give more information. What&amp;#39;s the application is about, how they are supposed to work&amp;nbsp; ?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s normal that you get a&amp;nbsp;&lt;span&gt;BLE_GATTS_EVT_WRITE&amp;nbsp; before you can send notification or indication. It&amp;#39;s because the client need to enable notification/indication by a write request or write command.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What strange here is what you described as you received connection handle 16 or 19.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please try capturing a sniffer trace.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311584?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 17:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2728753b-347b-45d2-879a-6595439237e4</guid><dc:creator>Daniel Reisfeld</dc:creator><description>&lt;p&gt;Hung hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the softdevice directly and using Web Bluetooth on the phone. When calling&amp;nbsp;&lt;span&gt;&lt;span&gt;&lt;span&gt;sd_ble_evt_get I always get a&amp;nbsp;BLE_GATTS_EVT_WRITE as&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;gatts_evt right after connections and disconnection. This is ok but it is a phenomena that is under the hood for me and I would like to understand it rather than just observing it. I noticed that I must wait for it to happen before further communicating (e.g. indicating or notifying anything).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best, Daniel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection handle 16 and 19</title><link>https://devzone.nordicsemi.com/thread/311499?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 13:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:babac186-10c6-4264-a3a0-4f13343c9f41</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Daniel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which example are you testing ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are you asking about connection handles or attribute handles ?&lt;/p&gt;
&lt;p&gt;Could you show some log or&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt; sniffer trace &lt;/a&gt;?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>