martin-ger / esp_wifi_repeater

A full functional WiFi Repeater (correctly: a WiFi NAT Router)
MIT License
4.77k stars 901 forks source link

lwip sntp_init() cause issues after defining DAILY_LIMIT #265

Open vahurnya opened 5 years ago

vahurnya commented 5 years ago

Hi, I used a few month old build with DAILY_LIMIT=1 on an esp8266. Today I compiled the latest and seems LWIP cause freezes when this is enabled, most likely after the sntp_init() call. If this row in the user_main.c is commented out I can again see the console responding and can configure settings. Repeatedly I get the reset event on console: ets Jan 8 2013,rst cause:4, boot mode:(3,7)

I will do some tests with LWIP debug enabled tomorrow.

vahurnya commented 5 years ago

Cannot pull out more debug logs than this:

WiFi Repeater V2.2.4 starting

running rom 1 Config found and loaded netif_set_ipaddr: netif address being changed netif: IP address of interface ␀␀ set to 127.0.0.1 netif: netmask of interface ␀␀ set to 255.0.0.0 netif: GW address of interface ␀␀ set to 127.0.0.1 netif: added interface lo IP addr 127.0.0.1 netmask 255.0.0.0 gw 127.0.0.1 Starting Console TCP Server on port 7777 tcp_bind: bind to port 7777 Starting Web Config Server on port 80 tcp_bind: bind to port 80 dns_enqueue: "1.pool.ntp.org": use DNS entry 0

dns_send: dns_servers[0] "1.pool.ntp.org": request pbuf_alloc(length=272) pbuf_alloc(length=272) == 0x3fff6e40 udp_connect: connected to 0.0.0.0,port 4096 udp_send udp_send: dest is normal ip_route: No route to 208.67.222.222 udp_send: No route to 208.67.222.222 pbuf_free(0x3fff6e40) pbuf_free: deallocating 0x3fff6e40 dns_send returned error: sntp_request: Waiting for server address to be resolved. mode : sta(b4:e6:2d:37:41:7a) + softAP(b6:e6:2d:37:41:7a) netif: IP address of interface ew set to 0.0.0.0 netif: netmask of interface ew set to 0.0.0.0 netif: GW address of interface ew set to 0.0.0.0

ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset load 0x40100000, len 1328, room 16 tail 0 chksum 0x12

load 0x3ffe8000, len 604, room 8 tail 4 chksum 0x34 csum 0x34

rBoot v1.4.2 - richardaburton@gmail.com Flash Size: 32 Mbit Flash Mode: DIO Flash Speed: 40 MHz

Booting rom 1.

vahurnya commented 5 years ago

hmm, changing the sntp.c in esp-open-lwip:

ifndef SNTP_STARTUP_DELAY

define SNTP_STARTUP_DELAY 1000

endif

resolves the boot issue.