WiFi Mesh MESH_NODES swithcing to closer Parents if low RSSI
Posted: Wed Aug 27, 2025 4:40 pm
I am using ESP IDF ver 5.5.0 and WiFi Mesh network.
My network is self forming with some node having a weak RSSI to their parent, and I want to lower this.
IDF API provides 2 function for controlling thresholds but little by way of description on how to use them.
I used to read the default RSSI thresholds and received the following thresholds:
threshold.high = -78;
threshold.medium = -82;
threshold.low = -85;
So I lowered them using to:
threshold.high = -70;
threshold.medium = -75;
threshold.low = -80;
And similarly I used to read the default params and got:
params.duration_ms = 60000; // Parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms, device will search for a new parent
params.cnx_rssi = -120; // RSSI threshold for keeping a good connection with parent.
params.select_rssi = -78; // RSSI threshold for parent selection. It should be a value greater than switch_rssi
params.switch_rssi = -78; // Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold
params.backoff_rssi = -78; // RSSI threshold for connecting to the root
So I lowered them using to:
params.duration_ms = 60000; // Parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms, device will search for a new parent
params.cnx_rssi = -80; // RSSI threshold for keeping a good connection with parent.
params.select_rssi = -70; // RSSI threshold for parent selection. It should be a value greater than switch_rssi
params.switch_rssi = -70; // Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold
params.backoff_rssi = -68; // RSSI threshold for connecting to the root
But some of my MESH_NODEs are still holding parent connections at -89dBm and are not switching to closer parent nodes.
The documents say thing like "select_rssi is the RSSI threshold for parent selection. It should be a value greater than switch_rssi", but the default parameter I read they are the same threshold.
I would like them to switch to closer parents if the RSSI is worse than -70dBm.
I cant understand from the description the difference between params.cnx_rssi, params.select_rssi and params.switch_rssi and I don't know how to set them to achieve my goal.
My network is self forming with some node having a weak RSSI to their parent, and I want to lower this.
IDF API provides 2 function for controlling thresholds but little by way of description on how to use them.
I used
Code: Select all
esp_mesh_get_rssi_threshold(&threshold)threshold.high = -78;
threshold.medium = -82;
threshold.low = -85;
So I lowered them using
Code: Select all
esp_mesh_set_rssi_threshold(&threshold)threshold.high = -70;
threshold.medium = -75;
threshold.low = -80;
And similarly I used
Code: Select all
esp_mesh_get_switch_parent_paras(¶ms)params.duration_ms = 60000; // Parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms, device will search for a new parent
params.cnx_rssi = -120; // RSSI threshold for keeping a good connection with parent.
params.select_rssi = -78; // RSSI threshold for parent selection. It should be a value greater than switch_rssi
params.switch_rssi = -78; // Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold
params.backoff_rssi = -78; // RSSI threshold for connecting to the root
So I lowered them using
Code: Select all
esp_mesh_set_switch_parent_paras(¶ms)params.duration_ms = 60000; // Parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms, device will search for a new parent
params.cnx_rssi = -80; // RSSI threshold for keeping a good connection with parent.
params.select_rssi = -70; // RSSI threshold for parent selection. It should be a value greater than switch_rssi
params.switch_rssi = -70; // Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold
params.backoff_rssi = -68; // RSSI threshold for connecting to the root
But some of my MESH_NODEs are still holding parent connections at -89dBm and are not switching to closer parent nodes.
The documents say thing like "select_rssi is the RSSI threshold for parent selection. It should be a value greater than switch_rssi", but the default parameter I read they are the same threshold.
I would like them to switch to closer parents if the RSSI is worse than -70dBm.
I cant understand from the description the difference between params.cnx_rssi, params.select_rssi and params.switch_rssi and I don't know how to set them to achieve my goal.