<?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>BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48014/ble-custom-characteristics-values-are-getting-reset-on-a-board-power-cycle-in-nrf52832</link><description>Hi, 
 I am working on NRF52832 board in segger embedded studio. I am using nrf SDK 15.0.0. 
 I have created BLE custom characteristics and using nrfConnect mobile app to communicate with the Nordic board. On a power cycle, the custom characteristics values</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Jun 2019 06:57:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48014/ble-custom-characteristics-values-are-getting-reset-on-a-board-power-cycle-in-nrf52832" /><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/191777?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2019 06:57:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b07ea81-fa47-48de-9ee5-252c1f9f42ad</guid><dc:creator>Srivisakh</dc:creator><description>&lt;p&gt;Thanks for the reply.&amp;nbsp;&lt;br /&gt;I was able to save the BLE data in flash memory and retrieve the data using &lt;span&gt;sd_ble_gatts_value_set&lt;/span&gt;&lt;span&gt;() function, and on a power cycle, the custom characteristics were restored.&lt;br /&gt;&lt;br /&gt;Right now, I have a clarification like, instead of storing this data in flash memory and retrieving using&amp;nbsp;sd_ble_gatts_value_set(), can I use the bonded information functionality in this case to store and retrieve.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/190973?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 07:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:065316ef-7a60-449b-8a67-d5bcf44d3802</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/5627/sd_ble_gatts_value_set-returns-nrf_error_invalid_addr/19712#19712"&gt;this post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/190912?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 19:33:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f9519ba-dc6d-4d53-aecd-d537ad1e7dd5</guid><dc:creator>Srivisakh</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;I am trying to use&amp;nbsp;sd_ble_gatts_value_set() as a part of on_connect() function. on_connect() will be called when any android phone is attempting to connect to the server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;&lt;span&gt;sd_ble_gatts_value_set() and assigned the gatt_value from flash memory, so that the handle will be getting the value even after power cycle. But I am getting&amp;nbsp;NRF_ERROR_INVALID_ADDR error after sd_ble_gatts_value_set() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What can be the reason. Please help and please heads up if my understading about the&amp;nbsp;sd_ble_gatts_value_set() is wrong or not.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/190228?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 09:52:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b139e3f-dd45-4888-846a-4af2ea3919fe</guid><dc:creator>Srivisakh</dc:creator><description>&lt;p&gt;Thanks for the reply Awneil. One small clarification : Values for the custom characteristics are being input through nrfConnect mobile app and these values only I need to store in flash memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/190223?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 09:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:194e268f-d009-4701-a659-7b38c4db02d9</guid><dc:creator>awneil</dc:creator><description>[quote userid="73075" url="~/f/nordic-q-a/48014/ble-custom-characteristics-values-are-getting-reset-on-a-board-power-cycle-in-nrf52832/190216"]Now my query is that how to give those data to the custom characteristics on a power cycle. In another words[/quote]
&lt;p&gt;In exactly the same way that you set them up in the first place!&lt;/p&gt;
&lt;p&gt;It&amp;#39;s just a matter of taking the values that you read from Flash instead of hard-coding them in your source code!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/190216?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 09:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11c863a0-183f-4e5f-86d0-edef012e640a</guid><dc:creator>Srivisakh</dc:creator><description>&lt;p&gt;Thanks for the fast response Awnell.&amp;nbsp;&lt;br /&gt;I am able to store the characteristic value in flash memory. Now my query is that how to give those data to the custom characteristics on a power cycle. In another words, which soft device API should I use to give the stored value to custom characteristics?&lt;br /&gt;I got a clue from the below link like &amp;quot;&lt;span&gt;sd_ble_gatts_value_set()&amp;quot; in the below link&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/19759/most-efficient-smart-way-of-persisting-characteristic-values-on-nrf52"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/19759/most-efficient-smart-way-of-persisting-characteristic-values-on-nrf52&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE custom characteristics values are getting reset on a board power cycle in NRF52832</title><link>https://devzone.nordicsemi.com/thread/190211?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 09:01:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5247816-861b-4860-a598-e8e8e3c3d043</guid><dc:creator>awneil</dc:creator><description>[quote userid="73075" url="~/f/nordic-q-a/48014/ble-custom-characteristics-values-are-getting-reset-on-a-board-power-cycle-in-nrf52832"]On a power cycle, the custom characteristics values are getting reset[/quote]
&lt;p&gt;Of course they are: RAM is volatile, so&amp;nbsp; &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;anything&lt;/strong&gt; &lt;/em&gt;&lt;/span&gt;stored in RAM is going to be lost over a power cycle!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45606/getting-hex-values-for-entering-numeric-values/187663#187663"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/45606/getting-hex-values-for-entering-numeric-values/187663#187663&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So, if you want &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;em&gt;anything&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt; to be retained over a power cycle, you need some sort of non-volatile storage.&lt;/p&gt;
&lt;p&gt;The same applies to any microcontroller - it is not specific to Nordic or to BLE Characteristic values.&lt;/p&gt;
&lt;p&gt;The Nordic SDK provides the following to use the nRF52&amp;#39;s Flash for non-volatile data storage:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Flash Data Storage (FDS)&amp;nbsp;:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Flash Storage:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fstorage.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fstorage.html&lt;/a&gt;&amp;nbsp;(this is the low-level driver used by FDS)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SDK Examples are linked from the above pages.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>