Closed SteverR closed 8 years ago
Could you please enable debug output in the IDE (Debug Level: Core
and Debug Port: Serial
), and paste here the serial output.
This will contain error code returned by LwIP, if the connection failed due to an error.
Otherwise, if error callback wasn't called, it means the connection has timed out, which may happen for many reasons (e.g. a firewall on your 192.168.1.104 host?)
Thanks for the help. Good catch. Switching the firewall off allowed the connect to complete.
i wish i understand all of that :'( well, i am trying to make my wemos d1 r2 become an access point and also connected to the other network around. i hope you interesting for helping me.
Hi all:
I am new to posting (among many things) and apologize if I violate protocol in any way.
set as WeMos D1 Mini. My ultimate goal is to log a temperature sensor using EasyIOT.
provide copies of the two code segments that are implicated.
BEGIN serial port output
END serial port output
COMMENT: The serial port output indicates success at signing on to the access point and obtaining an IP. In WFC (short for WiFiclient::connect), all seems to go well through the call to tcp_connect() or at least the ip s are intact and correct at that point. However _client does not pass muster. After the call to esp_yield(), the ip s are not intact and _client still fails. Hence the return to the calling program triggers 'connection failed'.
Any help or suggestions would be much appreciated.
Code segments follow. I will start with the relevant portions of WiFiclient.cpp followed by the calling code.
//BEGIN Selection from WiFiClient.cpp /* WiFiClient.cpp - TCP/IP client for esp8266, mostly compatible with Arduino WiFi shield library
Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. This file is part of the esp8266 core for Arduino environment. */ // BEGIN snip A. material omitted is unchanged from downloaded code. // END snip A