Hello,
I use ESP32 and on one chip the program when I turn on wifi continually restarts without wifi works OK.
I've tried a stronger source for CPU, but erase Flash has not missed it?
What could it be. Also in your book I was looking for info but also samples with wifi also report this error?
Brownout detector was triggered
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:9280
load:0x40080400,len:5848
entry 0x40080698
Program:
#include <WiFi.h>
// zapnuti vystupu hodnot na serial port
// #define SERIALPRINT
// Wifi konektivita a www server
//WiFi Part
const char* ssid = "linhart_dilna";
const char* password = "xxxxxxxxxxxxx";
// Set web server port number to 80
WiFiServer server(80);
// Variable to store the HTTP request
String header;
//deklarace promenych
byte mb[6];
int tempRH;
float tempTep;
int anaRHout;
int tempCO2;
int anaCO2out;
int anaPWRout;
unsigned int tempPWR;
int stranka = 0;
String txt_String;
void setup() {
Serial.begin(115200); // start serial for output
// Connect to Wi-Fi network with SSID and password
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
delay(3000);
}
void loop() {
WiFiClient client = server.available(); // Listen for incoming clients
// if (client) { // If a new client connects,
// Serial.println("New Client."); // print a message out in the serial port
// String currentLine = ""; // make a String to hold incoming data from the client
// while (client.connected()) { // loop while the client's connected
// if (client.available()) { // if there's bytes to read from the client,
// char c = client.read(); // read a byte, then
// Serial.write(c); // print it out the serial monitor
// header += c;
// if (c == '\n') { // if the byte is a newline character
// // if the current line is blank, you got two newline characters in a row.
// // that's the end of the client HTTP request, so send a response:
// if (currentLine.length() == 0) {
// // HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// // and a content-type so the client knows what's coming, then a blank line:
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println("Connection: close");
client.println("Refresh: 2"); // refresh the page automatically every 2 sec
client.println();
// Display the HTML web page
client.println("<!DOCTYPE html><html>");
client.println("<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
client.println("<link rel=\"icon\" href=\"data:,\">");
// CSS to style the table
client.println("<style>body { text-align: center; font-family: \"Trebuchet MS\", Arial;}");
client.println("table { border-collapse: collapse; width:35%; margin-left:auto; margin-right:auto; }");
client.println("th { padding: 12px; background-color: #0043af; color: white; }");
client.println("tr { border: 1px solid #ddd; padding: 12px; }");
client.println("tr:hover { background-color: #bcbcbc; }");
client.println("td { border: none; padding: 12px; }");
client.println(".sensor { color:white; font-weight: bold; background-color: #bcbcbc; padding: 1px; }");
// Web Page Heading
client.println("</style></head><body><h1>Multisensor</h1>");
client.println("<table><tr><th>Sensor</th><th>Hodnota</th></tr>");
client.println("<tr><td>Teplota: </td><td><span class=\"sensor\">");
client.println(tempTep);
client.println(" C</span></td></tr>");
client.println("<tr><td>CO2:</td><td><span class=\"sensor\">");
client.println(tempCO2);
client.println(" ppm</span></td></tr>");
client.println("<tr><td>Vlhkost:</td><td><span class=\"sensor\">");
client.println(tempRH);
client.println(" %</span></td></tr>");
client.println("<tr><td>Vykon:</td><td><span class=\"sensor\">");
client.println(tempPWR);
client.println(" %</span></td></tr>");
client.println("</body></html>");
// The HTTP response ends with another blank line
client.println();
// // Break out of the while loop
// break;
// } else { // if you got a newline, then clear currentLine
// currentLine = "";
// }
// } else if (c != '\r') { // if you got anything else but a carriage return character,
// currentLine += c; // add it to the end of the currentLine
// }
// }
// }
// // Clear the header variable
// header = "";
// // Close the connection
// client.stop();
// Serial.println("Client disconnected.");
// Serial.println("");
// }
}
Continuous reboot on WiFi
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: Continuous reboot on WiFi
Thanks for input. I am not getting the brownout message mine is TG1WDT_SYS_RESET
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: Continuous reboot on WiFi
Then your issue is something else and I'd suggest starting your own topic, preferably with more information than just the reset reason you get.
Re: Continuous reboot on WiFi
Ooops, sorry thought this was on the post I put on Can you delete all three?
Rob
Rob
Who is online
Users browsing this forum: No registered users and 68 guests