<?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>flash write</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28624/flash-write</link><description>hello,
Is there any examples to write beacon properties like uuid major and minor in flash memory when i edit the values from mobile app i want to advertise those values. in nrf52840 using sdk 14.1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Dec 2017 13:04:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28624/flash-write" /><item><title>RE: flash write</title><link>https://devzone.nordicsemi.com/thread/113457?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 13:04:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9e9119a-3747-40b7-98c0-e9fb5b63e307</guid><dc:creator>coolboy</dc:creator><description>&lt;p&gt;ok for your information. i just need to change the value of uuid major and minor through mobile app after getting the new values. i want to advertise with those values in advertisement packet. without writing in flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash write</title><link>https://devzone.nordicsemi.com/thread/113456?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 13:00:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f14d9c0-6b46-4c78-ae90-d5cfa111924a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;It doesn&amp;#39;t matter where you leave the code, it&amp;#39;s important that you catch the write event and execute sd_ble_gap_adv_data_set (). I would suggest you to study how it works with ble_app_uart or ble_app_blinky.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash write</title><link>https://devzone.nordicsemi.com/thread/113455?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 12:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5ac2fe1-72da-4432-9964-097369ab1bd3</guid><dc:creator>coolboy</dc:creator><description>&lt;p&gt;hi hung,
for me i dont want to write the value in flash. no issues i dont want to retain the value after the device gets reset. i am having a doubt. i have created service for uuid major and minor to read and write. where i want to place the sd_ble_gap_adv_data_set. can i make in the beacon .c file or can i do it in main.c file in my beacon_write_handler function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash write</title><link>https://devzone.nordicsemi.com/thread/113454?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 12:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2a2b062-6687-47b4-9a0a-17b040bc2625</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you don&amp;#39;t want to retain the value after the device get reset then you don&amp;#39;t need to write to flash.&lt;/p&gt;
&lt;p&gt;If you want to update advertising packet, you simply set the new value using sd_ble_gap_adv_data_set(), you don&amp;#39;t need to stop and start advertising. I assume you advertising at the same time as having a connection ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash write</title><link>https://devzone.nordicsemi.com/thread/113453?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 03:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15d7ef67-b746-489c-9922-2382f2040c2d</guid><dc:creator>coolboy</dc:creator><description>&lt;p&gt;hi humg bui,
i have written code for read and write by myself.. my doubt is with out writing the received code to flash. after the on_write() function in GATT_WRITE is made can i make stop_advertising(), and generate new advertisement packet using new values and advertise again. am i correct? or i want to write in flash&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash write</title><link>https://devzone.nordicsemi.com/thread/113452?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 13:51:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16c46562-2a36-4e3c-bc06-97abfa233f11</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not implemented. You need to implement your own application code to do so. You need to write code to handle the write command from the phone. And then write that value down into flash. Then write some code to check the value in the flash and if it&amp;#39;s not 0xFFFF or the default one, you read the value and use it in your beacon advertising packet.&lt;/p&gt;
&lt;p&gt;To learn how to write to flash have a look at the fds example &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/fds_example.html?cp=4_0_0_4_6_8"&gt;here&lt;/a&gt; and the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/lib_fds.html?cp=4_0_0_3_50"&gt;library documentation here.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>