spiffs | Wear-leveled SPI flash file system for embedded devices
kandi X-RAY | spiffs Summary
kandi X-RAY | spiffs Summary
Spiffs is a file system intended for SPI NOR flash devices on embedded targets.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of spiffs
spiffs Key Features
spiffs Examples and Code Snippets
Community Discussions
Trending Discussions on spiffs
QUESTION
ANSWER
Answered 2022-Mar-25 at 12:05A template processor is used in:
QUESTION
I'm developing on an ESP32 with vscode and the ESPAsyncWebServer and Wifi libraries. I'm tring to make my own wifi manager, so I'd like to put some function in a class, but I've some trouble to point to member functions.
I have this definitions without class:
...ANSWER
Answered 2022-Mar-01 at 09:48In order to call member functions, you'll need to supply the object the member function is supposed to be called upon and it should match
QUESTION
I'm writing a webserver for an ESP32, written primarily in C and using platformio and ESP-IDF on VSCode. With a single client, the server works great, but as soon as I try to load a page on more than 1 device (doesn't matter if all the same page or different), everything slows to a crawl. I can see the page requests arriving on the server nice and snappily, but the pages won't load/be sent for up to a minute.
When this is happening, the server seems to favour an arbitrary device; my android phone, for example, will load pages at normal speeds while my PC and iPhone will be stuck, or on another occasion the PC will be loading fast and the other two devices stuck. This makes me wonder if it's related to my server/socket handling task, but ESP-IDF is such a tangled web of dependencies I'm not sure where to begin looking. I've made a post on the Espressif forum, but haven't had any responses yet. It's not the wifi connection alone, as if I connect all 3 devices but only access the webpages from one, that device still loads everything fine.
Updates:
07/02 - I'm more and more convinced that the culprit is the socket task, as it doesn't seem to allow for multiple sockets simultaneously; after accepting one it handles everything for that one socket before looping back and accepting another one.
08/02 - I modified tcp_server_task
to start a new task for each socket (below is now the modified function and additional task), but this if anything made things worse, leaving me more confused than before.
09/02 - I tried increasing the backlog argument of listen()
from 1 to 32, this also made no difference.
Attempted (failed) solutions now include:
Setting keepAlive to 0
changing dest_addr_ip4 from INADDR_ANY to 192.168.4.1, the desired address for devices to connect to
pinning the socket handling task to a different core to the tcp_server_task
adding vTaskDelay(pdMS_TO_TICKS(x)) at various points with various values of x
Stuck devices are still consistently loading simultaneously after however long it takes (usually 30 to 60 seconds, sometimes longer)
10/02 - I forgot to mention, the ESP has bluetooth enabled as well, as we want users to be able to control stuff over both wireless methods.
socket handling task(s):
...ANSWER
Answered 2022-Feb-09 at 20:27Fixed it! The solution that worked in the end wasn't actually anything to do with sockets, all I did was set the lru_purge_enable
of my httpd_config_t
to true
. All 3 devices are now very happily loading everything. I'd still be curious if anyone knows why the http (connections?) weren't being dropped and required purging.
QUESTION
I have folder contain n txt file(files have numeric values) I need to read these files and save the file contains in array. How can I read the contents of the first file1 in the array and then clear the array ,and then read the second file2 in the same array and so on?
...ANSWER
Answered 2022-Jan-12 at 09:29You could do something similar to this. Though you will need to check the proper behaviour of parseFloat()
when it doesn't detect a float value, ie., what it actually returns.
QUESTION
I'm trying to read txt file (has numeric values) line by line. I used SPIFFS and I used this function
...ANSWER
Answered 2021-Dec-15 at 14:54The File is a Stream and has all of the methods that a Stream does, including readBytesUntil and readStringUntil.
QUESTION
I have a piece of code where i read a CSV file and prints it contents. Now the issue is that I want to run my code on ESP32 and because of some limitations of micropython I can't upload my file in the spiffs storage. So is there any way I can store the csv file content in the code itself instead of reading it from the outside?
My code:
...ANSWER
Answered 2021-Sep-16 at 12:12The most obvious possiblities are ....
Hardcode the values directly in your code:
QUESTION
I'm codding for Arduino (ESP8266), and have to read a string from a file, to use it. I don't know how long is that file, so I have to create a char*
and pass it to the readConf
function so that malloc
decides for the memory size.
ANSWER
Answered 2021-Jul-10 at 12:15The function parameter buff
is a local variable of the function
QUESTION
I feel like this question has been asked a bunch of times, but none of the answers I have found seem to be working for me. I'm extremely new to CMake and C/C++ as I come from the world of Java, and am struggling to understand cmake and how it works.
Anyways, basically I have the folder structure below. This is an esp-idf project, so I don't know if that has anything to do with what I'm running into.
...ANSWER
Answered 2021-Jul-09 at 13:46The ESP-IDF build system is built on top of CMake. This means you can use all the standard features of CMake in your files. However, the the ESP-IDF system predefines many functions, and makes many assumptions about the layout of your project, supposedly to make things "easier". Instead of reading CMake documentation, start by reading and understanding the ESP-IDF build system documentation:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
It looks to me like there is a particular layout expected for subcomponents, including the format of the CMakeLists.txt
file. Specifically, move Metriful
under a new directory called components
, or add Metriful
to EXTRA_COMPONENT_DIRS
near the top of your root CMakeLists.txt
If Metriful is not written as an esp-idf component, this may not work. However, the document also describes how to link to "pure CMake" components, which will look something like this (at the end of your root CMakeLists.txt
).
QUESTION
I'm trying to port the file_serving example to use HTTPS.
I've attempted to move the spiff file server functionality to the existing https_server example inside esp-idf but I get the error: httpd_server_init: error in creating ctrl socket (112)
I realize that this is probably not the easiest way to do it and instead I should work on re-writing the original file_serving example code to use https instead. The function to start the server is in the file_server.c:
...ANSWER
Answered 2021-Jun-12 at 15:42My supervising professor had a look at the problem and found the solution. Here are the changes that were needed to be made:
Include the following line in the sdkconfig file: CONFIG_ESP_HTTPS_SERVER_ENABLE=y
“config” instead of “conf” in the file file_server.c and the configuration for the http server is a subcomponent of the https configuration and needs a "httpd.” after the “config.”:
QUESTION
I want to create a function for an ESP2866 microcontroller that saves an arbitrary number of configurations to a config file on the filesystem. I found a way to do it and I was wondering if it could be any better.
...ANSWER
Answered 2021-Jun-11 at 03:32If you really want to use templates instead of containers, you can try the following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spiffs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page