<?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>Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63541/advertisement-data-stored-in-flash-memory</link><description>I have nrf52840 dongle and sdk nRF5_SDK_17.0.0_9d13099. 
 I would like to know, is there is an example in which, Advertisement Data is stored in flash memory and reading and writing can be done on it. 
 In order to protect data from getting erase after</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Aug 2020 13:07:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63541/advertisement-data-stored-in-flash-memory" /><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/265114?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 13:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:662b5b3c-9dd1-4999-a76f-9e200cd7699a</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;fds_record_update() will update the descriptor to a new record and invalidate the old one. The old will then be deleted when you run the gc. fds_record_write() however will make a new record, and the old record will not be deleted, resulting in more usage of space. The method of fds_record_update() would be the correct method if you want to update a record.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/265050?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 09:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe5f9c4c-34c5-428d-b77f-b9d471b0481d</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Jared ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I want to modify an existing record.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will explain the flow of the code when I want to write the exiting record&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;first, I use&amp;nbsp;fds_record_find to get the record then I use&amp;nbsp;fds_record_update function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if I use&amp;nbsp;fds_record_write instead of&amp;nbsp;fds_record_update, then the record in flash memory doesn&amp;#39;t change.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;so I tried to delete the record, by calling fds_record_delete function and then&amp;nbsp;fds_record_write.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Even after that, all the records are shown in flash memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Shailesh&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/265033?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 09:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54733743-58d3-4bbb-9f42-82a20af864df</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you updating already existing records or are you writing new ones every time? What function are you calling when you write the data?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/265005?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 08:03:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a014afdd-4ff6-441c-8f9a-e82f0fa3bb67</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Jsared,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As per your suggestion, I used the FDS library and stored advertising data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but now I am finding an issue is that each time when I write the data, the size of a memory where data is written is increasing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After writing data, record_Id of fds_record_desc_t, gets incremented.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but&amp;nbsp;gc_run_count remains zero only.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;do I have to remove all records, as I just want a single record only?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;shailesh&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/259934?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 13:58:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b94d76e4-730e-4015-98a2-64f2585b7227</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is regarding deceleration of characteristics if you chose to store the attributes in user controlled part of the memory. Regarding advertisement data, you can store the data that you want to advertise as an&amp;nbsp;fds record and then open the record and set it to&amp;nbsp;ble_advdata_manuf_data_t.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/259551?ContentTypeID=1</link><pubDate>Sat, 11 Jul 2020 11:21:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:081dfd3b-073c-4fdd-9925-556d869af64b</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;I am using Nordic SDK nRF5_SDK_17.0.0_9d13099 and while defining characteristic, i come to a structure, from ble_gatt.h file, structure is as&lt;/p&gt;
&lt;p&gt;/**@brief GATT Attribute. */&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt; ble_uuid_t const *p_uuid;&amp;nbsp;&lt;br /&gt; ble_gatts_attr_md_t const *p_attr_md;&amp;nbsp;&lt;br /&gt; uint16_t init_len;&amp;nbsp;&lt;br /&gt; uint16_t init_offs; uint16_t max_len;&amp;nbsp;&lt;br /&gt; uint8_t *p_value; /**&amp;lt; Pointer to the attribute data.&amp;nbsp;&lt;br /&gt; The stack may access that memory directly without the application&amp;#39;s knowledge. For writable characteristics, this value must not be a location in flash memory.*/&lt;br /&gt;} ble_gatts_attr_t;&lt;/p&gt;
&lt;p&gt;In this structure, p_value is pointing to attribute data and as per SDK, its value location must not be in flash memory.&lt;/p&gt;
&lt;p&gt;If this is so then how can I put advertisement data into flash memory?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Shailesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisement Data stored in Flash Memory</title><link>https://devzone.nordicsemi.com/thread/259194?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 12:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:182913d0-e98e-43cd-b05b-5b222293aef6</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No there isn&amp;#39;t an example on this in SDK but you could achieve this by combining BLE with the FDS library. You would have to open the record that contains the stored advertising data and then initialize the advertising_init struct with this data.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jsared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>