ESP32 WifiManager
Napsal: 22 bře 2021, 13:39
Zdravím
Já jsem už možná tím otravný ale nemohu si pomoc.Nejde mi na ESP32 potažmo ESP32 CAM rozjet WifiManager ,na ESP8266 mi to funguje v pohodě kde dělám chybu? díky
výstup na sériovém monitoru
na mobilu je ten přístupový bod OnDemandAP
mám ale jakmile se toho dotknu tak sice má to snachu něco podobného se ukázat jak je v příloze na founu ale pak se to vrátí zpátky a ESP32 se resetuje
.Někdo může namítnout že je to jen pro ESP8266 ale na youtube jsou návody i s ESP32 díky
Já jsem už možná tím otravný ale nemohu si pomoc.Nejde mi na ESP32 potažmo ESP32 CAM rozjet WifiManager ,na ESP8266 mi to funguje v pohodě kde dělám chybu? díky
Kód: Vybrat vše
#if defined(ESP8266)
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
#else
#include <WiFi.h> //https://github.com/esp8266/Arduino
#endif
//needed for library
#if defined(ESP8266)
#include <ESP8266WebServer.h>
#else
#include <WebServer.h>
#endif
#include <DNSServer.h>
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
// select which pin will trigger the configuration portal when set to LOW
// ESP-01 users please note: the only pins available (0 and 2), are shared
// with the bootloader, so always set them HIGH at power-up
#define TRIGGER_PIN 0
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("\n Starting");
pinMode(TRIGGER_PIN, INPUT);
}
void loop() {
// is configuration portal requested?
if ( digitalRead(TRIGGER_PIN) == LOW ) {
//WiFiManager
//Local intialization. Once its business is done, there is no need to keep it around
WiFiManager wifiManager;
//reset settings - for testing
//wifiManager.resetSettings();
//sets timeout until configuration portal gets turned off
//useful to make it all retry or go to sleep
//in seconds
//wifiManager.setTimeout(120);
//it starts an access point with the specified name
//here "AutoConnectAP"
//and goes into a blocking loop awaiting configuration
//WITHOUT THIS THE AP DOES NOT SEEM TO WORK PROPERLY WITH SDK 1.5 , update to at least 1.5.1
//WiFi.mode(WIFI_STA);
if (!wifiManager.startConfigPortal("OnDemandAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.restart();
delay(5000);
}
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
}
// put your main code here, to run repeatedly:
}výstup na sériovém monitoru
Kód: Vybrat vše
3:10:58.664 -> ets Jun 8 2016 00:22:57
13:10:58.664 ->
13:10:58.664 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:10:58.664 -> configsip: 0, SPIWP:0xee
13:10:58.664 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:10:58.664 -> mode:DIO, clock div:1
13:10:58.664 -> load:0x3fff0018,len:4
13:10:58.664 -> load:0x3fff001c,len:1216
13:10:58.664 -> ho 0 tail 12 room 4
13:10:58.664 -> load:0x40078000,len:9720
13:10:58.664 -> ho 0 tail 12 room 4
13:10:58.664 -> load:0x40080400,len:6352
13:10:58.664 -> entry 0x400806b8
13:10:58.965 ->
13:10:58.965 -> Starting
13:11:06.587 -> *WM: SET AP STA
13:11:06.634 -> *WM:
13:11:06.634 -> *WM: Configuring access point...
13:11:06.634 -> *WM: OnDemandAP
13:11:07.088 -> *WM: AP IP address:
13:11:07.135 -> *WM: 192.168.4.1
13:11:07.135 -> *WM: HTTP server started
13:11:51.160 -> dhcps: send_offer>>udp_sendto result 0
13:11:52.263 -> *WM: Request redirected to captive portal
13:11:52.517 -> *WM: Handle root
13:11:52.517 -> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
13:11:52.517 -> Core 1 register dump:
13:11:52.517 -> PC : 0x400014fd PS : 0x00060230 A0 : 0x800da8fb A1 : 0x3ffb1ce0
13:11:52.517 -> A2 : 0x00000020 A3 : 0x0000001c A4 : 0x000000ff A5 : 0x0000ff00
13:11:52.564 -> A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffb1c40
13:11:52.564 -> A10 : 0x3ffb1d00 A11 : 0x80000000 A12 : 0x3ffb1d00 A13 : 0x0000ff00
13:11:52.564 -> A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x0000000a EXCCAUSE: 0x0000001c
13:11:52.564 -> EXCVADDR: 0x00000020 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
13:11:52.564 ->
13:11:52.564 -> Backtrace: 0x400014fd:0x3ffb1ce0 0x400da8f8:0x3ffb1cf0 0x400da91f:0x3ffb1d10 0x400d910a:0x3ffb1d30 0x40149b3e:0x3ffb1d90 0x400d60c7:0x3ffb1db0 0x400d617d:0x3ffb1dd0 0x400d61f2:0x3ffb1e00 0x400d635b:0x3ffb1e50 0x400d9c6a:0x3ffb1ea0 0x400d125a:0x3ffb1ee0 0x400dbd4d:0x3ffb1fb0 0x4008aff9:0x3ffb1fd0
13:11:52.618 ->
13:11:52.618 -> Rebooting...
13:11:52.618 -> ets Jun 8 2016 00:22:57
13:11:52.618 ->
13:11:52.618 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:11:52.618 -> configsip: 0, SPIWP:0xee
13:11:52.618 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:11:52.618 -> mode:DIO, clock div:1
13:11:52.618 -> load:0x3fff0018,len:4
13:11:52.618 -> load:0x3fff001c,len:1216
13:11:52.618 -> ho 0 tail 12 room 4
13:11:52.618 -> load:0x40078000,len:9720
13:11:52.618 -> ho 0 tail 12 room 4
13:11:52.618 -> load:0x40080400,len:6352
13:11:52.618 -> entry 0x400806b8
13:11:52.919 ->
13:11:52.919 -> Starting
na mobilu je ten přístupový bod OnDemandAP
mám ale jakmile se toho dotknu tak sice má to snachu něco podobného se ukázat jak je v příloze na founu ale pak se to vrátí zpátky a ESP32 se resetuje