<?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>How to enable notification on NRF52832 peer?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22026/how-to-enable-notification-on-nrf52832-peer</link><description>Hi, 
 I develop application using BLE.
In my scenario two NRF52832 operate in two different roles (Client and Server).
I have ready to run app (as server) and can communicate with MCP on Android platform using notification. But have problem with enabling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 14 May 2017 22:38:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22026/how-to-enable-notification-on-nrf52832-peer" /><item><title>RE: How to enable notification on NRF52832 peer?</title><link>https://devzone.nordicsemi.com/thread/86424?ContentTypeID=1</link><pubDate>Sun, 14 May 2017 22:38:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef76b703-21cb-4f58-b9ab-dcb2ee440a43</guid><dc:creator>HeS</dc:creator><description>&lt;p&gt;Aaa, thanks a lot. Now I know where to go:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable notification on NRF52832 peer?</title><link>https://devzone.nordicsemi.com/thread/86425?ContentTypeID=1</link><pubDate>Sun, 14 May 2017 20:52:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b9f5d3a-7e94-4adb-a5e1-57615fb85736</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;... CCCD UUID which is specified by BT SIG &lt;a href="https://www.bluetooth.com/specifications/gatt/descriptors"&gt;here&lt;/a&gt; (= 0x2902). Once you know handle number you can use Write or Write with Response to push 16-bit (2 byte) value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable notification on NRF52832 peer?</title><link>https://devzone.nordicsemi.com/thread/86423?ContentTypeID=1</link><pubDate>Sun, 14 May 2017 20:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a12822ae-900c-4987-be6b-61497c46a5d3</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well normally there is no &amp;quot;key&amp;quot; how should be (G)ATT handles organized on Server side and they can even dynamically change over time. There is so-called Service Discovery procedure where Client (typically right after connection is established) uses ATT methods to enumerate some or all ATT handles. It typically looks for Primary Services (all their Characteristics and other objects are organized in a &amp;quot;block&amp;quot; before start of another Primary Service) by their 16 or 128-bit UUIDs (2 or 16 bytes). UUID is kind of &amp;quot;name&amp;quot; on GATT layer which is used by higher (GAP&amp;amp;APP) layer to work with counterpart on the other side of the link but on ATT/GATT itself everything is identified by handle number (16-bit value from 0x0001 to 0xFFFF). So if you know ATT handle number you can use it directly. If not then you are looking for specific Primary Service UUID, under it Characteristic UUID and under it...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable notification on NRF52832 peer?</title><link>https://devzone.nordicsemi.com/thread/86422?ContentTypeID=1</link><pubDate>Sun, 14 May 2017 20:21:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0eaff20-88be-4130-ab39-ddf2c62a3a02</guid><dc:creator>HeS</dc:creator><description>&lt;p&gt;Thank you for the hint.
I found an example of how to do this.
Unfortunately, in the example given there are &amp;quot;magic numbers&amp;quot;:)
In particular I do not know how to find a cccd handle for given characteristic (in the example == 16).
Is the cccd handler always first on the list of handlers?
Of course there is no problem with recomputing CRC-16 for different parameters.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable notification on NRF52832 peer?</title><link>https://devzone.nordicsemi.com/thread/86421?ContentTypeID=1</link><pubDate>Sat, 13 May 2017 21:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07751a21-5558-45d9-8117-555224b9da49</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Yes, if you don&amp;#39;t pair with device then you cannot assume it will remember GATT Server state after disconnecting. You simply find Client Characteristic Configuration Descriptor (CCCD) attached to Characteristic you want to enable Notifications on and write particular bit into it (Write or Write with Response (G)ATT methods should do the job). CCCD has 16-bit value, enable/disable Notifications bit is the lowest one (but remember that BLE uses little endian encoding so depending on data string interpretation you want to write 0x0001 or 0x0100).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>