esp32 wfi mesh (using examples/mesh/ip_internal_commuinication),device2(child ) cannot get ip from device1(parent)

aiya122
Posts: 15
Joined: Sun Jun 19, 2022 8:37 am

esp32 wfi mesh (using examples/mesh/ip_internal_commuinication),device2(child ) cannot get ip from device1(parent)

Postby aiya122 » Fri Sep 16, 2022 2:00 am

test process:
1, Power on the No. 1 esp32 and then work normally to obtain the IP assigned by the routing and print the routing table
2. Power on esp32 No. 2 and then No. 1 shows a uknow id (as shown in the figure) and then the routing table shows that No. 2 has joined in
3, but after the No. 2 esp32 is powered on, it cannot obtain the IP assigned by the No. 1 parent node, and it keeps prompting


I feel that there is no problem with the MAC link layer. It should be a problem with NAT. No. 2 has no way to obtain the DHCP of No. 1.

No. 1 esp32 work normally then esp32 No. 2 joing ,No1 log :

Code: Select all

[0;32mI (438502) mesh_main: Received Routing table [0] f4:12:fa:43:59:1c[0m
[0;32mI (438762) mesh_mqtt: MQTT_EVENT_PUBLISHED, msg_id=13132[0m
[0;32mI (440512) mesh_main: Tried to publish layer:1 IP:192.168.137.29[0m
[0;32mI (440512) mesh_mqtt: sent publish returned msg_id=12336[0m
[0;32mI (440512) mesh_main: Sending routing table to [0] f4:12:fa:43:59:1c: sent with err code: 0[0m
[0;32mI (440512) mesh_main: Received Routing table [0] f4:12:fa:43:59:1c[0m
[0;32mI (440772) mesh_mqtt: MQTT_EVENT_PUBLISHED, msg_id=12336[0m
I (442092) wifi:new:<11,2>, old:<11,0>, ap:<11,2>, sta:<11,0>, prof:1
I (442092) wifi:station: f4:12:fa:cd:26:60 join, AID=1, bgn, 40D
[0;32mI (442102) mesh_main: unknown id:25[0m
[0;33mW (442122) mesh_main: <MESH_EVENT_ROUTING_TABLE_ADD>add 1, new:2[0m
I (442132) mesh: <nvs>write assoc:1
[0;32mI (442132) mesh_main: <MESH_EVENT_CHILD_CONNECTED>aid:1, f4:12:fa:cd:26:60[0m
[0;32mI (442522) mesh_main: Tried to publish layer:1 IP:192.168.137.29[0m
[0;32mI (442522) mesh_mqtt: sent publish returned msg_id=7443[0m
[0;32mI (442522) mesh_main: Sending routing table to [0] f4:12:fa:43:59:1c: sent with err code: 0[0m
[0;32mI (442522) mesh_main: Received Routing table [0] f4:12:fa:43:59:1c[0m
[0;32mI (442532) mesh_main: Sending routing table to [1] f4:12:fa:cd:26:60: sent with err code: 0[0m
[0;32mI (442542) mesh_main: Received Routing table [1] f4:12:fa:cd:26:60[0m
[0;32mI (442772) mesh_mqtt: MQTT_EVENT_PUBLISHED, msg_id=7443[0m
[0;32mI (444542) mesh_main: Tried to publish layer:1 IP:192.168.137.29[0mSSa
no2 log when power on :

Code: Select all

[09:34:06.152]收←◆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:0x3fce3810,len:0x164c
load:0x403c9700,len:0xbe0
load:0x403cc700,len:0x2d34
entry 0x403c9904
[0;32mI (25) boot: ESP-IDF v5.0-dev-3654-gc2ccc383da-dirty 2nd stage bootloader[0m
[0;32mI (25) boot: compile time 09:20:17[0m
[0;32mI (25) boot: chip revision: 0[0m
[0;32mI (29) boot.esp32s3: Boot SPI Speed : 80MHz[0m
[0;32mI (33) boot.esp32s3: SPI Mode       : DIO[0m
[0;32mI (38) boot.esp32s3: SPI Flash Size : 2MB[0m
[0;32mI (43) boot: Enabling RNG early entropy source...[0m
[0;32mI (48) boot: Partition Table:[0m
[0;32mI (52) boot: ## Label            Usage          Type ST Offset   Length[0m
[0;32mI (59) boot:  0 nvs              WiFi data        01 02 00009000 00006000[0m
[0;32mI (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000[0m
[0;32mI (74) boot:  2 factory          factory app      00 00 00010000 00124f80[0m
[0;32mI (82) boot: End of partition table[0m
[0;32mI (86) esp_image: segment 0: paddr=00010020 vaddr=3c0c0020 size=2d6d8h (186072) map[0m
[0;32mI (128) esp_image: segment 1: paddr=0003d700 vaddr=3fc95700 size=02918h ( 10520) load[0m
[0;32mI (130) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=b3b8ch (736140) map[0m

[09:34:06.415]收←◆[0;32mI (265) esp_image: segment 3: paddr=000f3bb4 vaddr=3fc98018 size=01d50h (  7504) load[0m
[0;32mI (267) esp_image: segment 4: paddr=000f590c vaddr=40374000 size=116fch ( 71420) load[0m
[0;32mI (287) esp_image: segment 5: paddr=00107010 vaddr=50000000 size=00010h (    16) load[0m
[0;32mI (295) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (295) boot: Disabling RNG early entropy source...[0m
[0;32mI (307) cpu_start: Pro cpu up.[0m
[0;32mI (307) cpu_start: Starting app cpu, entry point is 0x4037532c[0m
[0;32mI (0) cpu_start: App cpu up.[0m
[0;32mI (321) cpu_start: Pro cpu start user code[0m
[0;32mI (321) cpu_start: cpu freq: 160000000 Hz[0m
[0;32mI (321) cpu_start: Application information:[0m
[0;32mI (324) cpu_start: Project name:     ip_internal_network[0m
[0;32mI (330) cpu_start: App version:      1[0m
[0;32mI (335) cpu_start: Compile time:     Sep 16 2022 09:20:10[0m
[0;32mI (341) cpu_start: ELF file SHA256:  a0fb961559de2520...[0m
[0;32mI (347) cpu_start: ESP-IDF:          v5.0-dev-3654-gc2ccc383da-dirty[0m
[0;32mI (354) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (361) heap_init: At 3FC9F470 len 00040B90 (258 KiB): D/IRAM[0m
[0;32mI (367) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM[0m
[0;32mI (374) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM[0m
[0;32mI (380) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM[0m
[0;32mI (387) spi_flash: detected chip: gd[0m
[0;32mI (391) spi_flash: flash io: dio[0m
[0;33mW (395) spi_flash: Detected size(16384k) larger than the size in the binary image header(2048k). Using the size in the binary image header.[0m
[0;32mI (408) sleep: Configure to isolate all GPIO pins in sleep state[0m
[0;32mI (415) sleep: Enable automatic switching of GPIO sleep configuration[0m
[0;32mI (422) cpu_start: Starting scheduler on PRO CPU.[0m
[0;32mI (0) cpu_start: Starting scheduler on APP CPU.[0m
[0;32mI (502) pp: pp rom version: e7ae62f[0m
[0;32mI (502) net80211: net80211 rom version: e7ae62f[0m
I (512) wifi:wifi driver task: 3fce5b08, prio:23, stack:6656, core=0
[0;32mI (512) system_api: Base MAC address is not set[0m
[0;32mI (512) system_api: read default base MAC address from EFUSE[0m
I (532) wifi:wifi firmware version: 3aa4137
I (532) wifi:wifi certification version: v7.0
I (532) wifi:config NVS flash: enabled
I (532) wifi:config nano formating: disabled
I (532) wifi:Init data frame dynamic rx buffer num: 32
I (542) wifi:Init management frame dynamic rx buffer num: 32
I (542) wifi:Init management short buffer num: 32
I (552) wifi:Init dynamic tx buffer num: 32
I (552) wifi:Init static tx FG buffer num: 2
I (562) wifi:Init static rx buffer size: 1600
I (562) wifi:Init static rx buffer num: 10
I (562) wifi:Init dynamic rx buffer num: 32
[0;32mI (572) wifi_init: rx ba win: 6[0m
[0;32mI (572) wifi_init: tcpip mbox: 32[0m
[0;32mI (582) wifi_init: udp mbox: 6[0m
[0;32mI (582) wifi_init: tcp mbox: 6[0m
[0;32mI (582) wifi_init: tcp tx win: 5744[0m
[0;32mI (592) wifi_init: tcp rx win: 5744[0m
[0;32mI (592) wifi_init: tcp mss: 624[0m
[0;32mI (602) wifi_init: WiFi IRAM OP enabled[0m
[0;32mI (602) wifi_init: WiFi RX IRAM OP enabled[0m
I (602) wifi:Set ps type: 0

[0;32mI (612) phy_init: phy_version 503,13653eb,Jun  1 2022,17:47:08[0m
I (662) wifi:mode : sta (f4:12:fa:cd:26:60) + softAP (f4:12:fa:cd:26:61)
I (662) wifi:enable tsf
I (662) wifi:Total power save buffer number: 16
I (662) wifi:Init max length of beacon: 752/752
I (662) wifi:Init max length of beacon: 752/752
I (682) mesh: <nvs>read layer:1
I (682) mesh: <nvs>read assoc:0
I (692) wifi:Total power save buffer number: 16

[09:34:07.802]收←◆I (1682) wifi:mode : sta (f4:12:fa:cd:26:60)
I (1702) mesh: <MESH_NWK_LOOK_FOR_NETWORK>need_scan:0x3, need_scan_router:0x0, look_for_nwk_count:1
[0;32mI (1702) mesh_main: <MESH_EVENT_MESH_STARTED>ID:77:77:77:77:77:76[0m
[0;32mI (1702) mesh_main: mesh starts successfully, heap:252212, root not fixed
[0m

[09:34:12.021]收←◆I (5902) mesh: [S16]m1, 66:79:f0:03:84:69, channel:11, rssi:-45
I (5902) mesh: find router:[ssid_len:2]m1, rssi:-45, 66:79:f0:03:84:69(encrypted), new channel:11, old channel:0
I (5912) mesh: find root:ESPM_43591C, root_cap:1(max:300), new channel:11, old channel:0
I (5922) mesh: [FIND][ch:0]AP:18, otherID:0, MAP:1, idle:0, candidate:0, root:1[66:79:f0:03:84:69]router found
I (5932) mesh: [FIND:1]find a network, channel:11, cfg<channel:0, router:m1, 00:00:00:00:00:00>

I (5942) wifi:mode : sta (f4:12:fa:cd:26:60) + softAP (f4:12:fa:cd:26:61)
W (5942) wifi:<MESH AP>adjust channel:1, secondary channel offset:1(40U)
I (5952) wifi:Total power save buffer number: 16
[0;32mI (5942) mesh_main: <MESH_EVENT_FIND_NETWORK>new channel:11, router BSSID:00:00:00:00:00:00[0m
W (5962) wifi:<MESH AP>adjust channel:11, secondary channel offset:2(40D)
I (5972) wifi:Total power save buffer number: 16

[09:34:12.391]收←◆I (6272) mesh: [SCAN][ch:11]AP:5, other(ID:0, RD:0), MAP:1, idle:0, candidate:1, root:1, topMAP:0[c:1,i:0][66:79:f0:03:84:69]router found<>
I (6282) mesh: 7369[selection]try rssi_threshold:-78, backoff times:0, max:5<-78,-82,-85>
I (6302) mesh: <nvs>write layer:0
I (6302) mesh: [DONE]connect to parent:ESPM_43591C, channel:11, rssi:-26, f4:12:fa:43:59:1d[layer:1, assoc:0], my_vote_num:0/voter_num:0, rc[00:00:00:00:00:00/-120/0]
I (6302) mesh: set router bssid:66:79:f0:03:84:69

[09:34:12.517]收←◆I (6402) wifi:new:<11,2>, old:<11,2>, ap:<11,2>, sta:<11,2>, prof:11

[09:34:13.557]收←◆I (7442) wifi:state: init -> auth (b0)
I (7452) wifi:state: auth -> assoc (0)
I (7462) wifi:state: assoc -> run (10)
I (7472) mesh: <MESH_NWK_MIE_CHANGE><><><><ROOT ADDR><><><>
I (7472) mesh: <MESH_NWK_ROOT_ADDR>from assoc, layer:2, root_addr:f4:12:fa:43:59:1d, root_cap:1
I (7472) mesh: <MESH_NWK_ROOT_ADDR>idle, layer:2, root_addr:f4:12:fa:43:59:1d, conflict_roots.num:0<>
I (7482) wifi:connected with ESPM_43591C, aid = 1, channel 11, 40D, bssid = f4:12:fa:43:59:1d
I (7492) wifi:security: WPA2-PSK, phy: bgn, rssi: -27
[0;32mI (7482) mesh_main: <MESH_EVENT_ROOT_ADDRESS>root address:f4:12:fa:43:59:1d[0m
I (7502) wifi:pm start, type: 0

I (7502) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 0, mt_pti: 25000, mt_time: 10000
I (7512) mesh: [scan]new scanning time:600ms, beacon interval:300ms
I (7532) mesh: 2004<arm>parent monitor, my layer:2(cap:6)(node), interval:6402ms, retries:1<normal connected>
[0;32mI (7532) mesh_main: <MESH_EVENT_PARENT_CONNECTED>layer:0-->2, parent:f4:12:fa:43:59:1d<layer2>, ID:77:77:77:77:77:76[0m
[0;32mI (7542) mesh_netif: It was a wifi station removing stuff[0m
[0;32mI (7552) mesh_main: <MESH_EVENT_TODS_REACHABLE>state:0[0m

[09:34:13.744]收←◆I (7632) wifi:BcnInt:307200, DTIM:1

[09:34:14.011]收←◆[0;31mE (7892) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:16.028]收←◆[0;31mE (9912) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:18.061]收←◆[0;31mE (11942) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:20.077]收←◆[0;31mE (13962) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:20.201]收←◆I (14082) mesh: 5156<active>parent layer:1(node), channel:11, rssi:-26, assoc:0(cnx rssi threshold:-120)my_assoc:0

[09:34:21.703]收←◆I (15592) mesh: 5947<scan>parent layer:1, rssi:-28, assoc:1(cnx rssi threshold:-120)
I (15592) mesh: [SCAN][ch:11]AP:1, other(ID:0, RD:0), MAP:1, idle:0, candidate:1, root:1, topMAP:0[c:2,i:2][66:79:f0:03:84:69]<weak>
I (15592) mesh: 7369[weak]try rssi_threshold:-120, backoff times:0, max:5<-78,-82,-85>
I (15602) mesh: 716[monitor]no change, parent:f4:12:fa:43:59:1d, rssi:-28
I (15612) mesh: 2004<arm>parent monitor, my layer:2(cap:6)(node), interval:8747ms, retries:2<>

[09:34:22.110]收←◆[0;31mE (15992) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:24.127]收←◆[0;31mE (18012) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:26.161]收←◆[0;31mE (20042) mesh_main: Error in receiving raw mesh data: Unexpected size[0m

[09:34:28.184]收←◆[0;31mE (22072) mesh_main: Error in receiving raw mesh data: Unexpected size[0m


Who is online

Users browsing this forum: Baidu [Spider], dzungpv, ok-home and 101 guests