Connect to strongest signal

I have a router and a wireless range extender, which are set up with the same SSID. I would like wireless connections to be made automatically to the AP with the stronger signal. How to do this? (I know how to make separate profiles with nmcli, and select the AP manually, but how to do it automatically?)

To my best knowledge that is what wpa_supplicant does by default so nothing needs to be configured.

Not for me! (Assuming linssid is a reliable way to find out which signal is stronger). I’m not completely sure, but I think my system prefers to connect to the AP that was most recently used.

A similar question…

I haven’t examined the code but here’s one interpretation offered…

                                           Thanks! Based off of your answer, I was able to find the source code that actually does the prioritization.  [github.com/digsrc/wpa_supplicant/blob/…](https://github.com/digsrc/wpa_supplicant/blob/515eb37dd1df3f4a05fc2a31c265db6358301988/wpa_supplicant/scan.c#L1658)                                 – [Viertaxa](https://askubuntu.com/users/1070406/viertaxa)                 
             [Jun 26, 2021 at 18:07](https://askubuntu.com/questions/1348220/how-does-networkmanager-choose-which-wifi-network-to-connect-to-when-muliple-are#comment2304723_1348319)                                                      
                                                    Based off of that, it seems  to be priority > config order > prefer WAP2 > prefer privacy  > Prefer better signal level > prefer max rate > prefer signal  band.                                 – [Viertaxa](https://askubuntu.com/users/1070406/viertaxa)                 
             [Jun 26, 2021 at 18:09](https://askubuntu.com/questions/1348220/how-does-networkmanager-choose-which-wifi-network-to-connect-to-when-muliple-are#comment2304724_1348319)