Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By arlaor
#56211
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
User avatar
By martinayotte
#71469
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.