Add support for the "priority=" field in wpa_supplicant.conf
Posted: Wed May 05, 2021 12:28 pm
The pi-star web interface presently does not support the wpa_supplicant.conf "priority" field, and it really should.
Many users configure both their mobile phone, and their home wifi router, as wifi access points, in the wpa_supplicant file. A few of us (such as myself) have even more entries than that.
The problem comes when multiple configured access points are within range. According to the man page for the wpa_supplicant.conf file, when multiple configured access points are available at the same time and are equally weighted in the context of the file, factors other than simply the order in which they appear in the file (such as signal strength and security characteristics) will determine which one the hotspot latches on to, making any advanced "knowing" of where you'll end up connected, a crap-shoot.
Additionally, it is difficult to manually add the "priority=" field to a stanza in the web GUI's "expert - wifi" text editor, as a "TAB" key does not insert a tab character, it merely moves the browser's "focus" out of the text entry area of the page, and down to the "Apply changes" button at the bottom of the screen. This leaves either an SSH client (such as PuTTY), or the "ShellInABox" SSH client, as the only means of directly editing the file (both of which require you to remount the rootfs as RW before you can actually edit the file manually, and then remounting it RO again (or rebooting.)
It would be far better, easier, safer, and less error prone, for the GUI to add support for the "priority=" field in each wpa_supplicant.conf stanza. Connecting to one of multiple configured and available networks should not be a crap-shoot based on characteristics outside of the user's control. If I'm in a place where multiple such networks are present, configured, and available, I want to *know* where my unit will connect. Not leave it to chance or other factors I can't control.
Many users configure both their mobile phone, and their home wifi router, as wifi access points, in the wpa_supplicant file. A few of us (such as myself) have even more entries than that.
The problem comes when multiple configured access points are within range. According to the man page for the wpa_supplicant.conf file, when multiple configured access points are available at the same time and are equally weighted in the context of the file, factors other than simply the order in which they appear in the file (such as signal strength and security characteristics) will determine which one the hotspot latches on to, making any advanced "knowing" of where you'll end up connected, a crap-shoot.
Additionally, it is difficult to manually add the "priority=" field to a stanza in the web GUI's "expert - wifi" text editor, as a "TAB" key does not insert a tab character, it merely moves the browser's "focus" out of the text entry area of the page, and down to the "Apply changes" button at the bottom of the screen. This leaves either an SSH client (such as PuTTY), or the "ShellInABox" SSH client, as the only means of directly editing the file (both of which require you to remount the rootfs as RW before you can actually edit the file manually, and then remounting it RO again (or rebooting.)
It would be far better, easier, safer, and less error prone, for the GUI to add support for the "priority=" field in each wpa_supplicant.conf stanza. Connecting to one of multiple configured and available networks should not be a crap-shoot based on characteristics outside of the user's control. If I'm in a place where multiple such networks are present, configured, and available, I want to *know* where my unit will connect. Not leave it to chance or other factors I can't control.