<?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>Writing/Reading to Flash and Transmitting Large Amount Data Over BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128713/writing-reading-to-flash-and-transmitting-large-amount-data-over-ble</link><description>Hello everyone, 
 I am an intern and new to BLE. I was tasked with developing a simple temperature logger that will placed in rivers/lakes. So far I&amp;#39;ve had some success. 
 My development environment is as follows: Custom PCB with a nRF52832 chip, ST-Link</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jul 2026 14:13:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128713/writing-reading-to-flash-and-transmitting-large-amount-data-over-ble" /><item><title>RE: Writing/Reading to Flash and Transmitting Large Amount Data Over BLE</title><link>https://devzone.nordicsemi.com/thread/569207?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2026 14:13:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cc94acf-b385-4630-91bc-95a22591f0a7</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am happy to hear you are well on the way to a solution. If you are happy with the info I already provided, then please consider accepting my previous post as a verified answer.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing/Reading to Flash and Transmitting Large Amount Data Over BLE</title><link>https://devzone.nordicsemi.com/thread/569156?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2026 13:47:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:147d8890-e8fc-40a3-b0e9-28b525f5b5dc</guid><dc:creator>SVK0</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for the reply. I looked through the fstorage lib used its functions to create a semi-working module. There are some things to iron-out but so far I&amp;#39;ve been able to transmit the data without BLE dropping the connection. What I opted to do was load a single page into RAM, separate it into 120B chunks and transmit them over BLE until all the data has been transferred and the module moves to the next page.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing/Reading to Flash and Transmitting Large Amount Data Over BLE</title><link>https://devzone.nordicsemi.com/thread/569132?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2026 21:57:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aa7426e-169d-4c5d-95d7-eb538fc1fb7a</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I am using the nRF5 SDK 17.[/quote]
&lt;p&gt;First of all, I must inform you that the recommendation for new projects is not to use the older and now in maintenance mode nRF5 SDK, but rather the newer nRF Connect SDK. For details, see our&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;nRF Connect SDK and nRF5 SDK statement&lt;/a&gt;. For now, I will assume you are still on nRF5 SDK, but would I highly recommend a switch to nRF Connect SDK.&lt;/p&gt;
[quote user=""]I am storing a temperature reading and a timestamp +&amp;nbsp; some other data in a RAM buffer. The whole payload is 12 bytes. Now I know that a single page in flash is 4096 bytes which gives roughly 341 entries per page. How do I write to flash without disrupting the bluetooth communication. And also how do I receive the data from flash, say 10 pages worth of entries, to my central device when I issue a command from my BLE terminal or phone.[/quote]
&lt;p&gt;Both nRF5 SDK and nRF Connect SDK have libraries for working with Flash. For nRF5 SDK there is the (more low level and direct access) &lt;a href="https://docs.nordicsemi.com/r/bundle/nrf5_sdk_v17.1.0/page/lib_fstorage.html"&gt;fstorage library&lt;/a&gt;, as well as the (more abstracted, with wear leveling but with some overhead compared to fstorage) &lt;a href="https://docs.nordicsemi.com/r/bundle/nrf5_sdk_v17.1.0/page/lib_fds.html"&gt;Flash Data Storage library&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regarding Flash, please note that there is a minimum endurance of &lt;a href="https://docs.nordicsemi.com/r/bundle/ps_nrf52832/page/abs_max_ratings.html"&gt;10 000 write/erase cycles.&lt;/a&gt; After that, you may start to see bit errors or other malfunctions of the Flash memory. Because of that, and based on what you write about your current use case, I would strongly consider holding the values in RAM, if at all possible, and not go via Flash. Of course, if you need to store a large amount of data and for a longer period of time, then there might be no escaping Flash and Flash storage might be the correct approach. For storing 40 kB, RAM is not much of an option on the nRF52832 with its 64 or 32 kB of RAM. Please however consider the 10 k write/erase cycles, which means you might want wear leveling. (I.e. setting aside a number of 40 kB slots, and rotate between them where you store the data, if you expect to store data more than 10 k times during the lifetime of the product.)&lt;/p&gt;
&lt;p&gt;For writing to and reading from Flash, I would highly recommend using a library, and for your use case (if you stick with nRF5 SDK) fstorage is likely the best (since FDS adds more overhead). However, if you do need wear leveling, using FDS could be better since it provides wear leveling out-of-the-box.&lt;/p&gt;
[quote user=""]I&amp;#39;ve used the ble_nus module for simple commands: setting the time between measurements, setting the internal clock, receiving current temperature reading etc., but this time the data is quite large - over 40KB. Is this service appropriate or should I use another? And how do I go about setting it up for such a big payload of data[/quote]
&lt;p&gt;Sending large amounts of data over NUS is relatively straight-forward, since NUS is essentially just a data stream. What you then need to decide on is data format (how do the receiver know that the data blob starts and stops?) While you could go for implementing the &lt;a href="https://www.bluetooth.com/specifications/specs/object-transfer-profile-1-0/"&gt;Object Transfer Profile&lt;/a&gt; or something similar, I think that would be overly complex for your use case, and you seem to be well on your way with NUS already.&lt;/p&gt;
&lt;p&gt;Please note that NUS is available in both nRF5 SDK and in nRF Connect SDK. The latter also have libraries for working with Flash.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>