Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

WIFI_SSID & WIFI_PASSWORD never used #11

Open
kargeor opened this issue Feb 17, 2021 · 7 comments
Open

WIFI_SSID & WIFI_PASSWORD never used #11

kargeor opened this issue Feb 17, 2021 · 7 comments

Comments

@kargeor
Copy link

kargeor commented Feb 17, 2021

Never connects to wifi.

@foxis
Copy link
Owner

foxis commented Mar 3, 2021

Wifi must be configured via Web UI, not via wificonfig.h file.

@kargeor
Copy link
Author

kargeor commented Mar 3, 2021

Well, if wifi is not connected I cannot use the web interface...

@foxis
Copy link
Owner

foxis commented Mar 3, 2021

The device functions as a Wifi Station, so it should be visible to you as a Hot Spot so you can connect to it.
Once you are connected to the wifi named as "ESPReflow"(or whatever you have setup in data/config.json file you should be able to access 192.168. 4.1.

@PnMagalhaes
Copy link

@kargeor I went through the same dilemma as you. I don't know if we got the same problem but here is mine. I flashed the controller without uploading the files in the data directory to ESP, that way it starts as an AP but does not load the web interface. So, I opened the plataformio CLI and run the "pio run -t uploadfs" inside the data folder.
Now I can see the webpage loading but it keeps loading forever. Any tips @foxis ?

@foxis
Copy link
Owner

foxis commented Mar 9, 2021

@PnMagalhaes The issue can be two-fold: Either the SPIFFS partition wasn't initialized properly, or the bug I've encountered with the async server implementation.
I try to load all the web page assets sequentially, however, sometimes ESP stops transmitting data. Especially that happens when the browser opens several sessions as it does with regular servers...
So as a first step towards resolving this issue I would suggest reflashing the SPIFFS partition.
And a second option would be to reload the page if it loads for too long.
Also, it would be helpful if you'd capture network activity in the "Inspect" mode when you try to load the page from the ESP.

@Teslafly
Copy link

For an actual solution to this, the samplewificonfig.h file should be removed and it may be possible to add a "default" wifi credentials in the config.json file as a simple solution. The documentation should also be updated (working on that in my fork)

alternately, adding OTA->addAP(WIFI_SSID, WIFI_PASSWORD); to the setup_ota function will add the network configured in the wificonfig.h file.

@Teslafly
Copy link

Editing data/config.json with a wifi network before uploading spiffs seems to work well.

"networks": {
		"wifi-ssid":"wifi-password"
	},

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants