Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh-lite 根节点关机,有概率无法重建Mesh-Lite网络,怎么解决 (AEGHB-642) #84

Open
cuijunling00 opened this issue May 7, 2024 · 3 comments

Comments

@cuijunling00
Copy link

各位尊敬的作者,我在使用Mesh-Lite功能是遇到了一些问题,希望大家能帮我解决。具体问题如下:
我是使用mesh_local_control为模板创建的工程,并且使用TCP协议和上位机连接,主要功能是Mesh-Lite的重建网络功能。
我在测试Mesh-Lite网络丢失根节点后的重建网络的能力。发现会有很大的概率无法重建网络,或者是部分模块无法加入到重新建立的网络中。 具体的日志都停止在检测网段冲突的位置。下面是我的日志
个别模块重启后无法加入网络的日志:
I (1201) wifi:wifi driver task: 3fcc094c, prio:23, stack:6656, core=0
I (1211) wifi:wifi firmware version: 91b9630
I (1211) wifi:wifi certification version: v7.0
I (1211) wifi:config NVS flash: enabled
I (1211) wifi:config nano formating: disabled
I (1221) wifi:Init data frame dynamic rx buffer num: 32
I (1221) wifi:Init static rx mgmt buffer num: 5
I (1231) wifi:Init management short buffer num: 32
I (1231) wifi:Init dynamic tx buffer num: 32
I (1241) wifi:Init static tx FG buffer num: 2
I (1241) wifi:Init static rx buffer size: 1600
I (1241) wifi:Init static rx buffer num: 10
I (1251) wifi:Init dynamic rx buffer num: 32
I (1251) wifi_init: rx ba win: 6
I (1261) wifi_init: tcpip mbox: 32
I (1261) wifi_init: udp mbox: 6
I (1261) wifi_init: tcp mbox: 6
I (1271) wifi_init: tcp tx win: 5744
I (1271) wifi_init: tcp rx win: 5744
I (1281) wifi_init: tcp mss: 1440
I (1281) wifi_init: WiFi IRAM OP enabled
I (1291) wifi_init: WiFi RX IRAM OP enabled
I (1291) phy_init: phy_version 620,ec7ec30,Sep 5 2023,13:49:13
I (1341) wifi:mode : null
I (1341) wifi:mode : softAP (f4:12:fa:8a:50:31)
I (1341) wifi:Total power save buffer number: 16
I (1341) wifi:Init max length of beacon: 752/752
I (1341) wifi:Init max length of beacon: 752/752
I (1351) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (1351) bridge_common: [WIFI_AP_DEF ]
I (1361) bridge_common: Set ip info:192.168.4.1
W (1361) bridge_common: SoftAP IP network segment has changed, deauth all station
Add netif ap with (commit id)
I (1371) bridge_common: netif list add success
I (1381) wifi:Disabled PMF config for SoftAP
I (1381) wifi:Total power save buffer number: 16
Add netif sta with (commit id)
I (1391) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (1401) bridge_common: [WIFI_AP_DEF ]Name Server1: 114.114.114.114
I (1411) bridge_common: netif list add success
I (1411) wifi:mode : sta (f4:12:fa:8a:50:30) + softAP (f4:12:fa:8a:50:31)
I (1421) wifi:enable tsf
I (1421) bridge_wifi: Found ssid TPLOGIN001
I (1421) bridge_wifi: Found password kwhz1234
E (1431) NVS: Failed to read IP info from NVS
I (1441) wifi:Disabled PMF config for STA
I (1441) bridge_wifi: [esp_bridge_wifi_set_config] sta ssid: KWHZ_Line password: kwhz1234
I (1451) bridge_wifi: [esp_bridge_wifi_set_config] softap ssid: ESP_Bridge password: 12345678
W (1451) wifi:Haven't to connect to a suitable AP now!
I (1951) wifi:Total power save buffer number: 16
I (1961) Mesh-Lite: esp-mesh-lite component version: 0.10.2
W (1961) wifi:Haven't to connect to a suitable AP now!
I (1961) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (1971) bridge_common: [WIFI_AP_DEF ]Name Server1: 114.114.114.114
I (1971) ESPNOW: espnow [version: 1.0] init
I (1981) [vendor_ie]: Mesh-Lite commit id: 6bca946

