Open GeminiServer opened 1 month ago
Setting the RMII Output solved the problem!
Since the link can not be established, because the ETH needs to be powered, i need to set the the PIN 4 to high:
In app_main.c
#define ETH_POWER_PIN 4
gpio_reset_pin(ETH_POWER_PIN);
gpio_set_direction(ETH_POWER_PIN, GPIO_MODE_OUTPUT);
gpio_set_level(ETH_POWER_PIN, 1);
// Set the GPIO-Pin 4 of ETH POWER PIN to High
I'm getting now the following error:
0) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
Looks like a memleak or similar.. any ideas?
entry 0x40080640
I (31) boot: ESP-IDF v5.4-dev-1523-gaf25eb447e-dirty 2nd stage bootloader
I (31) boot: compile time Jul 24 2024 16:15:13
I (33) boot: Multicore bootloader
I (38) boot: chip revision: v3.1
I (41) boot.esp32: SPI Speed : 40MHz
I (46) boot.esp32: SPI Mode : DIO
I (51) boot.esp32: SPI Flash Size : 16MB
I (55) boot: Enabling RNG early entropy source...
I (61) boot: Partition Table:
I (64) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (79) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (86) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (94) boot: 3 factory factory app 00 00 00010000 00100000
I (101) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (109) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (116) boot: End of partition table
I (121) boot: Defaulting to factory image
I (125) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=17184h ( 94596) map
I (166) esp_image: segment 1: paddr=000271ac vaddr=3ffb0000 size=02560h ( 9568) load
I (170) esp_image: segment 2: paddr=00029714 vaddr=40080000 size=06904h ( 26884) load
I (183) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=46a34h (289332) map
I (282) esp_image: segment 4: paddr=00076a5c vaddr=40086904 size=08c84h ( 35972) load
I (304) boot: Loaded app from partition at offset 0x10000
I (304) boot: Disabling RNG early entropy source...
I (316) cpu_start: Multicore app
I (325) cpu_start: Pro cpu start user code
I (325) cpu_start: cpu freq: 160000000 Hz
I (325) app_init: Application information:
I (328) app_init: Project name: 4g_hotspot
I (333) app_init: App version: v1.0.0-318-g7314e05-dirty
I (339) app_init: Compile time: Jul 24 2024 16:17:14
I (345) app_init: ELF file SHA256: 915d8d2c9...
I (350) app_init: ESP-IDF: v5.4-dev-1523-gaf25eb447e-dirty
I (357) efuse_init: Min chip rev: v0.0
I (362) efuse_init: Max chip rev: v3.99
I (367) efuse_init: Chip rev: v3.1
I (372) heap_init: Initializing. RAM available for dynamic allocation:
I (379) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (385) heap_init: At 3FFB3890 len 0002C770 (177 KiB): DRAM
I (391) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (398) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (404) heap_init: At 4008F588 len 00010A78 (66 KiB): IRAM
I (412) spi_flash: detected chip: gd
I (415) spi_flash: flash io: dio
I (419) main_task: Started on CPU0
I (422) main_task: Calling app_main()
I (426) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (435) gpio: GPIO[32]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (2068) bridge_common: esp-iot-bridge version: 0.11.8
I (2069) bridge_common: IP Address:192.168.4.1
I (2070) bridge_common: GW Address:192.168.4.1
I (2073) bridge_common: NM Address:255.255.255.0
I (2079) mac select: MAC 64:b7:08:2b:fa:f4
I (2110) esp_eth.netif.netif_glue: 64:b7:08:2b:fa:f7
I (2111) esp_eth.netif.netif_glue: ethernet attached to netif
I (3711) bridge_eth: Ethernet Started
I (3712) bridge_eth: Ethernet Link Up
I (3712) bridge_eth: Ethernet HW Addr 64:b7:08:2b:fa:f7
I (3715) bridge_eth: [ETH_LAN ]
Add netif eth with 7314e05(commit id)
I (3722) bridge_common: netif list add success
I (3727) bridge_eth: ETH IP Address:192.168.4.1
W (3734) bridge_modem: Force reset 4g board
I (3737) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (3872) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.2
I (9249) uart: queue free spaces: 40
I (9274) bridge_modem: Signal quality: rssi=22, ber=99
I (9351) bridge_modem: Waiting for IP address
I (9712) bridge_modem: Modem Connect to PPP Server
I (9713) bridge_modem: ~~~~~~~~~~~~~~
I (9713) bridge_modem: IP : 10.24.67.149
I (9713) esp-netif_lwip-ppp: Connected
I (9717) bridge_modem: Netmask : 255.255.255.255
I (9727) bridge_modem: Gateway : 10.64.64.64
I (9732) bridge_modem: Name Server1: 10.74.210.210
I (9738) bridge_modem: Name Server2: 10.74.210.211
I (9743) bridge_modem: ~~~~~~~~~~~~~~
I (9748) bridge_common: [ETH_LAN ]Name Server1: 10.74.210.210
I (9754) bridge_modem: GOT ip event!!!
I (9748) main_task: Returned from app_main()
I (9759) bridge_modem: PPP state changed event 0
E (3494571) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
E (3497656) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
E (3500720) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
Then i tried to activate the use of PSRAM. Same issue! This ends with a ERROR A stack overflow in task uart_task has been detected.
rst:0x1 (POWERON_RESET),boot:0x12 (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:0x3fff0030,len:7176
load:0x40078000,len:15564
ho 0 tail 12 room 4
load:0x40080400,len:4
0x40080400: _init at ??:?
load:0x40080404,len:3904
entry 0x40080640
I (31) boot: ESP-IDF v5.4-dev-1523-gaf25eb447e-dirty 2nd stage bootloader
I (31) boot: compile time Jul 25 2024 17:10:58
I (33) boot: Multicore bootloader
I (38) boot: chip revision: v3.1
I (41) boot.esp32: SPI Speed : 40MHz
I (46) boot.esp32: SPI Mode : DIO
I (51) boot.esp32: SPI Flash Size : 16MB
I (55) boot: Enabling RNG early entropy source...
I (61) boot: Partition Table:
I (64) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (79) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (86) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (94) boot: 3 factory factory app 00 00 00010000 00100000
I (101) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (109) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (116) boot: End of partition table
I (121) boot: Defaulting to factory image
I (125) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1674ch ( 91980) map
I (166) esp_image: segment 1: paddr=00026774 vaddr=3ffb0000 size=02ba8h ( 11176) load
I (170) esp_image: segment 2: paddr=00029324 vaddr=40080000 size=06cf4h ( 27892) load
I (182) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=418f8h (268536) map
I (275) esp_image: segment 4: paddr=00071920 vaddr=40086cf4 size=0a9e4h ( 43492) load
I (301) boot: Loaded app from partition at offset 0x10000
I (301) boot: Disabling RNG early entropy source...
I (312) quad_psram: This chip is ESP32-D0WD
I (313) esp_psram: Found 8MB PSRAM device
I (313) esp_psram: Speed: 40MHz
I (317) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (324) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (333) cpu_start: Multicore app
I (1242) esp_psram: SPI SRAM memory test OK
I (1250) cpu_start: Pro cpu start user code
I (1250) cpu_start: cpu freq: 240000000 Hz
I (1250) app_init: Application information:
I (1254) app_init: Project name: 4g_hotspot
I (1259) app_init: App version: v1.0.0-318-g7314e05-dirty
I (1265) app_init: Compile time: Jul 25 2024 18:20:13
I (1271) app_init: ELF file SHA256: 6c40189af...
I (1277) app_init: ESP-IDF: v5.4-dev-1523-gaf25eb447e-dirty
I (1284) efuse_init: Min chip rev: v3.0
I (1289) efuse_init: Max chip rev: v3.99
I (1294) efuse_init: Chip rev: v3.1
I (1299) heap_init: Initializing. RAM available for dynamic allocation:
I (1306) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1312) heap_init: At 3FFB3E00 len 0002C200 (176 KiB): DRAM
I (1318) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1325) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1331) heap_init: At 400916D8 len 0000E928 (58 KiB): IRAM
I (1338) esp_psram: Adding pool of 4096K of PSRAM memory to heap allocator
I (1347) spi_flash: detected chip: gd
I (1349) spi_flash: flash io: dio
I (1354) main_task: Started on CPU0
I (1357) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1366) main_task: Calling app_main()
I (1370) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1380) gpio: GPIO[32]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (3014) bridge_common: esp-iot-bridge version: 0.11.8
I (3016) bridge_common: IP Address:192.168.4.1
I (3016) bridge_common: GW Address:192.168.4.1
I (3020) bridge_common: NM Address:255.255.255.0
I (3026) mac select: MAC 64:b7:08:2b:fa:f4
I (3065) esp_eth.netif.netif_glue: 64:b7:08:2b:fa:f7
I (3065) esp_eth.netif.netif_glue: ethernet attached to netif
I (4566) bridge_eth: Ethernet Started
I (4567) bridge_eth: Ethernet Link Up
I (4567) bridge_eth: Ethernet HW Addr 64:b7:08:2b:fa:f7
I (4570) bridge_eth: [ETH_LAN ]
Add netif eth with 7314e05(commit id)
I (4577) bridge_common: netif list add success
I (4582) bridge_eth: ETH IP Address:192.168.4.1
W (4588) bridge_modem: Force reset 4g board
I (4592) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (4623) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.2
I (4859) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.4
I (10104) uart: queue free spaces: 40
I (10128) bridge_modem: Signal quality: rssi=24, ber=99
I (10203) bridge_modem: Waiting for IP address
I (10295) esp-netif_lwip-ppp: Connected
I (10296) bridge_modem: Modem Connect to PPP Server
I (10296) bridge_modem: ~~~~~~~~~~~~~~
I (10299) bridge_modem: IP : 10.27.235.241
I (10305) bridge_modem: Netmask : 255.255.255.255
I (10310) bridge_modem: Gateway : 10.64.64.64
I (10316) bridge_modem: Name Server1: 10.74.210.210
I (10321) bridge_modem: Name Server2: 10.74.210.211
I (10327) bridge_modem: ~~~~~~~~~~~~~~
I (10332) bridge_common: [ETH_LAN ]Name Server1: 10.74.210.210
I (10338) bridge_modem: GOT ip event!!!
I (10331) main_task: Returned from app_main()
I (10343) bridge_modem: PPP state changed event 0
E (11980) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
E (12019) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
E (12025) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
E (12058) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
E (56144) esp-netif_lwip-ppp: pppos_input_tcpip failed with -1
***ERROR*** A stack overflow in task uart_task has been detected.
Backtrace: 0x40081d89:0x3ffcd3c0 0x40088c9d:0x3ffcd3e0 0x4008c6b2:0x3ffcd400 0x4008aaf7:0x3ffcd480 0x4008c7bc:0x3ffcd4a0 0x4008c76e:0x3ffcd4c0 0x400e27ae:0x00000000 |<-CORRUPTED
0x40081d89: panic_abort at /Users/ecolak/esp/esp-idf/components/esp_system/panic.c:453
0x40088c9d: esp_system_abort at /Users/ecolak/esp/esp-idf/components/esp_system/port/esp_system_chip.c:92
0x4008c6b2: vApplicationStackOverflowHook at /Users/ecolak/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:553
0x4008aaf7: vTaskSwitchContext at /Users/ecolak/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:3701 (discriminator 7)
0x4008c7bc: _frxt_dispatch at /Users/ecolak/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/portasm.S:451
0x4008c76e: _frxt_int_exit at /Users/ecolak/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/portasm.S:246
0x400e27ae: esp_modem::Netif::receive(unsigned char*, unsigned int) at /Users/ecolak/Entwicklung/LSW-IoT/esp-iot-bridge/examples/4g_hotspot/managed_components/espressif__esp_modem/src/esp_modem_netif.cpp:68
Here the current config: sdkconfig.txt
Would be great if some one can help me out here! Do you need more informations?
uart_task
is the task created by your application layer? You just need to make the task stack bigger.
I did not use the GPIO0 for the RMII clock but used GPIO17 and it worked. I have a T-INTERNET-POE so it may be that that board uses a different GPIO for the RMII clock.
I Try to add the following device. But i'm stucking on the ETH. I did the menuconfig and tried to set every possible setting to get a working "4G NIC example" After uploading i will get the following error and the device reboots in loop. Seems that the ETH is not coming up correctly. i Hope some can help me out here. Thanks...
Here the sdkconfig:
sdkconfig.txt
An this is the device:![image](https://github.com/user-attachments/assets/a8aeff03-9128-47b8-a4e6-2d9e390c2909)
The IOs are: