Can't connect to the internet
W00ng opened this issue · comments
platform:
ESP32-S3-WROOM-1
esp-idf v4.4
issue:
I use mobile phone to configure esp32 connect router success, but the phone still cann't connect to the Internet.
how to debug this problem? thanks
log output as below:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x17b4
load:0x403b6000,len:0xe64
load:0x403ba000,len:0x30c8
entry 0x403b6280
I (25) boot: ESP-IDF 8c8f700c1d-dirty 2nd stage bootloader
I (25) boot: compile time 15:36:19
I (25) boot: chip revision: 0
I (27) qio_mode: Enabling default flash chip QIO
I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (37) boot.esp32s3: SPI Mode : QIO
I (42) boot.esp32s3: SPI Flash Size : 4MB
I (47) boot: Enabling RNG early entropy source...
I (52) boot: Partition Table:
I (56) boot: ## Label Usage Type ST Offset Length
I (63) boot: 0 nvs WiFi data 01 02 0000d000 00008000
I (71) boot: 1 fctry WiFi data 01 02 00015000 00004000
I (78) boot: 2 log_status WiFi data 01 02 00019000 00004000
I (86) boot: 3 otadata OTA data 01 00 0001d000 00002000
I (93) boot: 4 phy_init RF data 01 01 0001f000 00001000
I (100) boot: 5 ota_0 OTA app 00 10 00020000 001d0000
I (108) boot: 6 ota_1 OTA app 00 11 001f0000 001d0000
I (116) boot: 7 coredump Unknown data 01 03 003c0000 00010000
I (123) boot: 8 log_info Unknown data 01 fe 003d0000 00010000
I (131) boot: 9 reserved Unknown data 01 ff 003e0000 00020000
I (138) boot: End of partition table
I (143) esp_image: segment 0: paddr=00020020 vaddr=3c080020 size=200bch (131260) map
I (171) esp_image: segment 1: paddr=000400e4 vaddr=3fc95100 size=046f4h ( 18164) load
I (174) esp_image: segment 2: paddr=000447e0 vaddr=40374000 size=0b838h ( 47160) load
I (186) esp_image: segment 3: paddr=00050020 vaddr=42000020 size=7fc70h (523376) map
I (265) esp_image: segment 4: paddr=000cfc98 vaddr=4037f838 size=058c8h ( 22728) load
I (270) esp_image: segment 5: paddr=000d5568 vaddr=50000000 size=00010h ( 16) load
I (278) boot: Loaded app from partition at offset 0x20000
I (278) boot: Disabling RNG early entropy source...
I (294) cpu_start: Pro cpu up.
I (294) cpu_start: Starting app cpu, entry point is 0x40375248
0x40375248: call_start_cpu1 at D:/Espressif/frameworks/esp-idf-v4.4/components/esp_system/port/cpu_start.c:160
I (0) cpu_start: App cpu up.
I (308) cpu_start: Pro cpu start user code
I (308) cpu_start: cpu freq: 240000000
I (308) cpu_start: Application information:
I (311) cpu_start: Project name: esp-gateway
I (316) cpu_start: App version: v1.0.0-101-g3207bc9-dirty
I (323) cpu_start: Compile time: May 25 2022 15:36:09
I (329) cpu_start: ELF file SHA256: 55e6332f36f8f19a...
I (335) cpu_start: ESP-IDF: 8c8f700c1d-dirty
I (341) heap_init: Initializing. RAM available for dynamic allocation:
I (348) heap_init: At 3FC9D498 len 00042B68 (266 KiB): D/IRAM
I (354) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (361) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (367) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (374) spi_flash: detected chip: generic
I (378) spi_flash: flash io: qio
I (382) sleep: Configure to isolate all GPIO pins in sleep state
I (389) sleep: Enable automatic switching of GPIO sleep configuration
I (396) coexist: coexist rom version e7ae62f
I (401) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (455) gpio: GPIO[46]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3
I (456) pp: pp rom version: e7ae62f
I (458) net80211: net80211 rom version: e7ae62f
I (464) wifi:wifi driver task: 3fce656c, prio:23, stack:6656, core=0
I (469) system_api: Base MAC address is not set
I (474) system_api: read default base MAC address from EFUSE
I (487) wifi:wifi firmware version: e2cf259
I (488) wifi:wifi certification version: v7.0
I (488) wifi:config NVS flash: enabled
I (492) wifi:config nano formating: disabled
I (496) wifi:Init data frame dynamic rx buffer num: 32
I (501) wifi:Init management frame dynamic rx buffer num: 32
I (506) wifi:Init management short buffer num: 32
I (511) wifi:Init dynamic tx buffer num: 32
I (515) wifi:Init static tx FG buffer num: 2
I (519) wifi:Init static rx buffer size: 1600
I (523) wifi:Init static rx buffer num: 10
I (526) wifi:Init dynamic rx buffer num: 32
I (531) wifi_init: rx ba win: 6
I (534) wifi_init: tcpip mbox: 32
I (538) wifi_init: udp mbox: 6
I (542) wifi_init: tcp mbox: 6
I (546) wifi_init: tcp tx win: 5744
I (550) wifi_init: tcp rx win: 5744
I (554) wifi_init: tcp mss: 1460
I (558) wifi_init: WiFi IRAM OP enabled
I (562) wifi_init: WiFi RX IRAM OP enabled
I (567) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
I (664) wifi:mode : null
I (665) ip select: IP Address:192.168.4.1
I (665) ip select: GW Address:192.168.4.1
I (665) ip select: NM Address:255.255.255.0
I (670) gateway_wifi: IP Address:192.168.4.1
Add netif ap with 3207bc9(commit id)
I (678) gateway_common: netif list add success
I (684) wifi:mode : softAP (7c:df:a1:e8:27:01)
I (688) wifi:Total power save buffer number: 16
I (692) wifi:Init max length of beacon: 752/752
I (696) wifi:Init max length of beacon: 752/752
I (1365) wifi:Total power save buffer number: 16
I (1366) gateway_wifi: softap ssid: ESP_Gateway password: 12345678
Add netif sta with 3207bc9(commit id)
I (1369) gateway_common: netif list add success
I (1375) wifi:mode : sta (7c:df:a1:e8:27:00) + softAP (7c:df:a1:e8:27:01)
I (1381) wifi:enable tsf
I (1384) gateway_wifi: Found ssid Redmi_0C54
I (1388) gateway_wifi: Found password 3625147890
start web server
I (1400) wifi
I (2063) wifi:state: init -> auth (b0)
I (2102) wifi:state: auth -> assoc (0)
I (2113) wifi:state: assoc -> run (10)
I (2224) wifi:connected with Redmi_0C54, aid = 10, channel 1, 40U, bssid = dc:d8:7c:2c:41:1b
I (2225) wifi:security: WPA2-PSK, phy: bgn, rssi: -53
I (2226) wifi:pm start, type: 1
I (2229) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 14, mt_pti: 25000, mt_time: 10000
W (2268) wifi:idx:0 (ifx:0, dc:d8:7c:2c:41:1b), tid:6, ssn:2, winSize:64
I (2325) wifi:BcnInt:102400, DTIM:1
I (2955) esp_netif_handlers: sta ip: 10.1.1.197, mask: 255.255.255.0, gw: 10.1.1.1
I (2955) gateway_wifi: Connected with IP Address:10.1.1.197
I (16132) wifi
I (16132) wifi
I (16155) gateway_wifi: STA Connecting to the AP again...
I (16491) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2
W (16948) wifi:idx:2 (ifx:1, de:54:85:e8:93:8d), tid:0, ssn:16, winSize:64
W (16952) wifi:idx:1 (ifx:0, dc:d8:7c:2c:41:1b), tid:5, ssn:3, winSize:64
- Please make sure that the router can connect to the Internet normally, or try another router.
- Whether the environment is poor and the Internet cannot be connected normally.
hi tswen,
- mobile phone direct connected to the router, it can access the Internet( so router is normal)
- i also try to use other mobile phone create hotspot, then esp32 connect it, same issue
- from log we can see that: esp32 connect to router "Redmi_0C54" successful, it seems nothing wrong
- Can you try to compile after adding these configuration items. // ESP32S3-Specific
https://github.com/espressif/esp-gateway/blob/master/optimize_sdkconfig/sdkconfig.defaults.esp32s3#L19 - I still wonder if it's because of environmental interference or poor network conditions. Because I tried to compile with the same ESP-Gateway commit and there is no problem.
ESP-Gateway Commit_ID: 3207bc9
IDF Commit_ID: 8c8f700
- Can you try to compile after adding these configuration items. // ESP32S3-Specific
https://github.com/espressif/esp-gateway/blob/master/optimize_sdkconfig/sdkconfig.defaults.esp32s3#L19- I still wonder if it's because of environmental interference or poor network conditions. Because I tried to compile with the same ESP-Gateway commit and there is no problem.
ESP-Gateway Commit_ID: 3207bc9
IDF Commit_ID: 8c8f700
Thank you very much, I update the sdkconfig and solve this problem.