-->
Page 8 of 9

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Fri Aug 19, 2016 2:32 pm
by Morgan Stewart
Is it possible to set up a server on the Client so that I can communicate with the Client esp via its ip address?

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Fri Oct 07, 2016 5:40 pm
by arlaor
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.


¿How I can with esp8266 12E module in client mode, enable or disable a GPIO in a module ESP8266 12E in server mode that handles a page with websockets?, I am using the code file https://github.com/morrissinger/ESP8266-Websocket/blob/master/examples/WebSocketClient_Demo/WebSocketClient_Demo.ino

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Sun Oct 29, 2017 4:39 am
by enot
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

Re: P2P: ESP in AP mode and ESP in STA mode not working

PostPosted: Thu Nov 02, 2017 2:45 pm
by martinayotte
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

Which sketches ? Mine provided 2 years ago ? As I said a year ago, they are a bit outdated.

The most important thing as I said last year, make sure the ESP Clients are in STA only !
Many people forget that in AP+STA, the Clients trying to connect to AP will not work since there is a conflict with 192.168.4.1.