<?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>How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90885/how-to-verify-sdk-data-and-application-in-ncs-connect-sdk-v1-9-1</link><description>Hi, 
 We are using NCS Connect SDK v1.9.1 with nRF52833. 
 We wanted to verify the application and SDK data region. Can you please suggest ways to verify.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Jan 2023 21:02:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90885/how-to-verify-sdk-data-and-application-in-ncs-connect-sdk-v1-9-1" /><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/405338?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 21:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d44974b-9ae1-40f0-aa48-88ae9fc33dcb</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please contact your regional sales manager for the feature request.&amp;nbsp;If you don&amp;#39;t know who your RSM is or don&amp;#39;t have their contact info you can get in touch with the RSM of your area by filling out the sales-related questions form&amp;nbsp;&lt;a href="https://www.nordicsemi.com/About-us/Contact-Us"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/405027?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2023 12:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83ff8586-37af-48ad-9af4-3efda0a30a43</guid><dc:creator>hiteshk014</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We have&amp;nbsp;mentioned queries,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. As you mentioned in one of comments, SDK will have CRC verification for a block data as an improvement, is there any plan of getting this&amp;nbsp;CRC verification anytime soon,&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1673871611779v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. As there is no API to verify CRC for internal flash sector, where the device name, RPL entries, app key, network key &amp;amp; device key are getting stored post provisioning, how do we identify the failure in this sector of memory block if it is corrupted, as we can observe these all mentioned information is getting stored, is there any mechanism to identify failure in this memory chunk prior to enable BLE&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3. Is there any api provided by SDK which we can call to check the failure in internal flash so that we can enable the corrective actions in our system.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hitesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/399242?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 15:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85ff031e-7c36-4a3f-b82c-8f703fcdddaf</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="Akanksha"]Does all the previous ates stored in nvs storage area are verified while initializing the nvs? If yes, could you direct me to the api/ part of code where this requirement is achieved?[/quote]