I (1981) [vendor_ie]: Mesh ID: 77
I (1991) [ESP_Mesh_Lite_Comm]: msg action add success
I (1991) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (2001) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (2011) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (2011) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
I (2021) [ESP_Mesh_Lite_Comm]: msg action add success
I (2021) [mesh-lite-espnow]: Start espnow task
I (2031) [ESP_Mesh_Lite_Comm]: msg action add success
I (2041) Mesh-Lite: Mesh-Lite connecting
I (2041) [vendor_ie]: esp_mesh_lite_wifi_scan_start return ESP_OK
W (2081) wifi:Haven't to connect to a suitable AP now!
W (2201) wifi:Haven't to connect to a suitable AP now!
W (2321) wifi:Haven't to connect to a suitable AP now!
W (2441) wifi:Haven't to connect to a suitable AP now!
W (2561) wifi:Haven't to connect to a suitable AP now!
W (2681) wifi:Haven't to connect to a suitable AP now!
W (2801) wifi:Haven't to connect to a suitable AP now!
W (2921) wifi:Haven't to connect to a suitable AP now!
W (3041) wifi:Haven't to connect to a suitable AP now!
W (3161) wifi:Haven't to connect to a suitable AP now!
W (3281) wifi:Haven't to connect to a suitable AP now!
W (3401) wifi:Haven't to connect to a suitable AP now!
W (3521) wifi:Haven't to connect to a suitable AP now!
W (3641) wifi:Haven't to connect to a suitable AP now!
W (3761) wifi:Haven't to connect to a suitable AP now!
W (3881) wifi:Haven't to connect to a suitable AP now!
W (4001) wifi:Haven't to connect to a suitable AP now!
W (4121) wifi:Haven't to connect to a suitable AP now!
W (4241) wifi:Haven't to connect to a suitable AP now!
W (4361) wifi:Haven't to connect to a suitable AP now!
W (4481) wifi:Haven't to connect to a suitable AP now!
W (4601) wifi:Haven't to connect to a suitable AP now!
W (4721) wifi:Haven't to connect to a suitable AP now!
W (4841) wifi:Haven't to connect to a suitable AP now!
I (4881) [vendor_ie]: Mesh-Lite Scan done
I (4881) [vendor_ie]: Find ESP_Bridge
I (4881) [vendor_ie]: bssid: f4:12:fa:8a:50:11, level: 2
I (4881) [vendor_ie]: RTC store: ssid:ESP_Bridge; bssid:f4:12:fa:8a:50:11 crc:790998296
I (4891) [vendor_ie]: wifi_cfg ESP_Bridge router_config KWHZ_Line
I (4901) [vendor_ie]: esp_mesh_lite_wifi_connect return ESP_OK
W (4901) WIFI_EVENT: star
W (4911) WIFI_EVENT: end

W (4961) wifi:Haven't to connect to a suitable AP now!
W (5081) wifi:Haven't to connect to a suitable AP now!
W (5201) wifi:Haven't to connect to a suitable AP now!
W (5321) wifi:Haven't to connect to a suitable AP now!
W (5441) wifi:Haven't to connect to a suitable AP now!
W (5561) wifi:Haven't to connect to a suitable AP now!
I (5661) wifi:ap channel adjust o:1,1 n:6,2
I (5661) wifi:new:<6,2>, old:<1,1>, ap:<6,2>, sta:<6,2>, prof:1
I (6141) wifi:state: init -> auth (b0)
I (6151) wifi:state: auth -> assoc (0)
I (6161) wifi:Association refused temporarily, comeback time 1500 (TUs)
I (7701) wifi:state: assoc -> assoc (0)
I (7711) wifi:state: assoc -> run (10)
I (7721) wifi:connected with ESP_Bridge, aid = 2, channel 6, 40D, bssid = f4:12:fa:8a:50:11
I (7731) wifi:security: WPA2-PSK, phy: bgn, rssi: -20
I (7731) wifi:pm start, type: 1

I (7731) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
W (7741) WIFI_EVENT: star
W (7741) WIFI_EVENT: WIFI_EVENT_STA_CONNECTED
W (7751) WIFI_EVENT: end

