How to reset from access point mode to station mode.
Posted: Tue Apr 10, 2018 3:43 am
I had a great little sketch running on a wemos d1 mini that would log on to my local wifi router, read a ping sensor and the analog voltage divider, upload the data to thingyverse and then go into a deep sleep for an hour then do it all again.
I started printing an enclosure for this project and while it was printing, I had a go at converting a gate opener sketch which used ap mode for direct connection, to enable deep sleep.
My problem now is the wemos will not go out of ap mode. No matter what sketch I upload, it creates an ap named what ever the last ap sketch was.
I've been googling all day and have tried
etc.
Nothing seems to work.
The libraries I used on the ap sketch are
I have even started think about reloading the firmware in an attempt to overwrite the ap mode.
Any help would be appreciated.
I started printing an enclosure for this project and while it was printing, I had a go at converting a gate opener sketch which used ap mode for direct connection, to enable deep sleep.
My problem now is the wemos will not go out of ap mode. No matter what sketch I upload, it creates an ap named what ever the last ap sketch was.
I've been googling all day and have tried
Code: Select all
ESP8266WiFiMulti wifiStation;
WiFiClient client;
ESP8266WiFi.mode(wifi.STATION);
wifi.mode(STATION);
etc.
Nothing seems to work.
The libraries I used on the ap sketch are
Code: Select all
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <WebSocketsServer.h>
#include <Hash.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
I have even started think about reloading the firmware in an attempt to overwrite the ap mode.
Any help would be appreciated.