Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captive portal cause watchdog triggering #617

Open
Dexter0007 opened this issue Feb 4, 2024 · 0 comments
Open

Captive portal cause watchdog triggering #617

Dexter0007 opened this issue Feb 4, 2024 · 0 comments

Comments

@Dexter0007
Copy link

Dexter0007 commented Feb 4, 2024

Hi, I have problem with captive portal and watchdog. My watchdog is set to 8 seconds.
When code running function "Portal.begin()" and working few seconds the watchdog triggering.

ESP32 WROOM32

// Version Info
// 1.0.0 - First working version
#define SoftVer	"1.0.0" 


#define AUTOCONNECT_URI         "/"

#include <WiFi.h>          
#include <WebServer.h>   
#include <AutoConnect.h>


WebServer Server;
AutoConnect Portal(Server);

//Page with device informations
template<typename T>
const char  AutoConnectCore<T>::_PAGE_STAT[] PROGMEM = {
  "{{HEAD}}"
	"<title>" AUTOCONNECT_PAGETITLE_STATISTICS "</title>"
	"<style type=\"text/css\">"
	  "{{CSS_BASE}}"
	  "{{CSS_TABLE}}"
	  "{{CSS_LUXBAR_BODY}}"
	  "{{CSS_LUXBAR_HEADER}}"
	  "{{CSS_LUXBAR_BGR}}"
	  "{{CSS_LUXBAR_ANI}}"
	  "{{CSS_LUXBAR_MEDIA}}"
	  "{{CSS_LUXBAR_ITEM}}"
	"</style>"
  "</head>"
  "<body style=\"padding-top:58px;\">"
	"<div class=\"container\">"
	  "{{MENU_PRE}}"
	  "{{MENU_LIST}}"
	  "{{MENU_AUX}}"
	  "{{MENU_POST}}"
	  "<div>"
		"<table class=\"info\" style=\"border:none;\">"
		  "<tbody>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_APMAC "</td>"
			"<td>{{AP_MAC}}</td>"
		  "</tr>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_CHANNEL "</td>"
			"<td>{{CHANNEL}}</td>"
		  "</tr>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_DBM "</td>"
			"<td>{{DBM}}</td>"
		  "</tr>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_CHIPID "</td>"
			"<td>{{CHIP_ID}}</td>"
		  "</tr>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_CPUFREQ "</td>"
			"<td>{{CPU_FREQ}}MHz</td>"
		  "</tr>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_FLASHSIZE "</td>"
			"<td>{{FLASH_SIZE}}</td>"
		  "</tr>"
		  "<tr>"
			"<td>" AUTOCONNECT_PAGESTATS_FREEMEM "</td>"
			"<td>{{FREE_HEAP}}</td>"
		  "</tr>"
		  "<tr>"
		  "<td>" AUTOCONNECT_PAGESTATS_SYSTEM_UPTIME "</td>"
		  "<td>{{SYSTEM_UPTIME}}</td>"
		  "</tr>"
		  "</tbody>"
		"</table>"
	  "</div>"
	"</div>"
  "</body>"
  "</html>"
};


// the setup function runs once when you press reset or power the board
void setup() {
	rtc_wdt_protect_off();
	rtc_wdt_set_time(RTC_WDT_STAGE0, WDTO_8S);
	rtc_wdt_enable();
	rtc_wdt_protect_on();
	Log.Show("Ver: " SoftVer " " CompilationDate);
	Log.Show("Starting...");

	Portal.begin();
}

// the loop function runs over and over again until power down or reset
void loop() {
	rtc_wdt_feed();

	Log.Show("test");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant