jonask1337 / esp-idf-nat-example

ESP-IDF example project with NAT setup.
83 stars 15 forks source link

Run Time Error: #19

Closed Gokula-Krishnan-Sekar closed 3 years ago

Gokula-Krishnan-Sekar commented 3 years ago

hi I'm new to esp-idf. i just followed your commands. build and flash successfully but while monitoring its show like this

Rebooting... ets Jul 29 2019 12:21:46

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:2 load:0x3fff0018,len:4 load:0x3fff001c,len:6840 load:0x40078000,len:14076 load:0x40080400,len:4304 entry 0x400806e8 I (72) boot: Chip Revision: 3 I (72) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (39) boot: ESP-IDF v4.0-dirty 2nd stage bootloader I (40) boot: compile time 22:18:54 I (40) boot: Enabling RNG early entropy source... I (45) boot: SPI Speed : 40MHz I (49) boot: SPI Mode : DIO I (53) boot: SPI Flash Size : 2MB I (57) boot: Partition Table: I (61) boot: ## Label Usage Type ST Offset Length I (68) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (83) boot: 2 factory factory app 00 00 00010000 00100000 I (90) boot: End of partition table I (94) boot_comm: chip revision: 3, min. application chip revision: 0 I (101) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x14b7c ( 84860) map I (141) esp_image: segment 1: paddr=0x00024ba4 vaddr=0x3ffb0000 size=0x03280 ( 12928) load I (146) esp_image: segment 2: paddr=0x00027e2c vaddr=0x40080000 size=0x00400 ( 1024) load 0x40080000: _WindowOverflow4 at /root/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (148) esp_image: segment 3: paddr=0x00028234 vaddr=0x40080400 size=0x07ddc ( 32220) load I (170) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x663e8 (418792) map 0x400d0018: _stext at ??:?

I (320) esp_image: segment 5: paddr=0x00096408 vaddr=0x400881dc size=0x0cef0 ( 52976) load 0x400881dc: reconfigureAllWdts at /root/esp/esp-idf/components/esp32/panic.c:406

I (356) boot: Loaded app from partition at offset 0x10000 I (356) boot: Disabling RNG early entropy source... I (356) cpu_start: Pro cpu up. I (360) cpu_start: Application information: I (365) cpu_start: Project name: esp-idf-nat-example I (371) cpu_start: App version: 1 I (375) cpu_start: Compile time: Jul 5 2021 22:45:00 I (381) cpu_start: ELF file SHA256: 7846af27b0df8486... I (387) cpu_start: ESP-IDF: v4.0-dirty I (392) cpu_start: Starting app cpu, entry point is 0x40081260 0x40081260: call_start_cpu1 at /root/esp/esp-idf/components/esp32/cpu_start.c:272