I (7741) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (7761) Mesh-Lite: netif network segment conflict check
W (7761) ESP_MESH_LITE_EVENT: star
W (7771) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (7771) ESP_MESH_LITE_EVENT:
W (7781) ESP_MESH_LITE_EVENT: end
I (8261) wifi:idx:0 (ifx:0, f4:12:fa:8a:50:11), tid:0, ssn:0, winSize:64

##########################################################
新的根节点无法建立网络的日志:
###########################################################
I (358991) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
W (359001) WIFI_EVENT: star
W (359001) WIFI_EVENT: WIFI_EVENT_STA_CONNECTED
W (359011) WIFI_EVENT: end

I (359061) wifi:AP's beacon interval = 102400 us, DTIM period = 2
I (359061) Mesh-Lite: netif network segment conflict check
I (359071) bridge_common: [WIFI_AP_DEF ]
I (359071) bridge_common: IP Address:192.168.4.1
I (359071) bridge_common: GW Address:192.168.4.1
I (359081) bridge_common: NM Address:255.255.255.0
I (359091) bridge_common: ip reallocate new:192.168.4.1
I (359091) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (359101) ESP_MESH_LITE_EVENT: star
W (359101) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (359111) ESP_MESH_LITE_EVENT:
W (359121) ESP_MESH_LITE_EVENT: end
I (359161) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 2, bss_flags is 134243, bss:0x3fcd9150
I (359161) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (359161) wifi:idx:3, tid:0
E (359171) bridge_wifi: STA Disconnect to the AP
I (359171) wifi:station: f4:12:fa:8a:50:40 leave, AID = 1, bss_flags is 658531, bss:0x3fcc7130
I (359181) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (359181) wifi:idx:2, tid:0
W (359191) WIFI_EVENT: star
W (359191) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (359201) WIFI_EVENT: end

E (359201) bridge_wifi: STA Disconnect to the AP
W (359211) WIFI_EVENT: star
W (359211) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (359211) WIFI_EVENT: end

