esp-idf: [MESH][v4.4] Node unable to connect to ROOT or AP on low ROOT RSSI (IDFGH-11397)

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hello @zhangyanjiaoesp . This is a strange sidecase we found in our systems.

v4.4.6-103-g5daf5610b9

Setup

  • One hotspot
  • One device with WIFI and LTE (for now LTE not necessary). This device has a esp_wifi_set_max_tx_power set to 2dB (8)
  • One device with esp_wifi_set_max_tx_power set to 14dB

I currently have the hotspot put next to the device with 14dB. The device with 2dB is put at 8 meters from the phone and the other device.

Powering:

  • Enable hotspot
  • Enable device with 2dB
  • Wait for 2dB device to connect to the hotspot. My device sees -63dB
network {
  mesh_layer: 1
  mesh_p_rssi: -63
  mesh_p_mac: 542
  modem_state: MODEM_ON_AT_READY
  modem_rssi: -200
}
  • Switch on device 14dB next to the hotspot (60cm away)

What i see:

  • The device starts looping between
W (573814) wifi:Haven't to connect to a suitable AP now!
I (574219) wifi:I (01:09:33.462) mesh_main: <MESH_EVENT_NO_PARENT_FOUND>scan times:60
mode : sta (7c:df:a1:e0:74:40)
W (01:09:33.464) mesh_hand: Perform NO PARENT FIXED ROOT handover 1 1
W (01:09:33.470) mesh_hand: Triggering FIXED ROOT handover
I (574234) wifi:mode : sta (7c:df:a1:e0:74:40) + softAP (7c:df:a1:e0:74:41)
W (574240) wifi:<MESH AP>adjust channel:11, secondary channel offset:2(40D)
I (574249) wifi:Total power save buffer number: 8
I (01:10:08.979) mesh_main: <MESH_EVENT_SCAN_DONE>number:26
W (01:10:08.981) mesh_hand: Triggering DYNAMIC MESH handover
W (609743) wifi:scan number is 0
W (01:10:08.988) mesh_hand: scan_done: found 0, fixed_root 0, has_parent 0
W (01:10:08.992) mesh_main: <MESH_EVENT_ROOT_FIXED>not fixed
W (01:10:08.998) mesh_hand: Triggering DYNAMIC MESH handover
I (623842) wifi:mode : sta (7c:df:a1:e0:74:40)
I (01:10:23.086) mesh_main: <MESH_EVENT_NO_PARENT_FOUND>scan times:60
I (01:10:27.300) mesh_main: <MESH_EVENT_FIND_NETWORK>new channel:11, router BSSID:000000000000

without ever connecting

no_connection.txt

Any help? Thanks

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

also, i understand the device had -90dB to the Router, but it had only -78dB to the ROOT.

According to your logs, the rssi from the device to the ROOT is -84:

image

And this rssi value is volatile, thus the scan sometimes can find root and sometimes can’t:

image

image

When the device is doing parent selection, and the parent is root, it will compare the scanned parent’s rssi with the select_rssi and backoff_rssi, and decide whether to do rssi backoff.

image

Since the rssi from the device to the ROOT is about -85, suggest you can call esp_mesh_set_switch_parent_paras() API to set the select_rssi and backoff_rssi to -85 or lower.