Search found 5 matches

by ThomasP
Wed Mar 30, 2022 3:48 pm
Forum: ESP32 boards
Topic: Used space of a file on disk
Replies: 6
Views: 2430

Re: Used space of a file on disk

AH, ok, well, ELF is a file format for executable files (e.g. programs), specifically executable files that will be run on a machine which provides linking to other files. ELF is a file format, but it's still just a file, like a json file vs a py file. A text file isn't an ELF, and a python file is...
by ThomasP
Wed Mar 30, 2022 3:45 pm
Forum: ESP32 boards
Topic: Used space of a file on disk
Replies: 6
Views: 2430

Re: Used space of a file on disk

Zero-byte files don't appear to use any disk space, but they'll use up inodes. Not all versions of MicroPython return a useful inode count. Non-empty files take up a number of blocks on the FS. Thanks for your answer, I found out that functions getting size of a file will only return the size of it...
by ThomasP
Mon Mar 28, 2022 9:44 am
Forum: ESP32 boards
Topic: Used space of a file on disk
Replies: 6
Views: 2430

Re: Used space of a file on disk

can you post the (ideally simplified) file, and the file size you see on your computer and the file size reported by micropython? I expect zero for an empty file, i see that on *nix systems and micropython. Filename and other filesystem data is on the filesystem, not the file itself. Are you only s...
by ThomasP
Sun Mar 27, 2022 5:14 pm
Forum: ESP32 boards
Topic: Used space of a file on disk
Replies: 6
Views: 2430

Used space of a file on disk

Hello, I'd like to retrieve the actual size of a file on my ESP32 board. I've read a lot of topics talking about os.stat(filepath).st_size and os.statvfs(filepath) But both methods return 0 for an empty file even though it shouldn't : for instance, ELF header (and filename) is not taken in account f...
by ThomasP
Wed Mar 02, 2022 11:09 am
Forum: General Discussion and Questions
Topic: Change dhcp_hostname of esp32 in AP_IF mode
Replies: 0
Views: 10028

Change dhcp_hostname of esp32 in AP_IF mode

Hello ! I'd like to know if it is possible to access ESP32's content in access point (AP_IF) mode, using an hostname instead of its IP. Currently I'm only able to do it in station mode (STA_IF), by setting its hostname using wlan.config(dhcp_hostname='hostname') but it doesn't work using AP_IF mode....