Open jameszah opened 2 years ago
No, not heard anything.
I'm more or less active with a version that has a flexible storage device interface.
It will have two functions (findfirst/findnext) that will be called to collect data.
But I have no real need for that, so my commitment is low.
It was pretty easy. Issues so far:
I'll put the modified files into my fork as a esp32-sd file manager test program - with all necessary files.
Nice. I'll keep that open as a pointer for others.
https://github.com/jameszah/ESPxWebFlMgr/tree/master/esp32_sd_file_manager
Use all the files in that folder for test program, and then delete the .ino and replace with your own project to add the sd file manager to your own projects.
The subfolders implementation turned a little kludgy in the end - most changes marked with //jz
See here for implementation with my esp32 video recorder project (replacing ftp). https://github.com/jameszah/ESP32-CAM-Video-Recorder-junior
hi Holger, obscure followup question:
I've started running these mods in host mode on esp32 rather than in normal station mode, and using a chrome browser on a android phone rather than chrome on windows going through a router.
Two strange events:
First, the files download correctly by always with a ".phps" file type ??? So both config.txt, and abc.avi binary files end up as "config.txt.phps" etc. on android. I cannot understand who is using php in this scenario.
Second, small files (< 1 megabyte) transfer fine, but larger files will stall, and then restart, and sometimes fail, and restart???
It seems to be here in the code on ESPxWebFlMge.cpp (line 856 in my slightly modified version).
I understand you cannot you cannot change the mime bindings of android chrome, but I can just rename the files, and the "stall" or "fail" would be entirely within that line streamFile below.
Any advice before I dig into that?
Thanks, James
if (f) {
//Serial.println("got it open");
fileManager->sendHeader(F("Content-Type"), F("text/text"));
fileManager->sendHeader(F("Connection"), F("close"));
//Serial.print(">");Serial.print(fn);Serial.println("<");
//Serial.println(fn.indexOf("/"));
if (fn.indexOf("/") == 0) {
fileManager->sendHeader(F("Content-Disposition"), "attachment; filename=" + fn.substring(1));
} else {
fileManager->sendHeader(F("Content-Disposition"), "attachment; filename=" + fn);
}
fileManager->sendHeader(F("Content-Transfer-Encoding"), F("binary"));
if (fileManager->streamFile(f, "application/octet-stream") != f.size()) {
Serial.println(F("Sent less data than expected!"));
}
f.close();
It looks like it is a cell-phone hardware/software issue. I tried the esp32 AP mode (host mode) from the esp32 to a WiFi on a Windows PC, and it was perfect - download a 200 megabyte binary file at exactly 4 mega-bit-per-second, without any stalls or problems -- so it must just be a samsumg-android-phone issue that gets confused at the 4 mega-byte mark. ???
I think I can live with that. Short videos or configuration only to a phone. 😄
That would have been my first suggestion: odd android or odd ported android. older android versions had very weird implementations of any stuff you stumble over. Each version solves a lot of things internally, better design, better concept, better working.
And there is this https://github.com/holgerlembke/ESPxWebFlMgr/tree/master/chrome%20browser%20problem thing...
Interesting. I was sending some streaming mjpeg video from esp to android chrome today, and it was equally weak. Things that work on a 10 year old laptop with windows 10 and chrome were stalling on a 3 month old android phone -- just display jpeg's ???
https://github.com/jameszah/ESPxWebFlMgr/tree/master/esp32_sd_file_manager
Use all the files in that folder for test program, and then delete the .ino and replace with your own project to add the sd file manager to your own projects.
The subfolders implementation turned a little kludgy in the end - most changes marked with //jz
See here for implementation with my esp32 video recorder project (replacing ftp). https://github.com/jameszah/ESP32-CAM-Video-Recorder-junior
please share me the pins and connection diagram
https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
I'm using a standard esp32-cam module with sd card. The data1, data2, and data3 are not used in 1-bit mode, so don't need to be there on another configuration.
https://github.com/jameszah/ESPxWebFlMgr/tree/master/esp32_sd_file_manager
Use all the files in that folder for test program, and then delete the .ino and replace with your own project to add the sd file manager to your own projects.
The subfolders implementation turned a little kludgy in the end - most changes marked with //jz
See here for implementation with my esp32 video recorder project (replacing ftp). https://github.com/jameszah/ESP32-CAM-Video-Recorder-junior
esp32_sd_file_manager E (26) sdmmc_io: sdmmc_io_reset: unexpected return: 0x108 E (27) vfs_fat_sdmmc: sdmmc_card_init failed (0x108). SD_MMC Mount Failed
https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
I'm using a standard esp32-cam module with sd card. The data1, data2, and data3 are not used in 1-bit mode, so don't need to be there on another configuration.
i am using the same pin out like esp32 cam module. i interfaced a sd card with esp32 board. data0 io2 data1 io4 clk io14 cmd io15 data1 io13 data2 io12
after upload this problem coming
esp32_sd_file_manager E (26) sdmmc_io: sdmmc_io_reset: unexpected return: 0x108 E (27) vfs_fat_sdmmc: sdmmc_card_init failed (0x108). SD_MMC Mount Failed
do i need to add those 47K pullup registers?
i just changed the ssid and password and upload to esp32 dev module. do i need to select any other option on board manager??
https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
I'm using a standard esp32-cam module with sd card. The data1, data2, and data3 are not used in 1-bit mode, so don't need to be there on another configuration.
sir i think i found the problem . is this esp32 sd file manager required psram? because i am not using it. i m interfacing with normal esp32 nodemcu board.
but there is not instruction about this, is there any video instruction?
There is this page: https://github.com/espressif/arduino-esp32/tree/master/libraries/SD_MMC
and as far as I see, there is no limitation with psram.
I have a wemos form factored esp32-wroom-32 pcb
in my mail/production/pipeline, might take 2 to 3 weeks. But as usual, I'm clueless and do not know what I'm doing. So no idea where it will end.
Try getting the test program working first.
You need good power, nothing pulling the lines up or down (the 47k pull up might help), sd card with fat32, not write protected (test that first). You could check voltages just with a volt meter to see that nothing is using those gpios.
I don't think the psram is an issue for the sd_mmc.
Try getting the test program working first.
You need good power, nothing pulling the lines up or down (the 47k pull up might help), sd card with fat32, not write protected (test that first). You could check voltages just with a volt meter to see that nothing is using those gpios.
I don't think the psram is an issue for the sd_mmc.
many thanks. problem solved. i did wrong connection of sd card, now its works fine, i did not add any pullup registers, just in setup i added input pullup lines for these pins and its works good. thanks a lot
Are you aware if anyone has modified this for SD card access?
I think it would be fairly straightforward. Do you think there would be roadblocks?
Maybe add both LittleFS and SD? I'll start with just SD.