WifiClient file download slow






















Battling a bit. This stale issue has been automatically closed. Experiencing the same thing, hoping for a solution too. RafigRzayev mentioned this issue Nov 12, RafigRzayev mentioned this issue Nov 13, Sadly I never got to the bottom of this and had to work with the poor throughput. Please let me know if you have any luck. Sign up for free to join this conversation on GitHub.

Already have an account? Sign in to comment. Where is this code running? Inside loop? Or in a callback? Look at this example and work from there on: github. Summarized: the code is running inside callback. It only fails when wrapped in the callback. Codebreaker Thanks for that. Looking into it. RE ArduinoOTA -- so far haven't been able to see how it would be used to retrieve an update from a remote server.

Add a comment. Active Oldest Votes. Try something like this: while thisClient. Improve this answer. Global variables to the rescue. Worked perfectly.

Can you offer any advice , tips or tricks? However, you can follow these simple techniques to boost your download speed, even if by a bit. If you start downloading multiple files, the download speed will get distributed which in turn will reduce the total download time to a great extent.

Hence on a dial up connection or a connection with less speed, it is not recommended to initiate parallel file downloads. EDIT2: Actually Im more convinced it is something to do with the connection not closing properly, perhaps I need to keep it as a global definition which can then stay open?

What I encountered myself browser reading a page, refreshing every 10 seconds, page created by the ESPF , is that sometimes the connection breaks. The browser connects, but no data arrives and the sketch gets stuck. It times out after 1 second. I never have problems sending data, though. That seems to always come through in good order the html page.

My working code, handling the incoming client response. This is called every ms to handle incoming requests. Hmm, Im definitely getting a weird 'stuck' effect! Sometimes I can send large commands and they will all work perfectly, and then suddenly it won't process another until I re-flash the firmware So weird! I think that the solution might be something to do with forcefully flushing all connections or something, as perhaps that it what is causing it to get stuck.

Though total guesswork! As far as I can tell the only difference with your code is that it keeps the connection and just checks it every time it is used, rather than opening it every time it is needed? It also seems to be related to the fact that client.

How to speed up writing a file to a WifiClient? Ask Question. Asked 5 years, 1 month ago. Active 5 years, 1 month ago. Viewed times. My code looks essentially like this: while file. Improve this question. You may try if doing it line by line is faster. Or in chunks of bytes or whatever amount of RAM you have available — Paul.



0コメント

  • 1000 / 1000