I want to transmit 1gb video file from a device and receive it on another device (I am planning to use Wi-Fi). Both devices will work as transceiver. This post is more about ask for guidance.
First, I thought ESP32 with SD Card is suitable since it has already wifi feature. But I did not see any project like that (large data transfer) done in the library or in the forum. Then I made it for a txt file as in examples but for video file I couldn't even read it from SD card. I am unsure is this(Using ESP32) a suitable way for such a project. Of course actual implementation will depend on specific requirements. What I want is guidance from an experienced so he can break down the project into smaller tasks for me to do. So anyone who want to do similar project can learn.
Using ESP32 for transferring large video files via WiFi is feasible but may require adapting existing examples. Break down tasks into file handling, WiFi setup, data transfer protocol, error handling, testing, and documentation. Seek help from resources like ESP32 docs and forums. Good luck!
Edited the original post. As I said there is no limitation I just tried for pair of ESP32 WROOM DAs with SD connected. I could send and receive a .txt file but for video file (I tried .avi) I could not even read it from SD. There is no specific problem, as I said I need guidance so I don't have to do extra work for ESP32 if this is not the "normal" way to do such a task (large data transfer).
Do you care about errors? How will you know when an error occurs? Only when the entire file has been transmitter or when the error occurs? What to do then?
I would first work the file..
You should be able to read the file in chunks, like 10k at a time..
Calc how many chunks are in the file..
Be able to seek/read to any particular chunk..
Don't have to do anything with the chunks yet, that's phase 2..
something to peek at.. Sd DB
Here I use a file of structures, could easily had been a 10k buffer instead, although not on an Uno (not enough memory)..
But I do use seek and cal how many records, so maybe it does help some even though it was on an uno..
Text vs video and the specific type of video shouldn't matter, if you're treating the files like a (gigantic) bunch of bytes. What worked with the text, and how did the video fail? Was the video a lot bigger? Did you try to read it all at once?
You're going to have to read a 1GB file in chunks, with the chunk size as some doubling of 4KiB, the base SD cluster size; or you need to treat the file as a stream.
WiFi speeds vary of course, but sending 1 GB over the air could take on the order of an hour, and that does not including reading that much off disk and also writing that much to disk. (There would be some overlap of those times.) You might start by prototyping and timing those steps separately.
Espressif provides an SDWebServer example that apparently supports both downloads and uploads. It should be available in the IDE under File | Examples | WebServer. After using it to verify assumptions, you may be able to stitch the two sides together with some HTTP to transmit between devices.