A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By lucian
#58453 Hello,

I don't know if this is the correct place to ask, but i have an issue and i hope to get some help. I have two ESPs which i use in my project, one is configured to be AP and Server, and the other one is client. The server starts with ip: 192.168.4.1 and deliver a webpage, tested with my smartphone, but when i try to make a request from the other esp, when connecting to host fails. I do following steps:

- connecting to wifi AP - successfully
- preparing data (DHT22)
- creating string and request header
- checking connection to host

IPAddress host(192,168,4,1);

if (client.connect(host, 80)){
it never gets here :(
do something ...
}

So from my phone, when i access ip in browser, works fine, here it does not. Any ideeas?
Btw i use two ESP8266-01 with standard firmware, arduino code.
User avatar
By martinayotte
#58469 Is your second ESP in STA-only mode ?
If both ESP are in STA+AP, you will get conflicting IPs with 192.168.4.1, since the client will try to connect to itself instead of trying to connect to the other ESP.
User avatar
By lucian
#58478 the one which is server is STA+AP, but on the client i did not configured specific mode, i just used wifi.begin(ssid, pass), do it connects successfully to the server, it cannot open the connection with its ip. I will try to specifi ST only in the client just to exclude your statement. Thanks