Post topics, source code that relate to the Arduino Platform

User avatar
By chip273
#56266 Hi,
I am just starting with ESP8266, but I did quite some arduino projects in the past. Therefore I decided to go with the Arduino library for the ESP8266. I have bought some ESP-12 modules and wireed them up on a breadboard.

I currently try to switch GPIO pins from my webbrowser. The ESP is connected to my home router AP. The esp hosts a rudimentary HTTP website.
Essentially I use the WiFiWebServer example without modification.

My problem is that even though I tell the ESP to connect to my existing wifi AP, the ESP itself also starts in SoftAP mode. This in itself would not be totally bad, but it also interferes with the GPIO pins behaviour. When I try to connect to the ESP SoftAP the GPIO pins go low for a really short break a couple times. (The LED hooked up to GPIO2 blinks a couple times, although I expect it to light up steadily)

Unfortunately it seems I can not find any documentation which tells me how to actively disable the SoftAP mode. Only how to activate it. But it is active without me putting code to activate it.
How do I fix this behaviour ?
User avatar
By chip273
#56442 Thanks for the tip.
Actually I had tried WiFi.setmode(WIFI_STA); since I had found that on some webpage, but it did not work(did not compile with some error). Seems the call was moved to WiFi.mode(WIFI_STA);.

I have helped myself by calling WiFi.softAPdisconnect(false); and WiFi.enableAP(false); both together in a row. This also disabled the integrated Soft AP. Curiously after calling this once in a sketch (and uploading & running it once) I never needed to call it again. The soft AP did not appear again.

Maybe there was some setting being retained even across firmware uploads ?
I did not investigate the GPIO problem described further, as there is no Soft AP it seems to not appear anymore.