Mesh-wifi: change parent if RSSI is lower than threshold

Die_32_
Posts: 58
Joined: Wed May 05, 2021 2:42 pm

Mesh-wifi: change parent if RSSI is lower than threshold

Postby Die_32_ » Wed Jun 23, 2021 12:20 pm

Hi all,
I'm working with several ESP32 connected in a wifi mesh.
Now I have 5 nodes ( N1,N2,N3,N4,N5) connected in this way:

Root(N1)
|
L2 ( N2,N3,N4 )
|
L3 ( N5)

Regarding position and distance:
I thought that N3, N4 will be connected to N5.
I found that is it possible to set variables in order to tell nodes to change the parent if RSSI is greater or lower than a reference.
Here is the link: https://github.com/espressif/esp-idf/bl ... internal.h

I think I have to set:

Code: Select all

typedef struct {
    int duration_ms;   /* parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms,
                          device will search for a new parent. */
    int cnx_rssi;      /* RSSI threshold for keeping a good connection with parent.
                          If set a value greater than -120 dBm, a timer will be armed to monitor parent RSSI at a period time of duration_ms. */
    int select_rssi;   /* RSSI threshold for parent selection. It should be a value greater than switch_rssi. */
    int switch_rssi;   /* Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold. */
    int backoff_rssi;  /* RSSI threshold for connecting to the root */
} mesh_switch_parent_t;
select_rssi and switch_rssi, correct ?

Do I also have to set:

Code: Select all

typedef struct {
    int high;
    int medium;
    int low;
} mesh_rssi_threshold_t;
How are this variables related?

Hope my question is clear enough

Thanks
Attachments
Cattura.PNG
Cattura.PNG (58.74 KiB) Viewed 2374 times

Die_32_
Posts: 58
Joined: Wed May 05, 2021 2:42 pm

Re: Mesh-wifi: change parent if RSSI is lower than threshold

Postby Die_32_ » Thu Jun 24, 2021 6:38 am

Anyone has some hints ?

Die_32_
Posts: 58
Joined: Wed May 05, 2021 2:42 pm

Re: Mesh-wifi: change parent if RSSI is lower than threshold

Postby Die_32_ » Fri Jul 16, 2021 2:42 pm

Hi all, does anybody has experience with this ?

Who is online

Users browsing this forum: snehapawar# and 90 guests