Code: Select all
WiFiClient* stream = http.getStreamPtr();
stream->readBytes();
Parameters:
Code: Select all
WiFi.mode(WIFI_STA);
WiFi.setSleep(false);
What could be causing this issue, and how can it be resolved?
Thank you!
Code: Select all
WiFiClient* stream = http.getStreamPtr();
stream->readBytes();
Code: Select all
WiFi.mode(WIFI_STA);
WiFi.setSleep(false);
aliarifat794, thank you for your involvement!aliarifat794 wrote: ↑Sat Sep 07, 2024 11:19 amCheck your router's settings, specifically the DTIM (Delivery Traffic Indication Message) interval. A lower DTIM interval can improve connectivity for IoT devices.
The question is what is different at the start.
Thank you for the reasonable question. The data is immediately written to the file, the buffer is in static memory, i.e. the allocation occurs only once. The available memory of the task stack is monitored, its amount is sufficient. The size of the total free heap is also monitored and OK. Subjectively, the CPU is not overloaded, because I do not see any signs indicating this, everything else is performed without lags.MicroController wrote: ↑Tue Sep 10, 2024 4:13 pmThe question is what is different at the start.
Where do those megabytes go? Could you be exhausting some resource (RAM or CPU) by accumulating some stuff over the transfer?
File system is FAT32.MicroController wrote: ↑Wed Sep 11, 2024 8:14 amWhat file system are you using? Where is it stored? Internal flash?
Do you close and re-open the file repeatedly for appending?
It opens the file once and then closes it at the end of downloading.SD NAND consists of NAND flash and a high-performance controller. 3.3V supply voltage is required for the NAND area (VCC). SD NAND is fully compliant with SD2.0 interface. Designed in a LGA8 package form. Supports up to 50Mhz.
Are you sure filePartSize has the correct value?Code: Select all
while (bytesRecd < filePartSize) {
Yes, for now I test on files only that I know the exact size of.
It's true, in my full version of this code I do exactly this checking: it retries after some short delay.MicroController wrote: ↑Wed Sep 11, 2024 11:33 amDo you check for premature end-of-stream?
As I understand it, stream->available() may also intermittently return 0, which may be worth explicitly dealing with, e.g. by a short delay before retrying.
Users browsing this forum: No registered users and 55 guests