<?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>Can I create Characteristic with Notification only, no Read, no Write</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21601/can-i-create-characteristic-with-notification-only-no-read-no-write</link><description>Can I create Characteristic with Notification only, no Read, no Write 
 I can remove the //char_md.char_props.write = 1;
and only the Read and Notify Properties show up in MCP (or the iPhone) 
 When I comment out the char_md.char_props.read = 1; </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Apr 2017 12:31:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21601/can-i-create-characteristic-with-notification-only-no-read-no-write" /><item><title>RE: Can I create Characteristic with Notification only, no Read, no Write</title><link>https://devzone.nordicsemi.com/thread/84801?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 12:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99f20392-701c-40d4-9f25-53a43109615b</guid><dc:creator>Renix</dc:creator><description>&lt;p&gt;Bjørn,
Yes, I mean updating the characteristic, not en/disabling of Notification.&lt;/p&gt;
&lt;p&gt;I actually just tested it.
I call&lt;/p&gt;
&lt;p&gt;void our_termperature_characteristic_update(ble_os_t *p_our_service, int8_t *temperature_value)&lt;/p&gt;
&lt;p&gt;which calls
sd_ble_gatts_hvx(p_our_service-&amp;gt;conn_handle, &amp;amp;hvx_params);&lt;/p&gt;
&lt;p&gt;I call three (3) Characteristic updates in succession sv(1..3)_termperature_characteristic_update()
One after the other, no delay, and it seems to work.&lt;/p&gt;
&lt;p&gt;In between the three updates, there is timer delay.&lt;/p&gt;
&lt;p&gt;I decreased the timer interrupt to 1ms in between the tree calls, just to test, so all looks good.
In the real world I have this timer set to 2 or 3 seconds.&lt;/p&gt;
&lt;p&gt;I assume something else was wrong earlier.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I create Characteristic with Notification only, no Read, no Write</title><link>https://devzone.nordicsemi.com/thread/84799?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 10:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce8a072a-5ea2-4d05-9833-807c481a0e58</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;&lt;code&gt;It seems than with no delay between CCCD updates, the code freezes. So it seems with both write&lt;/code&gt; &lt;code&gt;and read out, the Notification keeps the code busy. I now have a 2sec delay between updates, and&lt;/code&gt; &lt;code&gt;removed write and read, and it works fine.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Are you enabling and disabling Notifications(writting to the CCCD) or do you mean that you are notifying the value of the characteristic very often using &lt;code&gt;sd_ble_gatts_hvx&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I create Characteristic with Notification only, no Read, no Write</title><link>https://devzone.nordicsemi.com/thread/84798?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 13:38:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b9fc83c-7664-4d25-b563-71f7374d183a</guid><dc:creator>Renix</dc:creator><description>&lt;p&gt;Bjørn&lt;/p&gt;
&lt;p&gt;I have it working. It seems than with no delay between CCCD updates, the code freezes. So it seems with both write and read out, the Notification keeps the code busy.
I now have a 2sec delay between updates, and removed write and read, and it works fine.&lt;/p&gt;
&lt;p&gt;static uint32_t our_char_add(ble_os_t * p_our_service)
{
uint32_t   err_code = 0; // Variable to hold return codes from library and softdevice functions&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// OUR_JOB: Step 2.A, Add a custom characteristic UUID
ble_uuid_t          char_uuid;
ble_uuid128_t       base_uuid = BLE_UUID_OUR_BASE_UUID;
char_uuid.uuid      = BLE_UUID_OUR_CHARACTERISTC_UUID;
sd_ble_uuid_vs_add(&amp;amp;base_uuid, &amp;amp;char_uuid.type);
APP_ERROR_CHECK(err_code);

// OUR_JOB: Step 2.F Add read/write properties to our characteristic
ble_gatts_char_md_t char_md;
memset(&amp;amp;char_md, 0, sizeof(char_md));
//GvR
//char_md.char_props.read = 1;
//GvR
//char_md.char_props.write = 1;


// OUR_JOB: Step 3.A, Configuring Client Characteristic Configuration Descriptor metadata and add to char_md structure
ble_gatts_attr_md_t cccd_md;
memset(&amp;amp;cccd_md, 0, sizeof(cccd_md));
//GvR
//BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;cccd_md.read_perm);
//BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;cccd_md.write_perm);

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;    
char_md.p_cccd_md           = &amp;amp;cccd_md;
char_md.char_props.notify   = 1;


// OUR_JOB: Step 2.B, Configure the attribute metadata
ble_gatts_attr_md_t attr_md;
memset(&amp;amp;attr_md, 0, sizeof(attr_md)); 
attr_md.vloc        = BLE_GATTS_VLOC_STACK;   


// OUR_JOB: Step 2.G, Set read/write security levels to our characteristic
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.write_perm);


// OUR_JOB: Step 2.C, Configure the characteristic value attribute
ble_gatts_attr_t    attr_char_value;
memset(&amp;amp;attr_char_value, 0, sizeof(attr_char_value));        
attr_char_value.p_uuid      = &amp;amp;char_uuid;
attr_char_value.p_attr_md   = &amp;amp;attr_md;

// OUR_JOB: Step 2.H, Set characteristic length in number of bytes
//attr_char_value.max_len     = 3;
//attr_char_value.init_len    = 3;
//uint8_t value[3]            = {0x00, 0x73, 0xCF};
attr_char_value.max_len     = 6;
attr_char_value.init_len    = 6;
uint8_t value[6]            = {0x16, 0x15, 0x14, 0x13, 0x12, 0x11};
//uint8_t value[4]            = {0xA0,0xB1,0xC2,0xD3};
//uint8_t value[4]            = {0x00, 0x73,0x63,0x63};

attr_char_value.p_value     = value;

// OUR_JOB: Step 2.E, Add our new characteristic to the service
err_code = sd_ble_gatts_characteristic_add(p_our_service-&amp;gt;service_handle,
                                   &amp;amp;char_md,
                                   &amp;amp;attr_char_value,
                                   &amp;amp;p_our_service-&amp;gt;char_handles);
APP_ERROR_CHECK(err_code);

NRF_LOG_INFO(&amp;quot;\r\nService handle: %#x\n\r&amp;quot;, p_our_service-&amp;gt;service_handle);
NRF_LOG_INFO(&amp;quot;Char value handle: %#x\r\n&amp;quot;, p_our_service-&amp;gt;char_handles.value_handle);
NRF_LOG_INFO(&amp;quot;Char cccd handle: %#x\r\n\r\n&amp;quot;, p_our_service-&amp;gt;char_handles.cccd_handle);

return NRF_SUCCESS;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I create Characteristic with Notification only, no Read, no Write</title><link>https://devzone.nordicsemi.com/thread/84797?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 11:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3039c85a-7f4d-41f5-a0da-ff6567bb1df2</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Can you post the function where you set the attributes and add the characteristic?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I create Characteristic with Notification only, no Read, no Write</title><link>https://devzone.nordicsemi.com/thread/84800?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 22:38:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ba6b24a-7594-4449-aaff-b968b3b4a040</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;It is possible, but you are doing something wrong elsewhere (setting value of characteristic maybe?). When there is only notification possible, don&amp;#39;t set the value, but just send notification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>