Search found 98 matches

by zliudr
Wed Jan 22, 2020 4:23 am
Forum: General Discussion
Topic: Where are fuse settings in esptool command?
Replies: 1
Views: 148

Where are fuse settings in esptool command?

I was wondering if fuse settings such as the cpu frequency etc. are separately stored from program code or with the app .bin file. Because the command that flashes firmware doesn't include anything that looks like fuse settings: python /home/user/esp/esp-idf/components/esptool_py/esptool/esptool.py ...
by zliudr
Mon Jan 20, 2020 5:52 pm
Forum: General Discussion
Topic: POSIX file operations implemented on ESP32
Replies: 3
Views: 393

Re: POSIX file operations implemented on ESP32

PeterR, Thank you for your help! I just read about mutex (seen the term but never investigated). It seems that I should write a function that accesses the file directory and have mutex in it. Then different tasks shall call the same function when they want access to file directories, such as creatin...
by zliudr
Fri Jan 17, 2020 5:54 am
Forum: General Discussion
Topic: POSIX file operations implemented on ESP32
Replies: 3
Views: 393

POSIX file operations implemented on ESP32

Question: if one task does something such as rename files in a directory (move them out of the directory), and another task does something else such as creating and writing files to the same folder, will there be any conflict? I am talking about the directory needs to be opened by the routine that r...
by zliudr
Fri Jan 17, 2020 5:38 am
Forum: General Discussion
Topic: Sort files by date and delete oldest files
Replies: 7
Views: 389

Re: Sort files by date and delete oldest files

There are always better ways. Its great that you want to push forward. Delivery and improvement need to be held in balence though. IMHO the modern agile approaches are to get 'working' (test/functional) and then you may reflect on better structure (refactor etc). The solutions you read may not actu...
by zliudr
Fri Jan 17, 2020 12:45 am
Forum: General Discussion
Topic: Sort files by date and delete oldest files
Replies: 7
Views: 389

Re: Sort files by date and delete oldest files

Thanks for you advice. I read a few hits from their auto-gen similar questions. My sense is that what I described was how it's done in all the posts I found (all different programming languages) but wonder if there's a better way.
by zliudr
Thu Jan 16, 2020 11:57 pm
Forum: General Discussion
Topic: Sort files by date and delete oldest files
Replies: 7
Views: 389

Re: Sort files by date and delete oldest files

Thanks PeterR. I'll post on stack overflow and provide a link Ina reply if I can find an answer.
by zliudr
Thu Jan 16, 2020 10:27 pm
Forum: General Discussion
Topic: Sort files by date and delete oldest files
Replies: 7
Views: 389

Re: Sort files by date and delete oldest files

By the way, is there any "archive" attributes I can read/set in POSIX system? That would be great!
by zliudr
Thu Jan 16, 2020 10:11 pm
Forum: General Discussion
Topic: Sort files by date and delete oldest files
Replies: 7
Views: 389

Sort files by date and delete oldest files

I'm trying to write a maintenance routine to delete old files from an sd card when total file size is above a threshold. I'm thinking about how to sort last-modified time and here is what I've come up with: 1. Use opendir and readdir() to read struct for each file in the folder. 2. With the file nam...
by zliudr
Thu Jan 09, 2020 3:18 am
Forum: General Discussion
Topic: SHA256 encryption example?
Replies: 4
Views: 282

Re: SHA256 encryption example?

I would like to see a standard example from the source, not someone else who may or may not know all the tricks one has to do to make the library work correctly. If you want standard examples from source then you are looking in wrong place. mbedtls is 3rd party library, so you should look at mbedtl...
by zliudr
Wed Jan 08, 2020 8:24 pm
Forum: General Discussion
Topic: SHA256 encryption example?
Replies: 4
Views: 282

Re: SHA256 encryption example?

Since posting this thread I've come across both terms mbedtls and libsodium. I've not found examples included in esp-idf for mbedtls hmac sha256 though. It's unfortunate. Any link to an actual example in esp-idf? I had to use an online tutorial for esp-arduino and piece together my understanding by ...

Go to advanced search