Chat freely about anything...

User avatar
By treii28
#53534 I have completely removed my code that runs WiFi.begin() with my home network credentials and I'm trying to configure the same program to run as a softAP access point instead. But when it runs, I see in the debug info coming back that it's still connecting to my home network as well as setting up the AP. Mind you, there is no code anywhere to do this, so I'm assuming it stored the configuration internally somehow.
(I'm using an example sketch, but I didn't set up anything for the connection info coming back and I don't see the specific messages in the code, so I'm assuming some additional debug info was turned on somewhere)

How do I stop this behavior?

--- serial output ---
access point...AP IP address: 192.168.4.1
Setting up mDNS responder for hostname: ccrcache
Setting up HTTP server
HTTP server started
Setting up SD card
SD Card initialized.
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

connected with NETGEAR60, channel 8
dhcp client start...
ip:192.168.1.101,mask:255.255.255.0,gw:192.168.1.1
add 1
aid 1
station: 38:59:f9:2f:f5:ce join, AID = 1
User avatar
By rudy
#53537
I see in the debug info coming back that it's still connecting to my home network as well as setting up the AP. Mind you, there is no code anywhere to do this, so I'm assuming it stored the configuration internally somehow.


Yes. And I saw a post on this same thing here recently. It had a solution for it. I'll try and find it again, but don't hold your breathe.
User avatar
By treii28
#53540
rudy wrote:Yes. And I saw a post on this same thing here recently. It had a solution for it. I'll try and find it again, but don't hold your breathe.


Thanks, I appreciate it. I remember seeing something before about it saving the login details somehow, but can't remember where. I'm just trying to eliminate problems as I'm trying to figure out this upload stuff. I keep getting crashes with the SD.exists on a directory and see there's a bug report on it. I finally got that one fixed but now I'm trying to figure out what the handleUpload stuff is doing with it's two callbacks so I can figure out where/how to interject more parameters to the upload (directory to upload to for example) and error/message reporting back. (most of the examples I see just send a blank 200 OK status - for me that's fine, but I need to build stuff for computer dummies to use)
Those unknowns combined with my limited/rusty knowledge of C/C++ means debugging some of these non-exampled, non-well-documented methodologies ain't easy!

But also, if I'm setting up softAP, I don't want it to be connecting to my home network too! lol
User avatar
By krzychb
#53563 Hi @treii28,

To stop esp connecting back to the router you need to add WiFi.mode(WIFI_AP) before WiFi.softAP().

Esp8266 / Arduino / SDK saves last used mode in flash memory like it saves last used credentials. On power up or connection loss it tries to reconnect using saved information. There is new documentation on that and it should be merged to esp8266 / Arduino] repository after review by community.

Krrzysztof

Edit: ESP8266WiFi library documentation is already in esp8266 / Arduino - repository - https://github.com/esp8266/Arduino/tree ... troduction
Last edited by krzychb on Thu Aug 25, 2016 4:37 am, edited 1 time in total.