<?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>[nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2356/nrf8001-cccd-has-no-write-permission</link><description>I added a local service with a characteristic with the Notify permission set.
On the device I&amp;#39;m connecting from to the nRF8001, I can see my custom characteristic has a 0x2902 (CCCD) descriptor. However, it has no permissions enabled, and thus I cannot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 May 2014 11:16:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2356/nrf8001-cccd-has-no-write-permission" /><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9674?ContentTypeID=1</link><pubDate>Mon, 05 May 2014 11:16:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e5f3072-062a-4e3a-b960-3710d6fbb310</guid><dc:creator>Michiel Lowijs</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;Thanks for thinking along with me.&lt;/p&gt;
&lt;p&gt;Turns out everything works fine, but two things threw me off:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Android told me the permissions on the descriptor were 0, but I actually do have permission to write to it. I don&amp;#39;t know why it says I don&amp;#39;t. I said I tried writing to it anyway, but didn&amp;#39;t work, but that is because:&lt;/li&gt;
&lt;li&gt;I was reading the Android documentation wrong. It isn&amp;#39;t enough to enable notifications on the characteristic through the built-in API method, but you have to explicitly write the ENABLE_NOTIFICATIONS value to the descriptor to make it work.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And all is well now!&lt;/p&gt;
&lt;p&gt;Android snippet describing the code needed to make it work: &lt;a href="http://developer.android.com/guide/topics/connectivity/bluetooth-le.html#notification"&gt;developer.android.com/.../bluetooth-le.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9673?ContentTypeID=1</link><pubDate>Fri, 02 May 2014 19:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd04438f-8875-4cec-b849-6c7014604fb7</guid><dc:creator>Chris Lovett</dc:creator><description>&lt;p&gt;woops my bad, I missed the nRF8001 in the title of the post.  So ignore what I said :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9672?ContentTypeID=1</link><pubDate>Fri, 02 May 2014 07:39:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cd2dd21-75cd-4bf1-8a54-5098765ce79f</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;I think the poster is using an nRF8001. The CCCDs in the nRF8001 are handled automatically without any user code.
The ability to Notify is mapped to a &amp;quot;Pipe&amp;quot;. This &amp;quot;Pipe&amp;quot; becomes available when the peer enables/subscribes to Notifications/Indictions and the &amp;quot;Pipe&amp;quot; becomes unavailable when the peer has not enabled/unsubscribed to Notifications.&lt;/p&gt;
&lt;p&gt;You can use the Android based Master Control panel(Nordic) or iOS based lightblue or PC based Master control panel(Nordic) to test subscriptions/enable Notify/Indicate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9671?ContentTypeID=1</link><pubDate>Fri, 02 May 2014 00:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:961423ae-49f6-4693-a8fe-e0ed3db3316a</guid><dc:creator>Chris Lovett</dc:creator><description>&lt;p&gt;When you setup your characteristic ble_gatts_char_md_t, attach a cccd metadata definition to it, initialized like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;memset(&amp;amp;cccd_md, 0, sizeof(cccd_md));		
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);
cccd_md.vloc = BLE_GATTS_VLOC_STACK;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then provide this to your characteristic metadata like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;char_md.char_props.write            = 1;
char_md.char_props.write_wo_resp    = 1;
char_md.char_props.notify           = 0;
char_md.p_char_user_desc            = NULL;
char_md.p_char_pf                   = NULL;
char_md.p_user_desc_md              = NULL;
char_md.p_cccd_md                   = &amp;amp;cccd_md;
char_md.p_sccd_md                   = NULL;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice I&amp;#39;ve also set the &amp;quot;write_wo_resp&amp;quot; field to 1 which skips the whole BLE_GATTS_AUTHORIZE_TYPE_WRITE step, which might be what you are hitting...&lt;/p&gt;
&lt;p&gt;Then also set no access rights on your attribute metdata, and give it write permission with wr_auth = 1;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;memset(&amp;amp;attr_md, 0, sizeof(attr_md));
BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.write_perm); 
attr_md.vloc       = BLE_GATTS_VLOC_STACK;
attr_md.rd_auth    = 0;
attr_md.wr_auth    = 1;
attr_md.vlen       = 1;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9670?ContentTypeID=1</link><pubDate>Thu, 01 May 2014 13:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c606fa5b-3ecf-47a3-b436-3ab53058aa02</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;Would it be possible for you to switch to the D version of the chip as there are multiple bug fixes and additional features for the D version as compared to the C version.
You can get breakout boards of the D version here. &lt;a href="http://www.adafruit.com/products/1697"&gt;www.adafruit.com/.../1697&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9667?ContentTypeID=1</link><pubDate>Thu, 01 May 2014 13:08:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1acdf78b-4cc7-4989-8f7f-3e9f3a8a0786</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;When you generate your settings from the nRFgo studio, you will also get a ublue_setup.gen.out.txt from the nRFgo studio. Can you attach that file as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9669?ContentTypeID=1</link><pubDate>Wed, 30 Apr 2014 09:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e208443-9b89-469a-b22e-81c03d46d56a</guid><dc:creator>Michiel Lowijs</dc:creator><description>&lt;p&gt;I tried changing the UUID of my service and characteristic to a custom base UUID, but this caused my peer device to not discover any services on the nRF8001, not even the GAP.&lt;/p&gt;
&lt;p&gt;I wanted to add the services to the advertisement packet but nRFgo Studio told me this is only for nRF8001 D devices (mine is a C).&lt;/p&gt;
&lt;p&gt;What is the master control panel?&lt;/p&gt;
&lt;p&gt;The device is a Google Nexus 5 running Android 4.4.2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9668?ContentTypeID=1</link><pubDate>Wed, 30 Apr 2014 08:57:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b430ee5-fc85-4110-9f25-2d0bbf56c975</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I cannot see anything in particular that is wrong with your setup, except that you are using the Bluetooth Base UUID. For proprietary services it is recommended that you use a proprietary base UUID instead. This can be generated in nRFgo studio. It would also make sense to add this UUID to the advertisement packer so you can see which services is on a device before connecting to it. However this wouldn&amp;#39;t fix your problem of not being able to write to the CCCD. What peer device are you using to test this? Have you tried using the master control panel?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9666?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2014 21:51:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66afd8ba-cb68-4c16-a2e0-b4d33d2229ca</guid><dc:creator>Michiel Lowijs</dc:creator><description>&lt;p&gt;Security is off.&lt;/p&gt;
&lt;p&gt;Attached the XML below!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/LaserTag.xml"&gt;LaserTag.xml&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF8001] CCCD has no Write permission</title><link>https://devzone.nordicsemi.com/thread/9665?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2014 07:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306007d6-37b3-4137-b193-4da370d18cf8</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;What is your security settings? Is is possible for you to upload your configuration XML here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>