<?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>Characteristic Location on notification</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3627/characteristic-location-on-notification</link><description>Hi everyone, 
 i have an Characteristic with attr_md.vloc = BLE_GATTS_VLOC_STACK; . Is it possible, when i send a notifcation to use params.p_data and params.len to send data from a different location? 
 Thanks in advance,
Cheers!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Oct 2014 14:59:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3627/characteristic-location-on-notification" /><item><title>RE: Characteristic Location on notification</title><link>https://devzone.nordicsemi.com/thread/13158?ContentTypeID=1</link><pubDate>Fri, 24 Oct 2014 14:59:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ce42e3b-da62-4696-abbd-4f3d7339de49</guid><dc:creator>leo</dc:creator><description>&lt;p&gt;Hey Kristin, thanks for your reply and sorry for the delay. Alright, thus it would be possible to set the location of the memory of the characteristic to &amp;#39;BLE_GATTS_VLOC_STACK;&amp;#39;, thus if the client writes something in the characteristic he writes on the stack. But, if i want to notify the client, i can use a other memory location (just for the notification) and the actual value of the characteristic stays the same?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristic Location on notification</title><link>https://devzone.nordicsemi.com/thread/13157?ContentTypeID=1</link><pubDate>Mon, 06 Oct 2014 11:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:387bd2b3-c2cf-4550-82bb-a045ec77c05d</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;When transmitting a notification, you should provide a pointer to where the data is located, and that is not relatead to BLE_GATTS_VLOC_STACK.
When creating a characteristic, setting &lt;code&gt;attr_md.vloc = BLE_GATTS_VLOC_STACK;&lt;/code&gt; means that  &amp;quot;&lt;em&gt;Attribute Value is located in stack memory, no user memory is required&lt;/em&gt;&amp;quot;. This sets where the data in a characteristic is stored, and that is independent of  the &amp;quot;origin&amp;quot; of the data to transmit in a notification.&lt;/p&gt;
&lt;p&gt;In the ble_app_uart example in SDK 6.0.0 in the \Board\pca10001\s110\experimental-folder, notifications are transmitted using sd_ble_gatt_hvx(..) the following way:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t ble_nus_send_string(ble_nus_t * p_nus, uint8_t * string, uint16_t length)
{
   ble_gatts_hvx_params_t hvx_params;

   if (p_nus == NULL)
   {
       return NRF_ERROR_NULL;
   }

   if ((p_nus-&amp;gt;conn_handle == BLE_CONN_HANDLE_INVALID) || (!p_nus-&amp;gt;is_notification_enabled))
   {
       return NRF_ERROR_INVALID_STATE;
   }

   if (length &amp;gt; BLE_NUS_MAX_DATA_LEN)
   {
       return NRF_ERROR_INVALID_PARAM;
   }

   memset(&amp;amp;hvx_params, 0, sizeof(hvx_params));

   hvx_params.handle = p_nus-&amp;gt;rx_handles.value_handle;
   hvx_params.p_data = string;
   hvx_params.p_len  = &amp;amp;length;
   hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;

   return sd_ble_gatts_hvx(p_nus-&amp;gt;conn_handle, &amp;amp;hvx_params);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristic Location on notification</title><link>https://devzone.nordicsemi.com/thread/13156?ContentTypeID=1</link><pubDate>Tue, 23 Sep 2014 14:29:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41aa1476-a737-476e-a46c-f5a742ad2499</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What do you mean by different location? Please clarify by editing the question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>