tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
664 stars 217 forks source link

Errors on ESP-IDF 3.2 #39

Closed rokrodic closed 5 years ago

rokrodic commented 5 years ago

Hi. I have downloaded your code and try to to run it. This is what I get:

`Rebooting... 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:8580 load:0x40078000,len:12064 load:0x40080400,len:7116 entry 0x400807a0 D (64) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff) I (35) boot: ESP-IDF v4.0-dev-278-gdaee3dfa5 2nd stage bootloader I (36) boot: compile time 23:04:18 D (36) boot: Enabling RTCWDT(9000 ms) I (49) boot: Enabling RNG early entropy source... D (49) boot: magic e9 D (49) boot: segments 04 D (51) boot: spi_mode 02 D (53) boot: spi_speed 0f D (56) boot: spi_size 02 I (58) boot: SPI Speed : 80MHz I (63) boot: SPI Mode : DIO I (67) boot: SPI Flash Size : 4MB D (71) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=8000 src_addr_aligned=0 D (80) boot: mapped partition table 0x8000 at 0x3f408000 D (85) flash_parts: partition table verified, 9 entries I (90) boot: Partition Table: I (94) boot: ## Label Usage Type ST Offset Length D (101) boot: load partition table entry 0x3f408000 D (106) boot: type=1 subtype=2 I (109) boot: 0 nvs WiFi data 01 02 00009000 00005000 D (117) boot: load partition table entry 0x3f408020 D (122) boot: type=1 subtype=0 I (125) boot: 1 otadata OTA data 01 00 0000e000 00002000 D (132) boot: load partition table entry 0x3f408040 D (137) boot: type=0 subtype=0 I (140) boot: 2 factory factory app 00 00 00010000 00120000 D (148) boot: load partition table entry 0x3f408060 D (153) boot: type=0 subtype=10 I (156) boot: 3 app0 OTA app 00 10 00130000 00100000 D (164) boot: load partition table entry 0x3f408080 D (169) boot: type=0 subtype=11 I (172) boot: 4 app1 OTA app 00 11 00230000 00100000 D (179) boot: load partition table entry 0x3f4080a0 D (184) boot: type=1 subtype=99 I (188) boot: 5 eeprom Unknown data 01 99 00330000 00001000 D (195) boot: load partition table entry 0x3f4080c0 D (200) boot: type=1 subtype=82 I (203) boot: 6 storage Unknown data 01 82 00331000 00060000 D (211) boot: load partition table entry 0x3f4080e0 D (216) boot: type=1 subtype=4 I (219) boot: 7 nvs_key NVS keys 01 04 00391000 00001000 I (227) boot: End of partition table D (231) boot: OTA data offset 0xe000 D (234) bootloader_flash: mmu set paddr=00000000 count=1 size=2000 src_addr=e000 src_addr_aligned=0 D (244) boot: otadata[0]: sequence values 0xffffffff D (249) boot: otadata[1]: sequence values 0xffffffff D (254) boot: OTA sequence numbers both empty (all-0xFF) or partition table does not have bootable ota_apps (app_count=2) I (265) boot: Defaulting to factory image D (269) boot: Trying partition index -1 offs 0x10000 size 0x120000 D (276) esp_image: reading image header @ 0x10000 D (280) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff) D (287) esp_image: image header: 0xe9 0x06 0x02 0x02 400810c4 I (293) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2687c (157820) map D (302) bootloader_flash: mmu set paddr=00010000 count=3 size=2687c src_addr=10020 src_addr_aligned=10000 D (358) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff) I (358) esp_image: segment 1: paddr=0x000368a4 vaddr=0x3ffb0000 size=0x03080 ( 12416) load D (362) bootloader_flash: mmu set paddr=00030000 count=1 size=3080 src_addr=368a4 src_addr_aligned=30000 D (376) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff) I (379) esp_image: segment 2: paddr=0x0003992c vaddr=0x40080000 size=0x00400 ( 1024) load 0x40080000: _WindowOverflow4 at D:/msys32/home/Akoya/esp/esp-idf/components/freertos/xtensa_vectors.S:1779

D (387) bootloader_flash: mmu set paddr=00030000 count=1 size=400 src_addr=3992c src_addr_aligned=30000 D (397) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff) I (404) esp_image: segment 3: paddr=0x00039d34 vaddr=0x40080400 size=0x062dc ( 25308) load D (413) bootloader_flash: mmu set paddr=00030000 count=2 size=62dc src_addr=39d34 src_addr_aligned=30000 D (431) bootloader_flash: mmu set block paddr=0x00040000 (was 0xffffffff) I (431) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0x69d8c (433548) map 0x400d0018: _stext at ??:?

D (438) bootloader_flash: mmu set paddr=00040000 count=7 size=69d8c src_addr=40018 src_addr_aligned=40000 D (574) bootloader_flash: mmu set block paddr=0x000a0000 (was 0xffffffff) I (574) esp_image: segment 5: paddr=0x000a9dac vaddr=0x400866dc size=0x094c4 ( 38084) load 0x400866dc: ieee80211_output_process at ??:?

D (578) bootloader_flash: mmu set paddr=000a0000 count=2 size=94c4 src_addr=a9dac src_addr_aligned=a0000 D (601) bootloader_flash: mmu set block paddr=0x000b0000 (was 0xffffffff) D (602) esp_image: Calculated hash: b98fa9f5c444ddbec0cb523d84e1a373863507c349cdfbc20f826972c1e11be2 D (606) bootloader_flash: mmu set paddr=000b0000 count=1 size=20 src_addr=b3280 src_addr_aligned=b0000 D (616) bootloader_flash: mmu set paddr=000b0000 count=1 size=20 src_addr=b3280 src_addr_aligned=b0000 I (634) boot: Loaded app from partition at offset 0x10000 I (634) boot: Disabling RNG early entropy source... D (637) boot: Mapping segment 0 as DROM D (641) boot: Mapping segment 4 as IROM D (644) boot: calling set_cache_and_start_app D (649) boot: configure drom and irom and start D (654) boot: start: 0x400810c4 0x400810c4: call_start_cpu0 at D:/msys32/home/Akoya/esp/esp-idf/components/esp32/cpu_start.c:121

I (657) cpu_start: Pro cpu up. I (660) cpu_start: Application information: I (665) cpu_start: Project name: wifi_manager I (671) cpu_start: App version: 1 I (675) cpu_start: Compile time: Apr 16 2019 23:03:15 I (681) cpu_start: ELF file SHA256: 3deb2d4cdfbba3d6... I (687) cpu_start: ESP-IDF: v4.0-dev-278-gdaee3dfa5 I (694) cpu_start: Starting app cpu, entry point is 0x40081070 0x40081070: call_start_cpu1 at D:/msys32/home/Akoya/esp/esp-idf/components/esp32/cpu_start.c:267

I (682) cpu_start: App cpu up. D (704) memory_layout: Checking 7 reserved memory ranges: D (709) memory_layout: Reserved memory range 0x3ffae000 - 0x3ffae6e0 D (716) memory_layout: Reserved memory range 0x3ffb0000 - 0x3ffb8f68 D (722) memory_layout: Reserved memory range 0x3ffe0000 - 0x3ffe0440 D (728) memory_layout: Reserved memory range 0x3ffe3f20 - 0x3ffe4350 D (735) memory_layout: Reserved memory range 0x40070000 - 0x40078000 D (741) memory_layout: Reserved memory range 0x40078000 - 0x40080000 0x40080000: _WindowOverflow4 at D:/msys32/home/Akoya/esp/esp-idf/components/freertos/xtensa_vectors.S:1779

D (748) memory_layout: Reserved memory range 0x40080000 - 0x4008fb9d 0x40080000: _WindowOverflow4 at D:/msys32/home/Akoya/esp/esp-idf/components/freertos/xtensa_vectors.S:1779

D (754) memory_layout: Building list of available memory regions: D (760) memory_layout: Available memory region 0x3ffae6e0 - 0x3ffb0000 D (767) memory_layout: Available memory region 0x3ffb8f68 - 0x3ffc0000 D (774) memory_layout: Available memory region 0x3ffc0000 - 0x3ffc2000 D (780) memory_layout: Available memory region 0x3ffc2000 - 0x3ffc4000 D (787) memory_layout: Available memory region 0x3ffc4000 - 0x3ffc6000 D (793) memory_layout: Available memory region 0x3ffc6000 - 0x3ffc8000 D (800) memory_layout: Available memory region 0x3ffc8000 - 0x3ffca000 D (807) memory_layout: Available memory region 0x3ffca000 - 0x3ffcc000 D (813) memory_layout: Available memory region 0x3ffcc000 - 0x3ffce000 D (820) memory_layout: Available memory region 0x3ffce000 - 0x3ffd0000 D (826) memory_layout: Available memory region 0x3ffd0000 - 0x3ffd2000 D (833) memory_layout: Available memory region 0x3ffd2000 - 0x3ffd4000 D (840) memory_layout: Available memory region 0x3ffd4000 - 0x3ffd6000 D (846) memory_layout: Available memory region 0x3ffd6000 - 0x3ffd8000 D (853) memory_layout: Available memory region 0x3ffd8000 - 0x3ffda000 D (859) memory_layout: Available memory region 0x3ffda000 - 0x3ffdc000 D (866) memory_layout: Available memory region 0x3ffdc000 - 0x3ffde000 D (873) memory_layout: Available memory region 0x3ffde000 - 0x3ffe0000 D (879) memory_layout: Available memory region 0x3ffe0440 - 0x3ffe3f20 D (886) memory_layout: Available memory region 0x3ffe4350 - 0x3ffe8000 D (892) memory_layout: Available memory region 0x3ffe8000 - 0x3fff0000 D (899) memory_layout: Available memory region 0x3fff0000 - 0x3fff8000 D (905) memory_layout: Available memory region 0x3fff8000 - 0x3fffc000 D (912) memory_layout: Available memory region 0x3fffc000 - 0x40000000 D (919) memory_layout: Available memory region 0x4008fba0 - 0x40090000 D (925) memory_layout: Available memory region 0x40090000 - 0x40092000 D (932) memory_layout: Available memory region 0x40092000 - 0x40094000 D (938) memory_layout: Available memory region 0x40094000 - 0x40096000 D (945) memory_layout: Available memory region 0x40096000 - 0x40098000 D (952) memory_layout: Available memory region 0x40098000 - 0x4009a000 D (958) memory_layout: Available memory region 0x4009a000 - 0x4009c000 D (965) memory_layout: Available memory region 0x4009c000 - 0x4009e000 D (971) memory_layout: Available memory region 0x4009e000 - 0x400a0000 I (978) heap_init: Initializing. RAM available for dynamic allocation: I (990) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM D (996) heap_init: New heap initialised at 0x3ffb8f68 I (1002) heap_init: At 3FFB8F68 len 00027098 (156 KiB): DRAM I (1008) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1014) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM D (1021) heap_init: New heap initialised at 0x4008fba0 I (1026) heap_init: At 4008FBA0 len 00010460 (65 KiB): IRAM I (1032) cpu_start: Pro cpu start user code D (1044) clk: RTC_SLOW_CLK calibration value: 3170099 D (47) intr_alloc: Connected src 46 to int 2 (cpu 0) D (48) intr_alloc: Connected src 57 to int 3 (cpu 0) D (48) intr_alloc: Connected src 24 to int 9 (cpu 0) I (53) cpu_start: Starting scheduler on PRO CPU. D (0) intr_alloc: Connected src 25 to int 2 (cpu 1) I (0) cpu_start: Starting scheduler on APP CPU. D (68) heap_init: New heap initialised at 0x3ffe0440 D (78) heap_init: New heap initialised at 0x3ffe4350 D (88) intr_alloc: Connected src 16 to int 12 (cpu 0) D (88) nvs: nvs_flash_init_custom partition=nvs start=9 count=5 D (118) http_server: waiting for start bit D (118) nvs: nvs_open_from_partition espwifimgr 0 D (118) tcpip_adapter: dhcp server stop successfully D (118) tcpip_adapter: dhcp server re init D (128) wifi_manager: wifi_manager: Start DHCP client for STA interface. If not already running

D (138) tcpip_adapter: dhcp client re init D (138) nvs: nvs_open_from_partition misc 1 D (148) nvs: nvs_get_str_or_blob log D (148) main: free heap: 247560 I (148) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE D (158) efuse: coding scheme 0 D (168) efuse: In EFUSE_BLK0DATA2_REG is used 8 bits starting with 8 bit D (168) efuse: coding scheme 0 D (178) efuse: In EFUSE_BLK0DATA2_REG is used 8 bits starting with 0 bit D (178) efuse: coding scheme 0 D (188) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 24 bit D (188) efuse: coding scheme 0 D (198) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 16 bit D (198) efuse: coding scheme 0 D (208) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 8 bit D (208) efuse: coding scheme 0 D (218) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 0 bit D (218) efuse: coding scheme 0 D (228) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit I (228) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE D (238) efuse: coding scheme 0 D (248) efuse: In EFUSE_BLK0DATA2_REG is used 8 bits starting with 8 bit D (248) efuse: coding scheme 0 D (258) efuse: In EFUSE_BLK0DATA2_REG is used 8 bits starting with 0 bit D (258) efuse: coding scheme 0 D (268) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 24 bit D (268) efuse: coding scheme 0 D (278) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 16 bit D (278) efuse: coding scheme 0 D (288) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 8 bit D (288) efuse: coding scheme 0 D (298) efuse: In EFUSE_BLK0DATA1_REG is used 8 bits starting with 0 bit D (298) efuse: coding scheme 0 D (308) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit D (308) nvs: nvs_open_from_partition nvs.net80211 1 D (318) nvs: nvs_get opmode 1 D (318) nvs: nvs_get_str_or_blob sta.ssid D (328) nvs: nvs_get_str_or_blob sta.mac D (328) nvs: nvs_get sta.authmode 1 D (328) nvs: nvs_get_str_or_blob sta.pswd D (338) nvs: nvs_get_str_or_blob sta.pmk D (338) nvs: nvs_get sta.chan 1 D (338) nvs: nvs_get auto.conn 1 D (348) nvs: nvs_get bssid.set 1 D (348) nvs: nvs_get_str_or_blob sta.bssid D (358) nvs: nvs_get sta.lis_intval 2 D (358) nvs: nvs_get sta.phym 1 D (358) nvs: nvs_get sta.phybw 1 D (368) nvs: nvs_get_str_or_blob sta.apsw D (368) nvs: nvs_get_str_or_blob sta.apinfo D (378) nvs: nvs_get sta.scan_method 1 D (378) nvs: nvs_get sta.sort_method 1 D (378) nvs: nvs_get sta.minrssi 1 D (388) nvs: nvs_get sta.minauth 1 D (388) nvs: nvs_get_str_or_blob ap.ssid D (388) nvs: nvs_get_str_or_blob ap.mac D (398) nvs: nvs_get_str_or_blob ap.passwd D (398) nvs: nvs_get_str_or_blob ap.pmk D (398) nvs: nvs_get ap.chan 1 D (408) nvs: nvs_get ap.authmode 1 D (408) nvs: nvs_get ap.hidden 1 D (408) nvs: nvs_get ap.max.conn 1 D (418) nvs: nvs_get bcn.interval 2 D (418) nvs: nvs_get ap.phym 1 D (418) nvs: nvs_get ap.phybw 1 D (428) nvs: nvs_get ap.sndchan 1 D (428) nvs: nvs_get lorate 1 D (428) nvs: nvs_set_blob sta.mac 6 D (448) nvs: nvs_set_blob ap.mac 6 ESP_ERROR_CHECK failed: esp_err_t 0xb (ERROR) at 0x40088008 0x40088008: _esp_error_check_failed at D:/msys32/home/Akoya/esp/esp-idf/components/esp32/panic.c:721

file: "D:/msys32/home/AKOYA/esp/wifi_manager/main/wifi_manager.c" line 580 func: wifi_manager expression: esp_wifi_set_config(WIFI_IF_AP, &ap_config)

ELF file SHA256: 3deb2d4cdfbba3d6f9dd637f484a0e62cb697f04a7c2f9b1445014692005d6af

Backtrace: 0x40087b9c:0x3ffbef60 0x4008800b:0x3ffbef80 0x400d3c76:0x3ffbefa0 0x4008d161:0x3ffbf110 0x40087b9c: invoke_abort at D:/msys32/home/Akoya/esp/esp-idf/components/esp32/panic.c:716

0x4008800b: _esp_error_check_failed at D:/msys32/home/Akoya/esp/esp-idf/components/esp32/panic.c:722

0x400d3c76: wifi_manager at D:/msys32/home/AKOYA/esp/wifi_manager/main/wifi_manager.c:580 (discriminator 1)

0x4008d161: vPortTaskWrapper at D:/msys32/home/Akoya/esp/esp-idf/components/freertos/port.c:403 `

Any idea why it reboots at /wifi_manager.c" line 580?

tonyp7 commented 5 years ago

esp-idf v4.0? Do you mean 3.2?

rokrodic commented 5 years ago

I believed it was 4.0. From the output above: I (35) boot: ESP-IDF v4.0-dev-278-gdaee3dfa5 2nd stage bootloader

But after I've checked it's: ESP-IDF Pre-release v3.2-rc

Btw. In the menuconfig I didn't chance anything except com port. Can you maybe post your config file, so I can check?

Sorry. Any idea why it does not work?

rokrodic commented 5 years ago

Hi. I have retried many times and finally got it working. The problem were causing both bootsector and ESP-IDF debug levels, which were turned to the full. Now I have them set to "warnings" and the code works... Closing Issue.