Closed
Description
Basic Infos
Hardware
Hardware: WeMos D1 Mini
Core Version: Last commit @ dd00db1 https://github.com/esp8266/Arduino/tree/dd00db1b8cdfc430eef1617f458793793a23bd22
Description
I have tried ArduinoIDE >File > Example>ESP8266WebServer>HelloServerSecure.ino
It can run but sometime ocur WDT reset.
Problem description
WDT reset message as following.
......
Connected to XXXXXXX
IP address: 192.168.43.110
MDNS responder started
HTTPS server started
Soft WDT reset
ctx: cont
sp: 3fff0610 end: 3fff0bc0 offset: 01b0
>>>stack>>>
3fff07c0: 3ffefb40 000009ea 000009ea 4010020c
3fff07d0: 3fff9054 00000045 3fff6a54 40100690
3fff07e0: ffffffff 00000009 3fffabe0 40208ef8
3fff07f0: 3fff9054 00000045 3fff6a54 40202cbb
3fff0800: 3fff9054 00000045 3fff6a54 402033cd
3fff0810: 00000045 13d688eb 3fff6a54 40203cd8
3fff0820: 00000000 3fff6c4c 00000045 40212be8
3fff0830: 00030316 00000010 3fff6a54 fccbe6bb
3fff0840: 00000010 00000016 00000040 402033b6
3fff0850: 00000006 3ffe98dd 3fff6a54 00000010
3fff0860: 00000000 00000000 3fff6c4c 40212d54
3fff0870: 0c000014 6ea04e24 e2ae2c67 85a96a31
3fff0880: a510b553 95d5bbdc d86974cf ab8176a8
3fff0890: 544f5ef2 00000000 00000000 00000000
3fff08a0: 00000000 00000000 3fff6c4c 40212cb4
3fff08b0: 3fff0910 00000000 3fff6c4c 40212dbc
3fff08c0: 3fff9069 00000010 3fff6c4c 402145ad
3fff08d0: 00000022 00000010 3fff6c4c 4021d384
3fff08e0: 00000008 00000005 00000010 00000010
3fff08f0: 3fff9069 00000010 3fff6c4c 00000010
3fff0900: 3fff9069 00000010 3fff6c4c 402138e8
3fff0910: dfc5ff64 b6864157 c518ba86 d6f7c01b
3fff0920: d3c4005f 3fff61dc 3fff6c4c 401004d8
3fff0930: 3fff61dc 3fff61dc 3fff6c4c 402121e0
3fff0940: 3fff0ae0 00000014 00000000 40214241
3fff0950: 3ffefb40 00000141 3fff6a8c 01000000
3fff0960: 3fff0ae0 0001a3ca 3fff6c4c 40213a48
3fff0970: 00000000 00000000 00000020 3fff0ae0
3fff0980: 00001387 0001a3ca 3fff8e5c 40203c19
3fff0990: 3d018230 02e88130 56fe0009 c678f246
3fff09a0: 0d301751 862a0906 0df78648 050b0101
3fff09b0: 31263000 060e3010 0a045503 5345070c
3fff09c0: 36323850 30123136 55030610 090c0304
3fff09d0: 2e373231 2e302e30 171e3031 3037310d
3fff09e0: 31383133 31393434 0d175a38 31313033
3fff09f0: 34313532 38313934 3126305a 060e3010
3fff0a00: 0a045503 5345070c 36323850 30123136
3fff0a10: 55030610 090c0304 2e373231 2e302e30
3fff0a20: 305c3031 2a09060d f7864886 0101010d
3fff0a30: 4b030005 02483000 72c60041 20e1126c
3fff0a40: f70c104d 495a2a3a 7ac92de2 c6ef1d63
3fff0a50: 6fd6a3bb f6d5cb59 338334be 49ec8050
3fff0a60: 59eebf63 8d8b6794 24238581 55765206
3fff0a70: b309189d 0540103c 0302f301 30010001
3fff0a80: 2a09060d f7864886 0b01010d 41030005
3fff0a90: 6cdc6900 5762a79b 4501037e 90839aad
3fff0aa0: e8dfe73a d300468f de0a2b5f 04c51b92
3fff0ab0: f476c0c5 973608f6 60f18227 67cdc276
3fff0ac0: ca6c4b6c 33fd97fd 6b67129e 80d57e98
3fff0ad0: 0000008f 3fffdad0 3fff0b40 40203b3f
3fff0ae0: ffffffff 3fffc6fc 00000001 3ffefb84
3fff0af0: 3fff6a54 00000001 4024c3cc 0000013e
3fff0b00: 4024c50c 3fffdad0 3ffefb8c 00000030
3fff0b10: 00000000 3fff0b70 3fff6a64 3ffefb8c
3fff0b20: 3fffdad0 3fff0b70 3ffef890 40204407
3fff0b30: 00000141 3fff0b70 3fff6a64 402030c3
3fff0b40: 3ffe8e60 00000000 00001388 402036a4
3fff0b50: 3ffef8c4 3fff6a54 3fff8e5c 40203eea
3fff0b60: 00000001 00000000 3ffef7b0 402055f7
3fff0b70: 3ffe8e08 00000000 00003a98 4020929c
3fff0b80: 00000000 00000000 00000000 feefeffe
3fff0b90: 3fffdad0 00000000 3ffefb84 402023c8
3fff0ba0: 3fffdad0 00000000 3ffefb84 4020900c
3fff0bb0: feefeffe feefeffe 3ffefba0 40100710
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
Settings in IDE
Module: WeMos D1 Mini
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: qio
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Sketch
/*
HelloServerSecure - Simple HTTPS server example
This example demonstrates a basic ESP8266WebServerSecure HTTPS server
that can serve "/" and "/inline" and generate detailed 404 (not found)
HTTP respoinses. Be sure to update the SSID and PASSWORD before running
to allow connection to your WiFi network.
IMPORTANT NOTES ABOUT SSL CERTIFICATES
1. USE/GENERATE YOUR OWN CERTIFICATES
While a sample, self-signed certificate is included in this example,
it is ABSOLUTELY VITAL that you use your own SSL certificate in any
real-world deployment. Anyone with the certificate and key may be
able to decrypt your traffic, so your own keys should be kept in a
safe manner, not accessible on any public network.
2. HOW TO GENERATE YOUR OWN CERTIFICATE/KEY PAIR
A sample script, "make-self-signed-cert.sh" is provided in the
ESP8266WiFi/examples/WiFiHTTPSServer directory. This script can be
modified (replace "your-name-here" with your Organization name). Note
that this will be a *self-signed certificate* and will *NOT* be accepted
by default by most modern browsers. They'll display something like,
"This certificate is from an untrusted source," or "Your connection is
not secure," or "Your connection is not private," and the user will
have to manully allow the browser to continue by using the
"Advanced/Add Exception" (FireFox) or "Advanced/Proceed" (Chrome) link.
You may also, of course, use a commercial, trusted SSL provider to
generate your certificate. When requesting the certificate, you'll
need to specify that it use SHA256 and 1024 or 512 bits in order to
function with the axTLS implementation in the ESP8266.
Interactive usage:
Go to https://esp8266-webupdate.local/firmware, enter the username
and password, and the select a new BIN to upload.
To upload through terminal you can use:
curl -u admin:admin -F "image=@firmware.bin" esp8266-webupdate.local/firmware
Adapted by Earle F. Philhower, III, from the HelloServer.ino example.
This example is released into the public domain.
*/
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServerSecure.h>
#include <ESP8266mDNS.h>
const char* ssid = "XXXXXXX";
const char* password = "12345678";
ESP8266WebServerSecure server(443);
// The certificate is stored in PMEM
static const uint8_t x509[] PROGMEM = {
0x30, 0x82, 0x01, 0x3d, 0x30, 0x81, 0xe8, 0x02, 0x09, 0x00, 0xfe, 0x56,
0x46, 0xf2, 0x78, 0xc6, 0x51, 0x17, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x26, 0x31,
0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x07, 0x45, 0x53,
0x50, 0x38, 0x32, 0x36, 0x36, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,
0x04, 0x03, 0x0c, 0x09, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e,
0x31, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x33, 0x31, 0x38, 0x31,
0x34, 0x34, 0x39, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x33, 0x30, 0x31, 0x31,
0x32, 0x35, 0x31, 0x34, 0x34, 0x39, 0x31, 0x38, 0x5a, 0x30, 0x26, 0x31,
0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x07, 0x45, 0x53,
0x50, 0x38, 0x32, 0x36, 0x36, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,
0x04, 0x03, 0x0c, 0x09, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e,
0x31, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02,
0x41, 0x00, 0xc6, 0x72, 0x6c, 0x12, 0xe1, 0x20, 0x4d, 0x10, 0x0c, 0xf7,
0x3a, 0x2a, 0x5a, 0x49, 0xe2, 0x2d, 0xc9, 0x7a, 0x63, 0x1d, 0xef, 0xc6,
0xbb, 0xa3, 0xd6, 0x6f, 0x59, 0xcb, 0xd5, 0xf6, 0xbe, 0x34, 0x83, 0x33,
0x50, 0x80, 0xec, 0x49, 0x63, 0xbf, 0xee, 0x59, 0x94, 0x67, 0x8b, 0x8d,
0x81, 0x85, 0x23, 0x24, 0x06, 0x52, 0x76, 0x55, 0x9d, 0x18, 0x09, 0xb3,
0x3c, 0x10, 0x40, 0x05, 0x01, 0xf3, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30,
0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
0x05, 0x00, 0x03, 0x41, 0x00, 0x69, 0xdc, 0x6c, 0x9b, 0xa7, 0x62, 0x57,
0x7e, 0x03, 0x01, 0x45, 0xad, 0x9a, 0x83, 0x90, 0x3a, 0xe7, 0xdf, 0xe8,
0x8f, 0x46, 0x00, 0xd3, 0x5f, 0x2b, 0x0a, 0xde, 0x92, 0x1b, 0xc5, 0x04,
0xc5, 0xc0, 0x76, 0xf4, 0xf6, 0x08, 0x36, 0x97, 0x27, 0x82, 0xf1, 0x60,
0x76, 0xc2, 0xcd, 0x67, 0x6c, 0x4b, 0x6c, 0xca, 0xfd, 0x97, 0xfd, 0x33,
0x9e, 0x12, 0x67, 0x6b, 0x98, 0x7e, 0xd5, 0x80, 0x8f
};
// And so is the key. These could also be in DRAM
static const uint8_t rsakey[] PROGMEM = {
0x30, 0x82, 0x01, 0x3a, 0x02, 0x01, 0x00, 0x02, 0x41, 0x00, 0xc6, 0x72,
0x6c, 0x12, 0xe1, 0x20, 0x4d, 0x10, 0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58, 0x9c, 0xe0, 0x45, 0x97, 0xe7, 0xb6, 0xb5, 0xef, 0xc1, 0x02,
0x21, 0x00, 0xa2, 0x01, 0x06, 0xc0, 0xf2, 0xdf, 0xbc, 0x28, 0x1a, 0xb4,
0xbf, 0x9b, 0x5c, 0xd8, 0x65, 0xf7, 0xbf, 0xf2, 0x5b, 0x73, 0xe0, 0xeb,
0x0f, 0xcd, 0x3e, 0xd5, 0x4c, 0x2e, 0x91, 0x99, 0xec, 0xb7, 0x02, 0x20,
0x4b, 0x9d, 0x46, 0xd7, 0x3c, 0x01, 0x4c, 0x5d, 0x2a, 0xb0, 0xd4, 0xaa,
0xc6, 0x03, 0xca, 0xa0, 0xc5, 0xac, 0x2c, 0xe0, 0x3f, 0x4d, 0x98, 0x71,
0xd3, 0xbd, 0x97, 0xe5, 0x55, 0x9c, 0xb8, 0x41, 0x02, 0x20, 0x02, 0x42,
0x9f, 0xd1, 0x06, 0x35, 0x3b, 0x42, 0xf5, 0x64, 0xaf, 0x6d, 0xbf, 0xcd,
0x2c, 0x3a, 0xcd, 0x0a, 0x9a, 0x4d, 0x7c, 0xad, 0x29, 0xd6, 0x36, 0x57,
0xd5, 0xdf, 0x34, 0xeb, 0x26, 0x03
};
const int led = 13;
void handleRoot() {
digitalWrite(led, 1);
server.send(200, "text/plain", "Hello from esp8266 over HTTPS!");
digitalWrite(led, 0);
}
void handleNotFound(){
digitalWrite(led, 1);
String message = "File Not Found\n\n";
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET)?"GET":"POST";
message += "\nArguments: ";
message += server.args();
message += "\n";
for (uint8_t i=0; i<server.args(); i++){
message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
}
server.send(404, "text/plain", message);
digitalWrite(led, 0);
}
void setup(void){
pinMode(led, OUTPUT);
digitalWrite(led, 0);
Serial.begin(115200);
WiFi.begin(ssid, password);
Serial.println("");
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
if (MDNS.begin("esp8266")) {
Serial.println("MDNS responder started");
}
server.setServerKeyAndCert_P(rsakey, sizeof(rsakey), x509, sizeof(x509));
server.on("/", handleRoot);
server.on("/inline", [](){
server.send(200, "text/plain", "this works as well");
});
server.onNotFound(handleNotFound);
server.begin();
Serial.println("HTTPS server started");
}
void loop(void){
server.handleClient();
}
Metadata
Metadata
Assignees
Labels
No labels