I (379) cpu_start: App cpu up. I (403) heap_init: Initializing. RAM available for dynamic allocation: I (410) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (416) heap_init: At 3FFB91C8 len 00026E38 (155 KiB): DRAM I (422) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (428) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (435) heap_init: At 400950CC len 0000AF34 (43 KiB): IRAM I (441) cpu_start: Pro cpu start user code I (459) spi_flash: detected chip: gd I (460) spi_flash: flash io: dio W (4ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6840
load:0x40078000,len:14076
load:0x40080400,len:4304
entry 0x400806e8
I (72) boot: Chip Revision: 3
I (72) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (40) boot: ESP-IDF v4.0-dirty 2nd stage bootloader I (40) boot: compile time 22:18:54 I (40) boot: Enabling RNG early entropy source... I (45) boot: SPI Speed : 40MHz I (49) boot: SPI Mode : DIO I (53) boot: SPI Flash Size : 2MB I (57) boot: Partition Table: I (61) boot: ## Label Usage Type ST Offset Length I (68) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (83) boot: 2 factory factory app 00 00 00010000 00100000 I (90) boot: End of partition table I (95) boot_comm: chip revision: 3, min. application chip revision: 0 I (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x14b7c ( 84860) map I (141) esp_image: segment 1: paddr=0x00024ba4 vaddr=0x3ffb0000 size=0x03280 ( 12928) load I (146) esp_image: segment 2: paddr=0x00027e2c vaddr=0x40080000 size=0x00400 ( 1024) load 0x40080000: _WindowOverflow4 at /root/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (148) esp_image: segment 3: paddr=0x00028234 vaddr=0x40080400 size=0x07ddc ( 32220) load I (170) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x663e8 (418792) map 0x400d0018: _stext at ??:?

I (320) esp_image: segment 5: paddr=0x00096408 vaddr=0x400881dc size=0x0cef0 ( 52976) load 0x400881dc: reconfigureAllWdts at /root/esp/esp-idf/components/esp32/panic.c:406

I (356) boot: Loaded app from partition at offset 0x10000 I (356) boot: Disabling RNG early entropy source... I (356) cpu_start: Pro cpu up. I (360) cpu_start: Application information: I (365) cpu_start: Project name: esp-idf-nat-example I (371) cpu_start: App version: 1 I (375) cpu_start: Compile time: Jul 5 2021 22:45:00 I (381) cpu_start: ELF file SHA256: 7846af27b0df8486... I (387) cpu_start: ESP-IDF: v4.0-dirty I (392) cpu_start: Starting app cpu, entry point is 0x40081260 0x40081260: call_start_cpu1 at /root/esp/esp-idf/components/esp32/cpu_start.c:272

I (0) cpu_start: App cpu up. I (403) heap_init: Initializing. RAM available for dynamic allocation: I (410) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (416) heap_init: At 3FFB91C8 len 00026E38 (155 KiB): DRAM I (422) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (428) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (435) heap_init: At 400950CC len 0000AF34 (43 KiB): IRAM I (441) cpu_start: Pro cpu start user code I (459) spi_flash: detected chip: gd I (460) spi_flash: flash io: dio W (460) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (470) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (595) wifi: wifi driver task: 3ffc3e10, prio:23, stack:3584, core=0 I (595) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (595) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (625) wifi: wifi firmware version: 581f422 I (625) wifi: config NVS flash: enabled I (625) wifi: config nano formating: disabled I (625) wifi: Init dynamic tx buffer num: 32 I (625) wifi: Init data frame dynamic rx buffer num: 32 I (635) wifi: Init management frame dynamic rx buffer num: 32 I (635) wifi: Init management short buffer num: 32 I (645) wifi: Init static rx buffer size: 1600 I (645) wifi: Init static rx buffer num: 10 I (655) wifi: Init dynamic rx buffer num: 32 W (655) wifi: password less than 8

ESP_ERROR_CHECK failed: esp_err_t 0xb (ERROR) at 0x40088820 0x40088820: _esp_error_check_failed at /root/esp/esp-idf/components/esp32/panic.c:726

file: "../main/main.c" line 113 func: wifi_init_sta expression: esp_wifi_set_config(ESP_IF_WIFI_AP, &ap_config)

ELF file SHA256: 7846af27b0df848622394dd17b94d4ad9acb7d6165289aa58e9a1c6d129a994e

Backtrace: 0x4008828d:0x3ffbadc0 0x40088823:0x3ffbade0 0x400d52ab:0x3ffbae00 0x400d5365:0x3ffbafd0 0x400d1cfa:0x3ffbaff0 0x4008ca45:0x3ffbb010 0x4008828d: invoke_abort at /root/esp/esp-idf/components/esp32/panic.c:155

0x40088823: _esp_error_check_failed at /root/esp/esp-idf/components/esp32/panic.c:727

0x400d52ab: wifi_init_sta at /root/Desktop/esp-idf-nat-example-master/build/../main/main.c:113 (discriminator 1)

0x400d5365: app_main at /root/Desktop/esp-idf-nat-example-master/build/../main/main.c:145

0x400d1cfa: main_task at /root/esp/esp-idf/components/esp32/cpu_start.c:554

0x4008ca45: vPortTaskWrapper at /root/esp/esp-idf/components/freertos/port.c:143

jonask1337 commented 3 years ago

I guess you already solved it but this occurs if you do not change the sample WLAN configuration via menuconfig because the placeholder WLAN password is too short.

Krish402 commented 3 years ago

Yes. I already solved. Thank you for your reply

Gokula-Krishnan-Sekar commented 3 years ago

Is there any possibility to convert this esp-idf code to arduino code.

On Tue, Jul 6, 2021, 8:09 PM Krish402 @.***> wrote:

Yes. I already solved. Thank you for your reply

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jonask1337/esp-idf-nat-example/issues/19#issuecomment-874819390, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDB3HAPKVKQVLIKMAXXUV3TWMIRRANCNFSM473C4LJA .

jonask1337 commented 3 years ago

Yes, that is possible. In this issue I wrote instructions on how to do it. Although it should still work, it is deprecated. In the this repository there is also an example for Arduino, but I haven't tested it.

The esp-idf-nat-example for the ESP-IDF also is deprecated, since the NAT feature is now part of the ESP-IDF and you don't have to replace the LWIP library. The esp-nat-router project is a more recent and advanced NAT router project for the ESP32 which could be interesting for you, although it also is for the ESP-IDF.

Gokula-Krishnan-Sekar commented 3 years ago

Thanks, I'll check it out sir. It will help me a lot

On Wed, Jul 7, 2021, 1:54 AM Jonas Knorr @.***> wrote:

Yes, that is possible. In this https://github.com/jonask1337/esp-lwip/issues/7 issue I wrote instructions on how to do it. Although it should still work, it is deprecated. In the this https://github.com/paclema/esp32_lwip_nat_example repository there is also an example for Arduino, but I haven't tested it.

This example for the ESP-IDF also is deprecated, since the NAT feature is now part of the ESP-IDF and you don't have to replace the LWIP library. The esp-nat-router https://github.com/martin-ger/esp32_nat_router project is a more recent and advanced NAT router project for the ESP32 which could be interesting for you, although it also is for the ESP-IDF.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jonask1337/esp-idf-nat-example/issues/19#issuecomment-875057637, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDB3HE2UCRJGU7NFFSJDGLTWNRATANCNFSM473C4LJA .

Gokula-Krishnan-Sekar commented 3 years ago

I followed your wifi repeater instruction. Build is not successful. I tried with V4.3 this error solved but in V3.3 it still showing.

../components/arduino/cores/esp32/esp32-hal-gpio.h:28:10: fatal error: soc/soc_caps.h: No such file or directory

include "soc/soc_caps.h"

^~~~ compilation terminated. [814/938] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/cores/esp32/USB.cpp.obj FAILED: esp-

On Wed, Jul 7, 2021, 2:48 AM Gokula Krishnan @.***> wrote:

Thanks, I'll check it out sir. It will help me a lot

On Wed, Jul 7, 2021, 1:54 AM Jonas Knorr @.***> wrote:

Yes, that is possible. In this https://github.com/jonask1337/esp-lwip/issues/7 issue I wrote instructions on how to do it. Although it should still work, it is deprecated. In the this https://github.com/paclema/esp32_lwip_nat_example repository there is also an example for Arduino, but I haven't tested it.

This example for the ESP-IDF also is deprecated, since the NAT feature is now part of the ESP-IDF and you don't have to replace the LWIP library. The esp-nat-router https://github.com/martin-ger/esp32_nat_router project is a more recent and advanced NAT router project for the ESP32 which could be interesting for you, although it also is for the ESP-IDF.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jonask1337/esp-idf-nat-example/issues/19#issuecomment-875057637, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDB3HE2UCRJGU7NFFSJDGLTWNRATANCNFSM473C4LJA .