<?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>Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18464/where-would-i-be-sending-my-data-using-sd_ble_gatts_hvx</link><description>OK. Weird question. I know, but that&amp;#39;s only because I&amp;#39;m in the middle of a large program that I&amp;#39;m reading, believe me, I had done my fair share of homework and I understand the &amp;quot;send&amp;quot; and &amp;quot;receive&amp;quot; operation of GATT is a bit well, unique in that it sort</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Dec 2016 09:45:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18464/where-would-i-be-sending-my-data-using-sd_ble_gatts_hvx" /><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71252?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 09:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33056a8b-1b60-47a3-a1b5-946a026b1618</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;all of service/characteristic/descriptor stuff is an abstraction made for humans. BLE protocol works on handles - unique 16bit numbers representing entry in ATT table that can be any BLE entity. Those numbers are auto generated by server&amp;#39;s BLE stack and there&amp;#39;s no way to predict them. So you cannot hard code them in your application (there are exceptions but that&amp;#39;s the best practice). In order to have some link between &amp;quot;my characteristic I want to work with&amp;quot; and ATT entry 0x0XYZ of given device UUID numbers were introduced. Those 16 bit (for official SIG stuff) or 128 bit numbers (for custom services/characteristics made by developers) are your unique &amp;quot;thing to remember&amp;quot; your app should be looking for. But all operations require to specify handle so procedure called &amp;quot;service discovery&amp;quot; is needed to map UUIDs to ATT handles. It is a series of steps (&amp;quot;What services do you have?&amp;quot;, &amp;quot;What characteristics are inside of service X?&amp;quot;, and so on). Because it&amp;#39;s time and power consuming APIs typically split it into several operations hence I wrote about &amp;quot;secondary discovery&amp;quot;.&lt;/p&gt;
&lt;p&gt;PS. as for your question here: &lt;a href="https://devzone.nordicsemi.com/question/108722/how-do-you-set-cccd-handle-to-0x0001/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt; &amp;quot;Method 2&amp;quot; won&amp;#39;t work because central&amp;#39;s BLE stack will drop unsolicited notification packet the same way a firewall silently drops unwanted incoming IP traffic. This is per spec. As for &lt;code&gt;sd_ble_gatts_sys_attr_set()&lt;/code&gt; - this is used by peer manager to restore bond information. In case of bonded device you are supposed to remember CCCD descriptor state for each characteristic and each bonded peer and silently restore it upon connection start. This still won&amp;#39;t change anything if central thinks that given notification is disabled. There&amp;#39;s no way to have notification working without client subscribing to them first. If you really need such king of functionality consider implementing additional GATT server inside central device and using write instead of notifications. Nordic proximity example demonstrates such use case.&lt;/p&gt;
&lt;p&gt;Maybe you should focus on your Nordic board code first and use generic &amp;quot;BLE explorer&amp;quot; app such as nRF Connect for Android as temporary interface. This way enabling notifications on the phone is a simple click of a button.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71251?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2016 07:02:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef181ed8-9bb7-4d59-9f6e-46231d4c5a90</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Hello Keton, thank you so much for being patient with me and being with me so far, I&amp;#39;m having a bit of problem understanding step #4, &amp;quot;perform secondary discovery to find CCCD handle of this characteristic&amp;quot;, how do you mean by that? I don&amp;#39;t recall reading it in the nordic semi tutorial.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71254?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 11:29:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8012ffb7-584e-4fc5-90a9-50ea26232857</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;I&amp;#39;m not an Android developer but generic system agnostic procedure to do this is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Scan for BLE device you want (apply filters ie. using manufacturer data or advertised service list)&lt;/li&gt;
&lt;li&gt;Connect to it&lt;/li&gt;
&lt;li&gt;Perform service discovery, find service containing your characteristic&lt;/li&gt;
&lt;li&gt;perform secondary discovery to find CCCD handle of this characteristic&lt;/li&gt;
&lt;li&gt;perform write operation of 0x01 on discovered CCCD handle&lt;/li&gt;
&lt;li&gt;in Nordic firmware detect this write event and start sending notifications&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71253?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 09:03:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:234a901d-d325-42bd-a889-76d1f9e3b0cc</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Hello Keton, Could you please tell me how do I write &amp;quot; 0x1000 to CCCD descriptor&amp;quot; to my target characteristic? Is there an android API somewhere? Alos, is this detailed in the BLE official documentation? Thank you in advance!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71249?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 09:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0c0b132-bb2c-4b89-84f5-f5429ed77eca</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;It depends on what you want to achieve. Those lines set CCCD permissions and should be set to open as per BLE spec. But that&amp;#39;s just a very first step. You need to subscribe to notifications from a phone (or other BLE client device). So you need to perform write operations to CCCD as I&amp;#39;ve described above from your phone&amp;#39;s app. And you need to catch write events in your nRF service code so you&amp;#39;ll know when you can start sending notifications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71250?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 06:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43fa32b1-98ae-4753-8424-31cdcd7b87a5</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Hello, would&lt;/p&gt;
&lt;p&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cccd_md.write_perm);&lt;/p&gt;
&lt;p&gt;Do the trick?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Where would I be sending my data using sd_ble_gatts_hvx?</title><link>https://devzone.nordicsemi.com/thread/71248?ContentTypeID=1</link><pubDate>Sun, 18 Dec 2016 19:04:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:006da682-a7a9-4aba-96ee-eac064a693ee</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;sd_ble_gatts_hvx does BLE notifications to characteristic handle specified as one of its parameters. To receive them phone must be preconfigured. You have to write 0x1000 to CCCD descriptor of characteristic you want to receive notifications from. Otherwise android BLE stack will silently discard notification packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>