&lt;p&gt;All ates get verified. Any ate which is invalid is skipped.&lt;/p&gt;
[quote user="Akanksha"]What is the use of nvs_gc api ?[/quote]
&lt;p&gt;It is the garbage collection routine - it removes waste records&amp;nbsp;&lt;span&gt;and makes some room for new records&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/399241?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 15:38:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:771dc10d-5da8-4f90-bbdb-e1b7bf09c47c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="vim_nordic"]I am not wanted to added data payload CRC, but if we want to verify the SDK data manually before initializing the Bluetooth and after flash initialization. How can we verify NVS?&amp;nbsp;[/quote]
&lt;p&gt;&lt;span&gt;&amp;nbsp;As I mention NVS doesn&amp;#39;t implement CRC for data blocks - this need to be done as an improvement to NVS or be implemented in the NVS&amp;#39;s data user module (settings backend).&lt;/span&gt;&lt;/p&gt;
[quote user="vim_nordic"]Requesting you to provide the API list which we can use to verify the NVS before initilization.[/quote]
&lt;p&gt;&lt;span&gt;NVS checks its metadata internally - no API for that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/398908?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 06:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec4ce379-7a20-4f25-a79a-14d26206f3eb</guid><dc:creator>Akanksha</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. Does all the previous ates stored in nvs storage area are verified while initializing the nvs? If yes, could you direct me to the api/ part of code where this requirement is achieved?&lt;/p&gt;
&lt;p&gt;2. What is the use of nvs_gc api ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/398548?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 13:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afeb9d86-eacb-460b-a498-d54df467e1ba</guid><dc:creator>Akanksha</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;AmandaH,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you told the NVS data is verified during initialization, could you please walk me to the api&amp;#39;s or logic where the nvs is validated while initializing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/398443?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 06:55:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d00229c-c6fe-4a7d-afd9-8c07b458804d</guid><dc:creator>vim_nordic</dc:creator><description>&lt;p&gt;Thanks, Amanda, for your response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. I am not wanted to added data payload CRC, but if we want to verify the SDK data manually before initializing the Bluetooth and after flash initialization. How can we verify NVS?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. Requesting you to provide the API list which we can use to verify the NVS before initilization.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381778?ContentTypeID=1</link><pubDate>Tue, 16 Aug 2022 12:31:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7a7f967-ca8e-4183-81d0-6fe3f81efa68</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. Yes, Each metadata (ATE) contains its own CRC against its fields.&lt;/p&gt;
&lt;p&gt;2. NVS does not implement CRC for data chunks - it is up to you to add your own data-payload-CRC in the data you write.&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381642?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 21:29:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e3e1335-134c-40ba-9658-406c09ecd276</guid><dc:creator>hiteshk014</dc:creator><description>&lt;p&gt;Hi AmandaH,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Awaiting for your reply&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381084?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 06:34:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2dd6464-cd1c-4a07-bc40-ed33b05a7cbf</guid><dc:creator>hiteshk014</dc:creator><description>&lt;p&gt;Hi AmandaH,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;we referred to&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/2.0.2/zephyr/services/storage/nvs/nvs.html" href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/reference/storage/nvs/nvs.html?highlight=nvs_init"&gt;Non-Volatile Storage (NVS)&lt;/a&gt;&amp;nbsp;page you mentioned in previous reply&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;strong&gt;Byte related CRC check is mentioned in this point Each element is stored in flash as metadata (8 byte) and data. The metadata is written in a table starting from the end of a nvs sector, the data is written one after the other from the start of the sector. The metadata consists of: id, data offset in sector, data length, part (unused) and a crc&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now after referring to this we explored and could find&amp;nbsp;&lt;strong&gt;nvs_ate_valid&amp;nbsp;&lt;/strong&gt;in&lt;strong&gt;&amp;nbsp;nvs.c &lt;/strong&gt;file (Path:&amp;nbsp;zephyr\subsys\fs\nvs\nvs.c) which returns 1 if CRC &amp;amp; Offset is valid,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;our queries:&lt;/p&gt;
&lt;p&gt;1. This CRC check is happening for Each 8 byte metadata right ?&lt;/p&gt;
&lt;p&gt;2. We need an API to check CRC of this 24kb Chunk not just Metadata, can you please suggest if we have any mechanism to validate the CRC of this 24kb SDK data memory, Or if can you suggest the memory location from the where we can pick CRC count if the CRC of this chunk is already getting validated in SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381083?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 09:31:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44c92a38-44c1-48e8-8c00-8a884f1fc630</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From &lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/2.0.2/zephyr/services/storage/nvs/nvs.html" href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/reference/storage/nvs/nvs.html?highlight=nvs_init"&gt;Non-Volatile Storage (NVS)&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;em&gt;During initialization NVS will verify the data stored in flash, if it encounters an error it will ignore any data with missing/incorrect metadata.&lt;/em&gt;&lt;/pre&gt;
&lt;p&gt;Is this what you are looking for?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;From&amp;nbsp;the note in the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/reference/settings/index.html"&gt;Settings&lt;/a&gt;&amp;nbsp;page&lt;/span&gt;:&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;&lt;em&gt;As of Zephyr release 2.1 the&amp;nbsp;&lt;span&gt;recommended&lt;/span&gt;&amp;nbsp;&lt;span&gt;backend&lt;/span&gt;&amp;nbsp;for&amp;nbsp;&lt;span&gt;non&lt;/span&gt;-&lt;span&gt;filesystem&lt;/span&gt;&amp;nbsp;&lt;span&gt;storage&lt;/span&gt;&amp;nbsp;is&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/reference/storage/nvs/nvs.html#nvs-api"&gt;&lt;span&gt;NVS&lt;/span&gt;&lt;/a&gt;.&amp;nbsp;&lt;/em&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;-Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381082?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 10:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e91a0a85-e66f-41a9-8078-b2888e3865dd</guid><dc:creator>vim_nordic</dc:creator><description>&lt;p&gt;Hi AmandaH,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am wanted to verify the &amp;quot;storage_partiontion&amp;quot; which is storing the SDK data like provisioning/un-provisioning, sequence number, IV index, RPL messages etc. on device bootup not the image.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Vimal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381081?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 08:27:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af7b6835-8870-4a60-876a-fd019b0c1206</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you mean the&amp;nbsp;verification running on the chip? If so, we think MCUBOOT can do some integrity checks before starting the application. If the image is not valid, it should not boot&lt;/p&gt;
&lt;p&gt;&lt;a title="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#integrity-check" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#integrity-check" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/design.html#integrity-check&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381080?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 05:23:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b52079bb-b825-44c0-b3bb-b901430acffd</guid><dc:creator>vim_nordic</dc:creator><description>&lt;p&gt;Hi AmandaH,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our Requirement is to validate the whole SDK area. Is SDK partition data is valid or got corrupted before initializing any application module?&lt;/p&gt;
&lt;p&gt;Are we handling this validation in SDK already? If yes, where and how?&lt;/p&gt;
&lt;p&gt;if No, how we can handle this?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Vimal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to verify SDK data and application in NCS CONNECT SDK v1.9.1?</title><link>https://devzone.nordicsemi.com/thread/381079?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 11:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f087534-6b3a-4421-891e-05cf03a6d69d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What&amp;nbsp;&lt;span&gt;application and SDK data would you verify?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;May I know more detail about your application?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>