Page 1 of 1

WGETASYNC and WGET

Posted: Sun Apr 04, 2021 4:16 pm
by N7QWT
I am trying to use WGETASYNC or WGET on a Wemos D1 Mini (ESP8266) and can't seem to get it to work.
Same exact code copied and pasted on an ESP32 (WROOM) works perfect.
WGETASYNC does not work at all on the D1 Mini and WGET works intermittently, and then when it works it only returns a partial response.
Pictures below after a run....

What am I doing wrong or is this an Annex issue?
Thanks
Annex32.jpg
Annex.jpg

Re: WGETASYNC and WGET

Posted: Tue Apr 06, 2021 11:51 am
by cicciocb
The problem could be related to the size of the message received from the remote server.
It is probably too big to fit into the ESP8266 RAM available.

Additionally the WGETASYNC might not work because it try to ping the server before and the server simply do not answer to the ping request.
This can be overridden specifying the parameter ping to 0

(this is a extract of the documentation)

By default the command WGETASYNC execute a ping on the remote server before trying the connection.
This can avoid memory leaks in case of a server not alive.
This behaviour can be modified specifying 0 for the parameter ping