Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By OGMrStinky
#22262 @Stoney Thank you very much for taking the time to extract that out of your project. I really appreciate it. I implemented your code on my devices and still had no luck BUT I had removed the password when starting the access point. PC can handle that fine, but another ESP8266 acting as a client could connect but not make the TCP/IP connection. When I added that back it worked great! Thanks again!
On a separate note, unless you're doing it elsewhere in the code that didn't get included, I am pretty sure your mdns stuff is not doing anything because there's no call to mdns.begin to set a domain and IP. Hope that's of value!
User avatar
By Stoney
#22413 good point .. sorry, i tried to include all the important bits.


Its in the launch_web function..

void launchWeb(int webtype) {
Serial.println("");
Serial.println("WiFi connected");
Serial.println(WiFi.localIP());
Serial.println(WiFi.softAPIP());
if (!mdns.begin("esp8266", WiFi.localIP())) {
Serial.println("Error setting up MDNS responder!");
while (1) {
delay(1000);
}
}
Serial.println("mDNS responder started");
// Start the server
server.begin();
Serial.println("Server started");
}
User avatar
By IsaiasDg
#33905
OGMrStinky wrote:@Stoney Thank you very much for taking the time to extract that out of your project. I really appreciate it. I implemented your code on my devices and still had no luck BUT I had removed the password when starting the access point. PC can handle that fine, but another ESP8266 acting as a client could connect but not make the TCP/IP connection. When I added that back it worked great! Thanks again!
On a separate note, unless you're doing it elsewhere in the code that didn't get included, I am pretty sure your mdns stuff is not doing anything because there's no call to mdns.begin to set a domain and IP. Hope that's of value!


Hi OGMrStinky, I have a similar issue as yours and I am reading the discussion to find an answer but I can't follow what you did to solve the issue. I am trying to connect an ESP8266 as client to a web server (xampp from apache) using server's IP address (like you did, I supposed) but I can't, always I get connection failed. I'd appreciate your advise to solve this issue.
Thanks in advance
IsaiasDg
User avatar
By OGMrStinky
#33907 @IsaiasDg - did you first try the client example? That one worked for me when connecting to a "typical" server. You've just got to modify the code to use your access point credentials and change the target client. Adafruit has a tutorial that includes the client example you could try, though I'm not sure their test server is still up
https://learn.adafruit.com/adafruit-huz ... rduino-ide
My suspicion, based on your description is actually on the XAMP server side. I use WAMP and have to "put online" to make the server accessible outside the host computer, but I've never tried it with a local client like that. I would try to get working first with a "standard" server setup and then loop back to your private one.
In the particular case I described in this thread, I was actually not even getting connected to the other ESP access point, so didn't even make it as far as you did when I began. Good luck!