Re: P2P: ESP in AP mode and ESP in STA mode not working
Posted: Fri Aug 19, 2016 2:32 pm
Is it possible to set up a server on the Client so that I can communicate with the Client esp via its ip address?
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
martinayotte wrote:My examples are quite outdated, they were done one year ago.
At that time, the Arduino framework had some default behaviours which probably changed.
You need to make sure the the MyAPClient is really in STA mode only (not STA+AP).
To do that simply add "WiFi.mode(WIFI_STA);" just before the the WiFi.begin().
This will avoid the client trying to connect to itself, since 192.168.4.1 is also present on the client when the mode is WIFI_AP_STA.
enot wrote:Hi, I tried these sketches. I can connect to the server with my smartphone and it works fine as they can not connect to other ESP8266s. Can you explain why? Thank you