Re: ESP32 DHCP 获取不到IP
Posted: Tue Mar 01, 2022 2:42 am
DHCP 的包没到 UDP 层,还需要你把 IP_DEBUG 打开,看包是否到了 IP 层。
DHCP 的包没到 UDP 层,还需要你把 IP_DEBUG 打开,看包是否到了 IP 层。
Code: Select all
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x189c
load:0x403ce000,len:0x8d4
load:0x403d0000,len:0x2dc0
entry 0x403ce000
I (30) boot: ESP-IDF v4.3.2-dirty 2nd stage bootloader
I (30) boot: compile time 17:21:58
I (30) boot: chip revision: 3
I (32) boot.esp32c3: SPI Speed : 80MHz
I (37) boot.esp32c3: SPI Mode : DIO
I (42) boot.esp32c3: 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 00009000 00004000
I (70) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (78) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (85) boot: 3 ota_0 OTA app 00 10 00010000 00180000
I (93) boot: 4 ota_1 OTA app 00 11 00190000 00180000
I (100) boot: 5 settings unknown 40 00 00310000 00001000
I (108) boot: 6 file unknown 40 00 00311000 000ef000
I (115) boot: End of partition table
I (120) esp_image: segment 0: paddr=00010020 vaddr=3c0e0020 size=2fb70h (195440) mapI (157) esp_image: segment 1: paddr=0003fb98 vaddr=3fc8fe00 size=00480h ( 1152) load
I (158) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=dd01ch (905244) mapI (299) esp_image: segment 3: paddr=0011d044 vaddr=3fc90280 size=03790h ( 14224) load
I (302) esp_image: segment 4: paddr=001207dc vaddr=40380000 size=0fc48h ( 64584) load
I (316) esp_image: segment 5: paddr=0013042c vaddr=50000000 size=00010h ( 16) load
I (322) boot: Loaded app from partition at offset 0x10000
I (322) boot: Disabling RNG early entropy source...
I (337) cpu_start: Pro cpu up.
I (349) cpu_start: Pro cpu start user code
I (349) cpu_start: cpu freq: 160000000
I (349) cpu_start: Application information:
I (352) cpu_start: Project name: blufi_demo
I (357) cpu_start: App version: 1
I (361) cpu_start: Compile time: Mar 1 2022 11:06:06
I (368) cpu_start: ELF file SHA256: 599887c811daf121...
I (374) cpu_start: ESP-IDF: v4.3.2-dirty
I (379) heap_init: Initializing. RAM available for dynamic allocation:
I (386) heap_init: At 3FC9B890 len 00024770 (145 KiB): DRAM
I (392) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (399) heap_init: At 50000010 len 00001FF0 (7 KiB): RTCRAM
I (406) spi_flash: detected chip: generic
I (410) spi_flash: flash io: dio
I (415) sleep: Configure to isolate all GPIO pins in sleep state
I (421) sleep: Enable automatic switching of GPIO sleep configuration
I (428) cpu_start: Starting scheduler.
I (437) coexist: coexist rom version 9387209
I (437) pp: pp rom version: 9387209
I (437) net80211: net80211 rom version: 9387209
I (457) wifi:wifi driver task: 3fca46b4, prio:23, stack:6656, core=0
I (457) system_api: Base MAC address is not set
I (457) system_api: read default base MAC address from EFUSE
I (467) wifi:wifi firmware version: eb52264
I (467) wifi:wifi certification version: v7.0
I (467) wifi:config NVS flash: enabled
I (477) wifi:config nano formating: disabled
I (477) wifi:Init data frame dynamic rx buffer num: 32
I (487) wifi:Init management frame dynamic rx buffer num: 32
I (487) wifi:Init management short buffer num: 32
I (497) wifi:Init dynamic tx buffer num: 32
I (497) wifi:Init static tx FG buffer num: 2
I (497) wifi:Init static rx buffer size: 1600
I (507) wifi:Init static rx buffer num: 10
I (507) wifi:Init dynamic rx buffer num: 32
I (517) wifi_init: rx ba win: 6
I (517) wifi_init: tcpip mbox: 32
I (517) wifi_init: udp mbox: 6
I (527) wifi_init: tcp mbox: 6
I (527) wifi_init: tcp tx win: 5744
I (537) wifi_init: tcp rx win: 5744
I (537) wifi_init: tcp mss: 1440
I (537) wifi_init: WiFi IRAM OP enabled
I (547) wifi_init: WiFi RX IRAM OP enabled
I (547) phy_init: phy_version 905,7b93cd2,Oct 25 2021,15:05:11
I (597) wifi:set rx active PTI: 0, rx ack PTI: 12, and default PTI: 1
I (597) wifi:mode : sta (60:55:f9:28:88:c4)
I (597) wifi:enable tsf
I (597) BLUFI_EXAMPLE: WIFI_EVENT_STA_START
W (607) BTDM_INIT: esp_bt_controller_mem_release not implemented, return OK
I (607) wifi:new:<1,1>, old:<1,0>, ap:<255,255>, sta:<1,1>, prof:1
I (617) wifi:state: init -> auth (b0)
I (617) BTDM_INIT: BT controller compile version [3e61eea]
I (627) coexist: coexist rom version 9387209
I (627) BTDM_INIT: Bluetooth MAC: 60:55:f9:28:88:c5
I (637) wifi:state: auth -> assoc (0)
I (657) BLUFI_EXAMPLE: BD ADDR: 60:55:f9:28:88:c5
I (657) BLUFI_EXAMPLE: BLUFI init finish
W (657) BT_BTM: BTM_BleWriteAdvData, Partial data write into ADV
I (667) BLUFI_EXAMPLE: BLUFI VERSION 0102
I (667) Protocol: 0x3fcb7580 fa 00 00 00 00 02 00 11 8c ff 05 00 |............|
I (677) : start tcp_client_task
I (677) WIFI: wait to get IP
I (677) : start tcp_client_recv_task
I (687) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (697) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (697) wifi:state: assoc -> run (10)
I (707) : start state_led_task
W (707) wifi:<ba-add>idx:0 (ifx:0, 58:41:20:09:d9:62), tid:5, ssn:0, winSize:64
I (717) : start get_RSSI_task
I (717) BLUFI_EXAMPLE: set rssi threshold
I (817) wifi:connected with TP-LINK_JSB_WZ, aid = 1, channel 1, 40U, bssid = 58:41:20:09:d9:62
I (817) wifi:security: WPA2-PSK, phy: bgn, rssi: -47
I (817) wifi:pm start, type: 1
I (817) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 14, mt_pti: 25000, mt_time: 10000
dhcp_start(netif=0x3fca1d70) st1
dhcp_start(): restarting DHCP configuration
dhcp_start(): starting DHCP configuration
udp_bind(ipaddr = 0.0.0.0, port = 68)
udp_bind: bound to 0.0.0.0, port 68)
I (847) wifi:BcnInt:102400, DTIM:1
udp_connect: connected to 0.0.0.0, port 67)
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 0 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9d | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 500 msecs
I (947) BLUFI_EXAMPLE: WIFI_EVENT_STA_CONNECTED
I (957) BLUFI_EXAMPLE: rssi:-46
I (957) Protocol: 0x3fcbc958 fa 00 00 00 00 02 00 11 8c e7 04 1f |............|
I (967) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 1 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9c | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 1000 msecs
dhcp_coarse_tmr()
I (1677) WIFI: wait to get IP
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 2 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9b | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 2000 msecs
dhcp_coarse_tmr()
I (2677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (3677) WIFI: wait to get IP
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 3 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9a | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 4000 msecs
dhcp_coarse_tmr()
I (4677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (5677) WIFI: wait to get IP
I (5727) BLUFI_EXAMPLE: set rssi threshold
dhcp_coarse_tmr()
I (6477) BLUFI_EXAMPLE: rssi:-43
I (6477) Protocol: 0x3fcbc958 fa 00 00 00 00 02 00 11 8c e7 04 1f |............|
I (6477) BLUFI_EXAMPLE: mac:MAC6055f92888c4
I (6677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (7677) WIFI: wait to get IP
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 4 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba99 | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 8000 msecs
dhcp_coarse_tmr()
I (8677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (9677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (10677) WIFI: wait to get IP
I (10727) BLUFI_EXAMPLE: set rssi threshold
I (10987) BLUFI_EXAMPLE: rssi:-43
I (10987) Protocol: 0x3fcbc958 fa 00 00 00 00 02 00 11 8c e7 04 1f |............|
I (10987) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_coarse_tmr()
I (11677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (12677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (13677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (14677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (15677) WIFI: wait to get IP
I (15727) BLUFI_EXAMPLE: set rssi threshold
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 5 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba98 | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 15000 msecs
dhcp_coarse_tmr()
I (16617) BLUFI_EXAMPLE: rssi:-42
I (16617) Protocol: 0x3fcbc958 fa 00 00 00 00 02 00 11 8c e7 04 1f |............|
I (16617) BLUFI_EXAMPLE: mac:MAC6055f92888c4
I (16677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (17677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (18677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (19677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (20677) WIFI: wait to get IP
I (20727) BLUFI_EXAMPLE: set rssi threshold
I (21117) BLUFI_EXAMPLE: rssi:-42
I (21117) Protocol: 0x3fcbc958 fa 00 00 00 00 02 00 11 8c e7 04 1f |
|............|
I (21127) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_coarse_tmr()
I (21677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (22677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (23677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (24677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (25677) WIFI: wait to get IP
I (25727) BLUFI_EXAMPLE: set rssi threshold
dhcp_coarse_tmr()
I (26447) BLUFI_EXAMPLE: rssi:-47
I (26447) Protocol: 0x3fcbc958 fa 00 00 00 00 02 00 11 8c e7 04 1f |
|............|
I (26447) BLUFI_EXAMPLE: mac:MAC6055f92888c4
I (26677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (27677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (28677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (29677) WIFI: wait to get IP
dhcp_coarse_tmr()
I (30677) WIFI: wait to get IP
I (30727) BLUFI_EXAMPLE: set rssi threshold
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(15c2adad)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d888
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x1cb6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 6 |000| 0 | (id, flags, offset)Code: Select all
#define IP_DEBUG LWIP_DBG_ON看起 LWIP 模块没有收到底层上来的包,不确定是不是共存导致 WIFI RX 没收到路由器的 DHCP offer。你如果把蓝牙关了,能不能获取到 IP。
Code: Select all
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x189c
load:0x403ce000,len:0x8d4
load:0x403d0000,len:0x2dc0
entry 0x403ce000
I (30) boot: ESP-IDF v4.3.2-dirty 2nd stage bootloader
I (30) boot: compile time 17:21:58
I (30) boot: chip revision: 3
I (32) boot.esp32c3: SPI Speed : 80MHz
I (37) boot.esp32c3: SPI Mode : DIO
I (42) boot.esp32c3: 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 00009000 00004000
I (70) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (78) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (85) boot: 3 ota_0 OTA app 00 10 00010000 00180000
I (93) boot: 4 ota_1 OTA app 00 11 00190000 00180000
I (100) boot: 5 settings unknown 40 00 00310000 00001000
I (108) boot: 6 file unknown 40 00 00311000 000ef000
I (115) boot: End of partition table
I (120) esp_image: segment 0: paddr=00010020 vaddr=3c0e0020 size=2e978h (190840) map
I (157) esp_image: segment 1: paddr=0003e9a0 vaddr=3fc8fa00 size=01678h ( 5752) load
I (158) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=d9120h (889120) map
I (296) esp_image: segment 3: paddr=00119148 vaddr=3fc91078 size=02508h ( 9480) load
I (298) esp_image: segment 4: paddr=0011b658 vaddr=40380000 size=0f9c4h ( 63940) load
I (313) esp_image: segment 5: paddr=0012b024 vaddr=50000000 size=00010h ( 16) load
I (318) boot: Loaded app from partition at offset 0x10000
I (318) boot: Disabling RNG early entropy source...
I (333) cpu_start: Pro cpu up.
I (346) cpu_start: Pro cpu start user code
I (346) cpu_start: cpu freq: 160000000
I (346) cpu_start: Application information:
I (349) cpu_start: Project name: blufi_demo
I (354) cpu_start: App version: 1
I (358) cpu_start: Compile time: Mar 1 2022 11:06:06
I (364) cpu_start: ELF file SHA256: dccdcc93cb891f02...
I (370) cpu_start: ESP-IDF: v4.3.2-dirty
I (376) heap_init: Initializing. RAM available for dynamic allocation:
I (383) heap_init: At 3FC9B300 len 00024D00 (147 KiB): DRAM
I (389) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (396) heap_init: At 50000010 len 00001FF0 (7 KiB): RTCRAM
I (403) spi_flash: detected chip: generic
I (407) spi_flash: flash io: dio
I (411) sleep: Configure to isolate all GPIO pins in sleep state
I (418) sleep: Enable automatic switching of GPIO sleep configuration
I (425) cpu_start: Starting scheduler.
I (434) coexist: coexist rom version 9387209
I (434) pp: pp rom version: 9387209
I (434) net80211: net80211 rom version: 9387209
I (454) wifi:wifi driver task: 3fca4124, prio:23, stack:6656, core=0
I (454) system_api: Base MAC address is not set
I (454) system_api: read default base MAC address from EFUSE
I (464) wifi:wifi firmware version: eb52264
I (464) wifi:wifi certification version: v7.0
I (464) wifi:config NVS flash: enabled
I (474) wifi:config nano formating: disabled
I (474) wifi:Init data frame dynamic rx buffer num: 32
I (484) wifi:Init management frame dynamic rx buffer num: 32
I (484) wifi:Init management short buffer num: 32
I (494) wifi:Init dynamic tx buffer num: 32
I (494) wifi:Init static tx FG buffer num: 2
I (494) wifi:Init static rx buffer size: 1600
I (504) wifi:Init static rx buffer num: 10
I (504) wifi:Init dynamic rx buffer num: 32
I (514) wifi_init: rx ba win: 6
I (514) wifi_init: tcpip mbox: 32
I (514) wifi_init: udp mbox: 6
I (524) wifi_init: tcp mbox: 6
I (524) wifi_init: tcp tx win: 5744
I (534) wifi_init: tcp rx win: 5744
I (534) wifi_init: tcp mss: 1440
I (534) wifi_init: WiFi IRAM OP enabled
I (544) wifi_init: WiFi RX IRAM OP enabled
I (544) phy_init: phy_version 905,7b93cd2,Oct 25 2021,15:05:11
I (594) wifi:set rx active PTI: 0, rx ack PTI: 12, and default PTI: 1
I (594) wifi:mode : sta (60:55:f9:28:88:c4)
I (594) wifi:enable tsf
I (594) BLUFI_EXAMPLE: WIFI_EVENT_STA_START
W (604) BTDM_INIT: esp_bt_controller_mem_release not implemented, return OK
I (604) wifi:new:<1,1>, old:<1,0>, ap:<255,255>, sta:<1,1>, prof:1
I (614) wifi:state: init -> auth (b0)
I (624) Protocol: 0x3fca9abc fa 00 00 00 00 02 00 11 8c ff 05 00 |............|
I (624) : start tcp_client_task
I (634) WIFI: wait to get IP
I (634) : start tcp_client_recv_task
I (634) wifi:state: auth -> assoc (0)
I (644) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown:
0| Intr:0
I (654) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown:
0| Intr:0
I (664) : start state_led_task
I (664) : start get_RSSI_task
I (664) BLUFI_EXAMPLE: set rssi threshold
I (694) wifi:state: assoc -> run (10)
W (704) wifi:<ba-add>idx:0 (ifx:0, 58:41:20:09:d9:62), tid:5, ssn:0, winSize:64
I (804) wifi:connected with TP-LINK_JSB_WZ, aid = 1, channel 1, 40U, bssid = 58:41:20:09:d9:62
I (804) wifi:security: WPA2-PSK, phy: bgn, rssi: -46
I (814) wifi:pm start, type: 1
I (814) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 14, mt_pti: 25000, mt_time: 10000
dhcp_start(netif=0x3fca17e0) st1
dhcp_start(): restarting DHCP configuration
dhcp_start(): starting DHCP configuration
udp_bind(ipaddr = 0.0.0.0, port = 68)
udp_bind: bound to 0.0.0.0, port 68)
udp_connect: connected to 0.0.0.0, port 67)
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(42694118)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d2f8
I (864) wifi:BcnInt:102400, DTIM:1
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x0af6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 0 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9d | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 500 msecs
I (934) BLUFI_EXAMPLE: WIFI_EVENT_STA_CONNECTED
I (944) BLUFI_EXAMPLE: rssi:-46
I (944) Protocol: 0x3fca42a8 fa 00 00 00 00 02 00 11 8c e7 04 1f |............|
I (954) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(42694118)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d2f8
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x0af6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 1 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9c | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 1000 msecs
dhcp_coarse_tmr()
I (1634) WIFI: wait to get IP
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(42694118)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d2f8
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x0af6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 2 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9b | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 2000 msecs
dhcp_coarse_tmr()
I (2634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (3634) WIFI: wait to get IP
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(42694118)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d2f8
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x0af6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 3 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba9a | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 4000 msecs
dhcp_coarse_tmr()
I (4634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (5634) WIFI: wait to get IP
I (5674) BLUFI_EXAMPLE: set rssi threshold
dhcp_coarse_tmr()
I (6504) BLUFI_EXAMPLE: rssi:-44
I (6504) Protocol: 0x3fca42a8 fa 00 00 00 00 02 00 11 8c e7 04 1f |............|
I (6504) BLUFI_EXAMPLE: mac:MAC6055f92888c4
I (6634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (7634) WIFI: wait to get IP
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(42694118)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d2f8
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x0af6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 4 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba99 | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 8000 msecs
dhcp_coarse_tmr()
I (8634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (9634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (10634) WIFI: wait to get IP
I (10674) BLUFI_EXAMPLE: set rssi threshold
I (11004) BLUFI_EXAMPLE: rssi:-43
I (11004) Protocol: 0x3fca42a8 fa 00 00 00 00 02 00 11 8c e7 04 1f
|............|
I (11004) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_coarse_tmr()
I (11634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (12634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (13634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (14634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (15634) WIFI: wait to get IP
I (15674) BLUFI_EXAMPLE: set rssi threshold
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
dhcp_discover(): dhcp state is DISCOVER
dhcp_select: could not allocate DHCP request
transaction id xid(42694118)
dhcp_discover: making request
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER)
udp_send: added header in given pbuf 0x3fc9d2f8
udp_send: sending datagram of length 316
udp_send: UDP packet length 316
udp_send: UDP checksum 0x0af6
udp_send: ip_output_if (,,,,0x11,)
ip4_output_if: st1
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 336 | (v, hl, tos, len)
+-------------------------------+
| 5 |000| 0 | (id, flags, offset)
+-------------------------------+
| 255 | 17 | 0xba98 | (ttl, proto, chksum)
+-------------------------------+
| 0 | 0 | 0 | 0 | (src)
+-------------------------------+
| 255 | 255 | 255 | 255 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 15000 msecs
dhcp_coarse_tmr()
I (16634) WIFI: wait to get IP
I (16634) BLUFI_EXAMPLE: rssi:-41
I (16634) Protocol: 0x3fca42a8 fa 00 00 00 00 02 00 11 8c e7 04 1f
|............|
I (16644) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_coarse_tmr()
I (17634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (18634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (19634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (20634) WIFI: wait to get IP
I (20674) BLUFI_EXAMPLE: set rssi threshold
I (21144) BLUFI_EXAMPLE: rssi:-36
I (21144) Protocol: 0x3fca42a8 fa 00 00 00 00 02 00 11 8c e7 04 1f
|............|
I (21144) BLUFI_EXAMPLE: mac:MAC6055f92888c4
dhcp_coarse_tmr()
I (21634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (22634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (23634) WIFI: wait to get IP
dhcp_coarse_tmr()
I (24634) WIFI: wait to get IP下载了ESP32-C3-MINI-1-V2.3.0.0的固件,也是获取不到IP看起 LWIP 模块没有收到底层上来的包,不确定是不是共存导致 WIFI RX 没收到路由器的 DHCP offer。你如果把蓝牙关了,能不能获取到 IP。
尝试了这3个模块,下载了examples/wifi/getting_started/station例程都不能获取到IP。 还有比较奇怪的是,能抓到手机的discover和request,抓不到模块的使用 IDF wifi station 示例(examples/wifi/getting_started/station)也拿不到 IP?是只有这个路由器拿不到 IP 还是都拿不到 IP?换个模组能否拿到 IP?
只要esp32c3连这个路由器都很难获取到IP,手机电脑都有很多连这个wifi正常使用。使用 IDF wifi station 示例(examples/wifi/getting_started/station)也拿不到 IP?是只有这个路由器拿不到 IP 还是都拿不到 IP?换个模组能否拿到 IP?