How to use NVS for store a file of 512KB

adrianolmar
Posts: 5
Joined: Thu Sep 12, 2019 12:14 pm

How to use NVS for store a file of 512KB

Postby adrianolmar » Thu Jul 16, 2020 12:32 pm

Hi I'd like to download and store a file of 256KB from internet in NVS.
I know how to download this file, but I have a problem because memory RAM isn't enough.

How I can store this file in NVS (nvs_get_blob and nvs_set_blob) by parts?
Is there a way to store this file in NVS by small parts?
Is there a way to read only a part of these storage? For example I'd like to read 50 bytes from this file in NVS starting from 100º Byte of this file.

I think in create various "Namespace" like file_part_0, file_part_1, file_part_2, but is there a problem when I'd like to read n bytes of this file and these bytes are in two parts at the same time. See Picture below.

+----------+
| |
|PART A |
| xx| \ I'd like to read the four xxxx, if I separate the file in Namespaces, it could be a little more complex.
+----------+ /I'd like to find a easier way to do this.
|xx | /
|PART B |
| |
+----------+


Who is online

Users browsing this forum: No registered users and 105 guests