Page 1 of 1

From an external device Set the password SSID with UART and How to connect to the ESP32 network

Posted: Thu Oct 08, 2020 8:28 am
by NY20200803
ESP32 About WiFi.begin (ssid, password);

I did the following:

Put the SETUP function in the LOOP function.

Going to set up WIFI many times
Because it is inefficient
==
STATSU = WiFi.begin (ssid, password);
==
Make something
Return value (1) OR (3)
If you check twice every 3 seconds, you can connect.
==
while (WiFi.status ()! = WL_CONNECTED) {}
==

I'm checking with.

Result: about 1 hour
It's stable.
After that, it will be interrupted.

This is an inquiry at this time.
WiFi.begin (ssid, password);
From
while (WiFi.status ()! = WL_CONNECTED) {}

In order to check the connection to the net stably at
After connecting properly
Is it only necessary once?

Or because it is in a different place from SETUP
Should I set it up on a regular basis?

Re: From an external device Set the password SSID with UART and How to connect to the ESP32 network

Posted: Wed Oct 21, 2020 11:22 pm
by NY20200803
When the net is disconnected
[STATSU = WiFi.begin (ssid, password);]
When you create a program with "ARDUINO"
4 is returned to the variable "STATSU"
The set "ssid, password" becomes blank,
If you do not turn off the power, you will not be able to connect again.
something? Is there any countermeasure?
For example
Store ssid, password in another variable, for example 2ssid, 2password
After that, STATSU = WiFi.begin (2ssid, 2password);
It is a method of setting to.