I (359221) Mesh-Lite: netif network segment conflict check
W (359221) ESP_MESH_LITE_EVENT: star
W (359231) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (359241) ESP_MESH_LITE_EVENT:
W (359241) ESP_MESH_LITE_EVENT: end
I (359271) Mesh-Lite: netif network segment conflict check
W (359271) ESP_MESH_LITE_EVENT: star
W (359271) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (359281) ESP_MESH_LITE_EVENT:
W (359281) ESP_MESH_LITE_EVENT: end
I (360001) esp_netif_handlers: sta ip: 192.168.5.2, mask: 255.255.255.0, gw: 192.168.5.1
I (360001) bridge_wifi: Connected with IP Address:192.168.5.2
I (360001) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (360011) [vendor_ie]: RTC store: ssid:ESP_Bridge; bssid:f4:12:fa:8a:4f:f5 crc:1820785304
W (360021) IP_EVENT: star
W (360021) IP_EVENT: IP_EVENT_STA_GOT_IP
W (360021) IP_EVENT: end
I (360391) Mesh-Lite: netif network segment conflict check
W (360391) ESP_MESH_LITE_EVENT: star
W (360391) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (360401) ESP_MESH_LITE_EVENT:
W (360411) ESP_MESH_LITE_EVENT: end
I (361971) wifi:idx:0 (ifx:0, f4:12:fa:8a:4f:f5), tid:0, ssn:0, winSize:64
I (362621) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (362631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (362641) bridge_wifi: STA Connecting to the AP again...
W (362641) WIFI_EVENT: star
W (362641) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (362651) WIFI_EVENT: end

I (362681) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.2
W (362691) IP_EVENT: star
W (362691) IP_EVENT: end
I (362851) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 134243, bss:0x3fcd9150
I (362851) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (362861) wifi:mode : sta (f4:12:fa:8a:50:10)
E (362861) bridge_wifi: STA Disconnect to the AP
W (362871) WIFI_EVENT: star
W (362871) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (362881) WIFI_EVENT: end

W (362881) WIFI_EVENT: star
W (362881) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (362891) WIFI_EVENT: end

I (363781) Mesh-Lite: netif network segment conflict check
I (363781) bridge_common: [WIFI_AP_DEF ]
I (363781) bridge_common: IP Address:192.168.6.1
I (363781) bridge_common: GW Address:192.168.6.1
I (363791) bridge_common: NM Address:255.255.255.0
I (363791) bridge_common: ip reallocate new:192.168.6.1
I (363801) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (363811) ESP_MESH_LITE_EVENT: star
W (363811) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (363821) ESP_MESH_LITE_EVENT:
W (363821) ESP_MESH_LITE_EVENT: end
I (371451) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (371461) wifi:Total power save buffer number: 16
I (371461) Mesh-Lite: netif network segment conflict check
W (371461) ESP_MESH_LITE_EVENT: star
W (371471) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (371471) ESP_MESH_LITE_EVENT:
W (371481) ESP_MESH_LITE_EVENT: end
I (371481) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.6.1
I (371491) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (371501) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (371511) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (371511) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (371521) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (371521) WIFI_EVENT: star
W (371531) WIFI_EVENT: WIFI_EVENT_AP_START
W (371531) WIFI_EVENT: end

I (372621) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (372631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (372651) bridge_wifi: STA Connecting to the AP again...
W (372651) WIFI_EVENT: star
W (372651) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (372651) WIFI_EVENT: end

I (372671) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.6.2
W (372671) IP_EVENT: star
W (372671) IP_EVENT: end
I (372891) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 134259, bss:0x3fcd959c
I (372891) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (372891) wifi:mode : sta (f4:12:fa:8a:50:10)
E (372901) bridge_wifi: STA Disconnect to the AP
W (372901) WIFI_EVENT: star
W (372911) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (372911) WIFI_EVENT: end

W (372911) WIFI_EVENT: star
W (372921) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (372921) WIFI_EVENT: end

I (373711) Mesh-Lite: netif network segment conflict check
I (373711) bridge_common: [WIFI_AP_DEF ]
I (373711) bridge_common: IP Address:192.168.4.1
I (373721) bridge_common: GW Address:192.168.4.1
I (373721) bridge_common: NM Address:255.255.255.0
I (373731) bridge_common: ip reallocate new:192.168.4.1
I (373741) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (373741) ESP_MESH_LITE_EVENT: star
W (373751) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (373761) ESP_MESH_LITE_EVENT:
W (373761) ESP_MESH_LITE_EVENT: end
I (381391) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (381391) wifi:Total power save buffer number: 16
I (381391) Mesh-Lite: netif network segment conflict check
W (381391) ESP_MESH_LITE_EVENT: star
W (381401) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (381411) ESP_MESH_LITE_EVENT:
W (381411) ESP_MESH_LITE_EVENT: end
I (381411) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (381421) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (381431) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (381441) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (381441) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (381451) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (381451) WIFI_EVENT: star
W (381461) WIFI_EVENT: WIFI_EVENT_AP_START
W (381461) WIFI_EVENT: end

I (382631) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (382631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (382651) bridge_wifi: STA Connecting to the AP again...
W (382651) WIFI_EVENT: star
W (382651) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (382661) WIFI_EVENT: end

I (382681) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.3
W (382681) IP_EVENT: star
W (382681) IP_EVENT: end
I (382921) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 134259, bss:0x3fcd959c
I (382921) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (382931) wifi:mode : sta (f4:12:fa:8a:50:10)
E (382931) bridge_wifi: STA Disconnect to the AP
W (382941) WIFI_EVENT: star
W (382941) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (382941) WIFI_EVENT: end

W (382951) WIFI_EVENT: star
W (382951) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (382961) WIFI_EVENT: end

I (383751) Mesh-Lite: netif network segment conflict check
I (383751) bridge_common: [WIFI_AP_DEF ]
I (383751) bridge_common: IP Address:192.168.6.1
I (383761) bridge_common: GW Address:192.168.6.1
I (383761) bridge_common: NM Address:255.255.255.0
I (383771) bridge_common: ip reallocate new:192.168.6.1
I (383781) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (383781) ESP_MESH_LITE_EVENT: star
W (383791) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (383801) ESP_MESH_LITE_EVENT:
W (383801) ESP_MESH_LITE_EVENT: end
I (391421) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (391421) wifi:Total power save buffer number: 16
I (391421) Mesh-Lite: netif network segment conflict check
W (391431) ESP_MESH_LITE_EVENT: star
W (391431) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (391441) ESP_MESH_LITE_EVENT:
W (391441) ESP_MESH_LITE_EVENT: end
I (391451) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.6.1
I (391461) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (391461) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (391471) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (391481) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (391481) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (391491) WIFI_EVENT: star
W (391491) WIFI_EVENT: WIFI_EVENT_AP_START
W (391501) WIFI_EVENT: end

I (392631) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (392631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (392651) bridge_wifi: STA Connecting to the AP again...
W (392651) WIFI_EVENT: star
W (392651) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (392651) WIFI_EVENT: end

I (392681) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.6.3
W (392691) IP_EVENT: star
W (392691) IP_EVENT: end
I (392961) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 134259, bss:0x3fcd959c
I (392961) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (392961) wifi:mode : sta (f4:12:fa:8a:50:10)
E (392971) bridge_wifi: STA Disconnect to the AP
W (392971) WIFI_EVENT: star
W (392971) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (392981) WIFI_EVENT: end

W (392981) WIFI_EVENT: star
W (392991) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (392991) WIFI_EVENT: end

I (393781) Mesh-Lite: netif network segment conflict check
I (393781) bridge_common: [WIFI_AP_DEF ]
I (393781) bridge_common: IP Address:192.168.4.1
I (393791) bridge_common: GW Address:192.168.4.1
I (393791) bridge_common: NM Address:255.255.255.0
I (393801) bridge_common: ip reallocate new:192.168.4.1
I (393801) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (393811) ESP_MESH_LITE_EVENT: star
W (393811) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (393821) ESP_MESH_LITE_EVENT:
W (393831) ESP_MESH_LITE_EVENT: end
I (401461) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (401461) wifi:Total power save buffer number: 16
I (401461) Mesh-Lite: netif network segment conflict check
W (401461) ESP_MESH_LITE_EVENT: star
W (401471) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (401481) ESP_MESH_LITE_EVENT:
W (401481) ESP_MESH_LITE_EVENT: end
I (401491) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (401491) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (401501) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (401511) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (401511) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (401521) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (401531) WIFI_EVENT: star
W (401531) WIFI_EVENT: WIFI_EVENT_AP_START
W (401531) WIFI_EVENT: end

I (402621) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (402631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (402651) bridge_wifi: STA Connecting to the AP again...
W (402651) WIFI_EVENT: star
W (402651) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (402651) WIFI_EVENT: end

I (402681) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.3
W (402681) IP_EVENT: star
W (402681) IP_EVENT: end
I (402891) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 134259, bss:0x3fcd959c
I (402891) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (402891) wifi:mode : sta (f4:12:fa:8a:50:10)
E (402901) bridge_wifi: STA Disconnect to the AP
W (402901) WIFI_EVENT: star
W (402911) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (402911) WIFI_EVENT: end

W (402921) WIFI_EVENT: star
W (402921) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (402921) WIFI_EVENT: end

I (403721) Mesh-Lite: netif network segment conflict check
I (403721) bridge_common: [WIFI_AP_DEF ]
I (403731) bridge_common: IP Address:192.168.6.1
I (403731) bridge_common: GW Address:192.168.6.1
I (403731) bridge_common: NM Address:255.255.255.0
I (403741) bridge_common: ip reallocate new:192.168.6.1
I (403751) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (403751) ESP_MESH_LITE_EVENT: star
W (403761) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (403771) ESP_MESH_LITE_EVENT:
W (403771) ESP_MESH_LITE_EVENT: end
I (411391) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (411391) wifi:Total power save buffer number: 16
I (411391) Mesh-Lite: netif network segment conflict check
W (411401) ESP_MESH_LITE_EVENT: star
W (411401) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (411411) ESP_MESH_LITE_EVENT:
W (411411) ESP_MESH_LITE_EVENT: end
I (411421) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.6.1
I (411431) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (411431) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (411441) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (411451) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (411451) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (411461) WIFI_EVENT: star
W (411461) WIFI_EVENT: WIFI_EVENT_AP_START
W (411471) WIFI_EVENT: end

I (412631) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (412631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (412671) bridge_wifi: STA Connecting to the AP again...
W (412671) WIFI_EVENT: star
W (412671) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (412671) WIFI_EVENT: end

I (412701) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.6.2
W (412701) IP_EVENT: star
W (412701) IP_EVENT: end
I (412921) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 134259, bss:0x3fcd959c
I (412931) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (412931) wifi:mode : sta (f4:12:fa:8a:50:10)
E (412931) bridge_wifi: STA Disconnect to the AP
W (412941) WIFI_EVENT: star
W (412941) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (412951) WIFI_EVENT: end

W (412951) WIFI_EVENT: star
W (412951) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (412961) WIFI_EVENT: end

I (413751) Mesh-Lite: netif network segment conflict check
I (413751) bridge_common: [WIFI_AP_DEF ]
I (413751) bridge_common: IP Address:192.168.4.1
I (413751) bridge_common: GW Address:192.168.4.1
I (413761) bridge_common: NM Address:255.255.255.0
I (413761) bridge_common: ip reallocate new:192.168.4.1
I (413771) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (413781) ESP_MESH_LITE_EVENT: star
W (413781) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (413791) ESP_MESH_LITE_EVENT:
W (413801) ESP_MESH_LITE_EVENT: end
I (421421) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (421431) wifi:Total power save buffer number: 16
I (421431) Mesh-Lite: netif network segment conflict check
W (421431) ESP_MESH_LITE_EVENT: star
W (421441) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (421441) ESP_MESH_LITE_EVENT:
W (421451) ESP_MESH_LITE_EVENT: end
I (421451) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.4.1
I (421461) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (421471) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (421471) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (421481) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (421491) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (421491) WIFI_EVENT: star
W (421501) WIFI_EVENT: WIFI_EVENT_AP_START
W (421501) WIFI_EVENT: end

I (422621) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (422631) wifi:station: f4:12:fa:8a:4f:f4 join, AID=1, bgn, 40D
I (422651) bridge_wifi: STA Connecting to the AP again...
W (422651) WIFI_EVENT: star
W (422651) WIFI_EVENT: WIFI_EVENT_AP_STACONNECTED
W (422651) WIFI_EVENT: end

I (422691) esp_netif_lwip: DHCP server assigned IP to a client, IP is: 192.168.4.2
W (422691) IP_EVENT: star
W (422691) IP_EVENT: end
I (422961) wifi:station: f4:12:fa:8a:4f:f4 leave, AID = 1, bss_flags is 658547, bss:0x3fcd959c
I (422961) wifi:new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:1
I (422971) wifi:mode : sta (f4:12:fa:8a:50:10)
E (422971) bridge_wifi: STA Disconnect to the AP
W (422981) WIFI_EVENT: star
W (422981) WIFI_EVENT: WIFI_EVENT_AP_STADISCONNECTED
W (422981) WIFI_EVENT: end

W (422991) WIFI_EVENT: star
W (422991) WIFI_EVENT: WIFI_EVENT_AP_STOP
W (423001) WIFI_EVENT: end

I (423791) Mesh-Lite: netif network segment conflict check
I (423791) bridge_common: [WIFI_AP_DEF ]
I (423791) bridge_common: IP Address:192.168.6.1
I (423801) bridge_common: GW Address:192.168.6.1
I (423801) bridge_common: NM Address:255.255.255.0
I (423811) bridge_common: ip reallocate new:192.168.6.1
I (423821) bridge_wifi: SoftAP IP network segment has changed, deauth all station
W (423821) ESP_MESH_LITE_EVENT: star
W (423831) ESP_MESH_LITE_EVENT: ESP_MESH_LITE_EVENT_CORE_INHERITED_NET_SEGMENT_CHANGED
W (423841) ESP_MESH_LITE_EVENT:
W (423841) ESP_MESH_LITE_EVENT: end
I (428141) wifi:starting SA query procedure with AP(f4:12:fa:8a:4f:f5)
I (428141) wifi:Send SA Query req with transaction id 9c8a
I (428341) wifi:Send SA Query req with transaction id 9c8b
I (428541) wifi:Send SA Query req with transaction id 9c8c
I (428741) wifi:Send SA Query req with transaction id 9c8d
I (428941) wifi:Send SA Query req with transaction id 9c8e
I (429141) wifi:Send SA Query req with transaction id 9c8f
I (429171) wifi:No response to 6 SA Queries, reset connection sending disassoc
I (429171) wifi:state: run -> init (d100)
I (429171) wifi:pm stop, total sleep time: 0 us / 70177141 us

I (429171) wifi:idx:0, tid:0
I (429171) wifi:new:<6,0>, old:<6,2>, ap:<255,255>, sta:<6,2>, prof:1
I (429191) wifi:mode : sta (f4:12:fa:8a:50:10) + softAP (f4:12:fa:8a:50:11)
I (429191) wifi:Total power save buffer number: 16
W (429191) wifi:Haven't to connect to a suitable AP now!
W (429201) WIFI_EVENT: star
W (429201) WIFI_EVENT: WIFI_EVENT_STA_DISCONNECTED
W (429211) WIFI_EVENT: end

I (429211) esp_netif_lwip: DHCP server started on interface WIFI_AP_DEF with IP: 192.168.6.1
I (429221) bridge_common: [WIFI_AP_DEF ]Name Server1: 192.168.1.1
I (429231) [ESP_Mesh_Lite_Comm]: Bind Socket 54, port 6364
I (429231) [ESP_Mesh_Lite_Comm]: Bind Socket 55, port 6363
I (429241) [ESP_Mesh_Lite_Comm]: Bind Socket 56, port 6366
I (429241) [ESP_Mesh_Lite_Comm]: Bind Socket 57, port 6365
W (429251) WIFI_EVENT: star
W (429251) WIFI_EVENT: WIFI_EVENT_AP_START
W (429261) WIFI_EVENT: end

W (429271) wifi:Haven't to connect to a suitable AP now!
W (429321) wifi:Haven't to connect to a suitable AP now!
W (429441) wifi:Haven't to connect to a suitable AP now!
希望大神给我一个解决方案。
这个重建网络的稳定性对我很重要。 再次感谢各位

@github-actions github-actions bot changed the title Mesh-lite 根节点关机,有概率无法重建Mesh-Lite网络,怎么解决 Mesh-lite 根节点关机,有概率无法重建Mesh-Lite网络,怎么解决 (AEGHB-642) May 7, 2024
@tswen
Copy link
Contributor

tswen commented May 9, 2024

可以将 mesh_lite 更新到最新,然后重新编译,让 mesh lite 拉取最新的 iot_bridge 组件(0.11.4),使用最新的试一下。新的 iot-bridge 组件修复了获取不到 IP 的问题。

另外需要在 idf/components/lwip/apps/dhcpserver/dhcpserver.c 里面加如下一行代码
image

@guo652917087
Copy link

guo652917087 commented Jul 3, 2024

可以将 mesh_lite 更新到最新,然后重新编译,让 mesh lite 拉取最新的 iot_bridge 组件(0.11.4),使用最新的试一下。新的 iot-bridge 组件修复了获取不到 IP 的问题。

另外需要在 idf/components/lwip/apps/dhcpserver/dhcpserver.c 里面加如下一行代码 image
@tswen

最新版本【esp-idf
[ esp-mesh-lite](80adbff)

根节点断电也会出现不能组网。

我用例子“no_router”,三个模块测试。根节点断电前,两个模块分别在level2和level3.手动断电根节点,会出现level2会连接到level3的AP,level3连接到level2的AP。level2和level3两个模块会反复循环互相连接。根节点上电后也不能恢复组网。重启level3的节点无法修复网络,只有重启level2,等待几分钟才三个模块重新恢复mesh网络。日志方面就不贴了,已经告诉了测试复现的方法。希望对维护团队有帮助。

@tswen
Copy link
Contributor

tswen commented Jul 9, 2024

diff --git a/examples/no_router/main/no_router.c b/examples/no_router/main/no_router.c
index 2fbf53c..8da76d2 100644
--- a/examples/no_router/main/no_router.c
+++ b/examples/no_router/main/no_router.c
@@ -128,6 +128,7 @@ void app_main()
     esp_mesh_lite_set_allowed_level(1);
 #else
     ESP_LOGI(TAG, "Child node");
+    esp_mesh_lite_set_disallowed_level(1);
 #endif
 
     esp_mesh_lite_start();

按照如上 patch 进行修改可以修复子节点相互连接的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants