Your ESP32 (ESP32-WROOM-32D (4MB))
If you are connected via Wifi, it will be initialized after 1 hour.
This causes the following problems.
● From the outside with WIFI
Communicate by writing the value of any password.
The value is stored in EEROM.
After this, after communicating for 1 hour, it will be initialized and the set password etc. will disappear.
It is the same even if it is stored in EEROM.
About measures at this time
Connect to an external microcomputer with UART and
Is there any way other than storing it in an external microcomputer?
please tell me
Your ESP32 (ESP32-WROOM-32D (4MB)) If you are connected via Wifi, it will be initialized after 1 hour. About this meas
-
- Posts: 29
- Joined: Sun Aug 09, 2020 2:27 am
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Your ESP32 (ESP32-WROOM-32D (4MB)) If you are connected via Wifi, it will be initialized after 1 hour. About this me
Your description doesn't make much sense... you're saying your EEPROM settings disappear after an hour? What SDK are you using:? Can you post your code here?
-
- Posts: 29
- Joined: Sun Aug 09, 2020 2:27 am
Re: Your ESP32 (ESP32-WROOM-32D (4MB)) If you are connected via Wifi, it will be initialized after 1 hour. About this me
For the following software, serially from an external microcomputer
Confirm ssid and password
ex
// Please input the SSID and password of WiFi
const char * ssid = "";
const char * password = "";
Source
/ **
* A simple Azure IoT example for sending telemetry.
* /
#include <WiFi.h>
#include "Esp32MQTTClient.h"
// Please input the SSID and password of WiFi
const char * ssid = "";
const char * password = "";
=====
/ * String containing Hostname, Device Id & Device Key in the format: * /
/ * "HostName = <host_name>; DeviceId = <device_id>; SharedAccessKey = <device_key>" * /
/ * "HostName = <host_name>; DeviceId = <device_id>; SharedAccessSignature = <device_sas_token>" * /
static const char * connectionString = "";
static bool hasIoTHub = false;
void setup () {
Serial.begin (115200);
Serial.println ("Starting connecting WiFi.");
delay (10);
WiFi.begin (ssid, password);
while (WiFi.status ()! = WL_CONNECTED) {
delay (500);
Serial.print (".");
}
Serial.println ("WiFi connected");
Serial.println ("IP address:");
Serial.println (WiFi.localIP ());
if (! Esp32MQTTClient_Init ((const uint8_t *) connectionString))
{
hasIoTHub = false;
Serial.println ("Initializing IoT hub failed.");
return;
}
hasIoTHub = true;
}
void loop () {
Serial.println ("start sending events.");
if (hasIoTHub)
{
char buff [128];
// replace the following line with your data sent to Azure IoT Hub
snprintf (buff, 128, "{\" topic \ ": \" iot \ "}");
if (Esp32MQTTClient_SendEvent (buff))
{
Serial.println ("Sending data succeed");
}
else else
{
Serial.println ("Failure ...");
}
delay (5000);
}
}
=====
In this state, it will be disconnected once an hour.
Confirm ssid and password
ex
// Please input the SSID and password of WiFi
const char * ssid = "";
const char * password = "";
Source
/ **
* A simple Azure IoT example for sending telemetry.
* /
#include <WiFi.h>
#include "Esp32MQTTClient.h"
// Please input the SSID and password of WiFi
const char * ssid = "";
const char * password = "";
=====
/ * String containing Hostname, Device Id & Device Key in the format: * /
/ * "HostName = <host_name>; DeviceId = <device_id>; SharedAccessKey = <device_key>" * /
/ * "HostName = <host_name>; DeviceId = <device_id>; SharedAccessSignature = <device_sas_token>" * /
static const char * connectionString = "";
static bool hasIoTHub = false;
void setup () {
Serial.begin (115200);
Serial.println ("Starting connecting WiFi.");
delay (10);
WiFi.begin (ssid, password);
while (WiFi.status ()! = WL_CONNECTED) {
delay (500);
Serial.print (".");
}
Serial.println ("WiFi connected");
Serial.println ("IP address:");
Serial.println (WiFi.localIP ());
if (! Esp32MQTTClient_Init ((const uint8_t *) connectionString))
{
hasIoTHub = false;
Serial.println ("Initializing IoT hub failed.");
return;
}
hasIoTHub = true;
}
void loop () {
Serial.println ("start sending events.");
if (hasIoTHub)
{
char buff [128];
// replace the following line with your data sent to Azure IoT Hub
snprintf (buff, 128, "{\" topic \ ": \" iot \ "}");
if (Esp32MQTTClient_SendEvent (buff))
{
Serial.println ("Sending data succeed");
}
else else
{
Serial.println ("Failure ...");
}
delay (5000);
}
}
=====
In this state, it will be disconnected once an hour.
Who is online
Users browsing this forum: No registered users and 67 guests