• wpa_supplicant and strongest BSSID

    From William Unruh@2:250/1 to All on Thu Jun 23 02:39:32 2022

    wpa_supplicant has a bad bug. If there are many BSSID for a single SSID, wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey
    wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal (Yes, I know what the strongest is may fluctuate, but it is
    better to grab a signal that is now strong, rather than grab a very weak
    BSSID)
    The BSSID is the hadware address of a given wifi access point, while the
    SSID is the name of the network that that access point is supposed to
    connect to. Thus at a University there may be many BSSID all of which
    connect to the eduroam network. Or in a Hotel, there may be many access
    points all of which have the same name "Hilton Bombay" but being from
    different floors of the hotel, will vary widely in strength.
    wpa_supplicant just grabs the first one it sees, which could be from 3
    floors away with a signal strength of "one bar" and completelydisappears
    when someone on the intermediate floors takes a bath (the water
    reflecting the signal). This is instead of using the signal from the AP
    just outside the door of your room on your floor.

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Herman Viaene@2:250/1 to All on Thu Jun 23 09:29:32 2022
    Op Thu, 23 Jun 2022 01:39:32 +0000, schreef William Unruh:

    wpa_supplicant has a bad bug. If there are many BSSID for a single SSID, wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal (Yes, I know what the strongest is may fluctuate, but it is
    better to grab a signal that is now strong, rather than grab a very weak BSSID)
    The BSSID is the hadware address of a given wifi access point, while the
    SSID is the name of the network that that access point is supposed to
    connect to. Thus at a University there may be many BSSID all of which
    connect to the eduroam network. Or in a Hotel, there may be many access points all of which have the same name "Hilton Bombay" but being from different floors of the hotel, will vary widely in strength.
    wpa_supplicant just grabs the first one it sees, which could be from 3
    floors away with a signal strength of "one bar" and completelydisappears
    when someone on the intermediate floors takes a bath (the water
    reflecting the signal). This is instead of using the signal from the AP
    just outside the door of your room on your floor.

    Any particular reason why you prefer the command i.s.o. using MCC -
    Network Center???

    Herman Viaene

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 23 11:06:43 2022

    On 2022-06-23, Herman Viaene <herman@invalid.invalid> wrote:
    Op Thu, 23 Jun 2022 01:39:32 +0000, schreef William Unruh:

    wpa_supplicant has a bad bug. If there are many BSSID for a single SSID,
    wpa_supplicant will simply grab the first BSSID it sees to connect to.
    ....

    Any particular reason why you prefer the command i.s.o. using MCC -
    Network Center???


    I do use Network Center. It uses wpa_supplicant to do the actual
    connection. And wpa_supplicant behaves badly. You can see that in the
    Network Center window. The SSIDs are listed in order of signal strength.
    If you have many BSSIDs for one SSID name, you will have many entries
    for that name in the list. Click on the highest one, and hit connect.
    Once it has connected it will highlight the one that was connected to
    (ie the BSSID that was actually used). It is often/usually NOT the top (strongest) It may well be the 5th or 7th one down the list (scroll down
    the on list in the Network Center window list until you see the
    highlighted one). That has a much weaker signal than the connected one.

    For example I have 11 "eduroam" Access points listed in Network center
    (Each a separate BSSID Access point).
    I clicked on the top one (signal strenght 100) and clicked on Connect.
    It connected to the 7th one down-- signal strength 47%.
    Sometimes it does connect to the strongest, but rarely if there are a
    lot of them.

    Looking at wpa_supplicant debug output (edit /etc/sysconfig/network-script/ifup-eth
    and put a "-dd -t -f /var/log/wpa_supplicant" into the main wpa_supplicant
    call [the command starts with
    /usr/sbin/wpa_supplicant -B -i ${DEVICE} \
    ]

    you can see wpa_supplicant going through the the various access points
    it has found, but not in any particular order and certainly not in order
    of signal strength. It seems to simply go in the random order of which
    access points it has seen first.

    And yes, this is using NetworkCenter (which uses the proograms in /etc/sysconfig/network-script)





    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu Jun 23 11:23:16 2022
    On Thu, 23 Jun 2022 01:39:32 -0000 (UTC), William Unruh wrote:

    wpa_supplicant has a bad bug.

    Hope you opened a bug report so that the app maintainer knows about it,
    not Mageia.

    If there are many BSSID for a single SSID,
    wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal

    All I can suggest is a wrapper you create to dump desired BSSID and strength, sort, chose, create a configuration file, then launch the connection.

    for example you can run, as root,
    wpa_cli -i wlp2s0 scan_results | sort -n --key=4 --key=2 | cat -n > aa

    You can then read aa and build a button string to use with xmessage to
    provide a selection to pick from. Example:
    # cat aa
    1 f4:69:42:f2:52:0f 2412 -79 [WPA2-PSK-CCMP][ESS] SpectrumSetup-11
    2 40:b0:34:de:47:1e 2437 -73 [WPA2-PSK-CCMP][WPS][ESS] DIRECT-1D-HP OfficeJet 4650
    3 40:b8:9a:da:b2:1e 2462 -71 [WPA2-PSK-CCMP][WPS][ESS] Ulisses-2G
    4 e8:d2:ff:bc:17:e6 2412 -69 [WPA2-PSK-CCMP][ESS] SpectrumSetup-E0
    5 c8:b4:22:61:06:79 2437 -65 [WPA2-PSK-CCMP][ESS] Houseofpain
    6 80:cc:9c:ba:9d:0c 2452 -65 [WPA2-PSK-CCMP][WPS][ESS] NETGEAR04
    7 bssid / frequency / signal level / flags / ssid

    # xmessage -buttons 1,2,3,4,5,6,7 -file aa

    You can use a case statement to parse $? to see/get user selection.
    Ir user clicks button 5 $? will have 105

    That tells the wrapper to use line 5 to build a configuration file and
    launch the connection.





    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Thu Jun 23 13:51:42 2022
    On 2022-06-23, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 23 Jun 2022 01:39:32 -0000 (UTC), William Unruh wrote:

    wpa_supplicant has a bad bug.

    Hope you opened a bug report so that the app maintainer knows about it,
    not Mageia.

    If there are many BSSID for a single SSID,
    wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey
    wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal

    All I can suggest is a wrapper you create to dump desired BSSID and strength, sort, chose, create a configuration file, then launch the connection.

    I like Network Center. I tried Network Manager but both found it clunky
    and not working sometimes and found that when things went wrong it was
    really hard to figure out why.


    for example you can run, as root,
    wpa_cli -i wlp2s0 scan_results | sort -n --key=4 --key=2 | cat -n > aa

    You can then read aa and build a button string to use with xmessage to provide a selection to pick from. Example:
    # cat aa
    1 f4:69:42:f2:52:0f 2412 -79 [WPA2-PSK-CCMP][ESS] SpectrumSetup-11
    2 40:b0:34:de:47:1e 2437 -73 [WPA2-PSK-CCMP][WPS][ESS] DIRECT-1D-HP OfficeJet 4650
    3 40:b8:9a:da:b2:1e 2462 -71 [WPA2-PSK-CCMP][WPS][ESS] Ulisses-2G
    4 e8:d2:ff:bc:17:e6 2412 -69 [WPA2-PSK-CCMP][ESS] SpectrumSetup-E0
    5 c8:b4:22:61:06:79 2437 -65 [WPA2-PSK-CCMP][ESS] Houseofpain
    6 80:cc:9c:ba:9d:0c 2452 -65 [WPA2-PSK-CCMP][WPS][ESS] NETGEAR04
    7 bssid / frequency / signal level / flags / ssid

    # xmessage -buttons 1,2,3,4,5,6,7 -file aa

    You can use a case statement to parse $? to see/get user selection.
    Ir user clicks button 5 $? will have 105

    That tells the wrapper to use line 5 to build a configuration file and
    launch the connection.


    Another bug is that Network Center does not use wpa_cli as user, since
    it onlyworks for root, and iwlist has the really really annoying but
    that if there are too may access points(BSSID) then it reports nothing.
    So, either Network center needs to be set up to be suid root (probably
    not safe at the moment and I have not tried to see if that works) or it
    needs to run wpa_cli always and if there are 1000 access points either
    list them or pick the 50 strongest ones and report tthem in
    networkcenter.

    At present Network center simply does nothing if there are too many
    BSSIDs.

    The problem also is that if you hand wpa_supplicant an name (SSID) it
    will go through that "pick a random one" process (ie a raondom BSSID
    that has the right name).
    One can tell wpa_supplicant to pick one BSSID to assocate with the SSID,
    but what happens if for some reason that one does not work.
    wpa_supplicant then blacklists it, and I have no idea what happens if
    the blacklisted one is the selected one.

    I really do not want to have to rewrite NetworkCenter on my own. That is
    what distributions are for, so one competent person can do the work that
    A million incompetent ones can use.








    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu Jun 23 18:54:45 2022
    On Thu, 23 Jun 2022 04:29:32 -0400, Herman Viaene <herman@invalid.invalid> wrote:

    Op Thu, 23 Jun 2022 01:39:32 +0000, schreef William Unruh:

    wpa_supplicant has a bad bug. If there are many BSSID for a single SSID,
    wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey
    wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal (Yes, I know what the strongest is may fluctuate, but it is
    better to grab a signal that is now strong, rather than grab a very weak
    BSSID)
    The BSSID is the hadware address of a given wifi access point, while the
    SSID is the name of the network that that access point is supposed to
    connect to. Thus at a University there may be many BSSID all of which
    connect to the eduroam network. Or in a Hotel, there may be many access
    points all of which have the same name "Hilton Bombay" but being from
    different floors of the hotel, will vary widely in strength.
    wpa_supplicant just grabs the first one it sees, which could be from 3
    floors away with a signal strength of "one bar" and completelydisappears
    when someone on the intermediate floors takes a bath (the water
    reflecting the signal). This is instead of using the signal from the AP
    just outside the door of your room on your floor.

    Any particular reason why you prefer the command i.s.o. using MCC -
    Network Center???

    The command is used by drakxnet. The bug has been reported https://bugs.mageia.org/show_bug.cgi?id=23453
    but after almost 4 years, no change.

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From TJ@2:250/1 to All on Fri Jun 24 01:04:45 2022
    On 6/23/22 08:51, William Unruh wrote:
    On 2022-06-23, Bit Twister <BitTwister@mouse-potato.com> wrote:
    On Thu, 23 Jun 2022 01:39:32 -0000 (UTC), William Unruh wrote:

    wpa_supplicant has a bad bug.

    Hope you opened a bug report so that the app maintainer knows about it,
    not Mageia.

    If there are many BSSID for a single SSID,
    wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey >>> wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal

    All I can suggest is a wrapper you create to dump desired BSSID and strength,
    sort, chose, create a configuration file, then launch the connection.

    I like Network Center. I tried Network Manager but both found it clunky
    and not working sometimes and found that when things went wrong it was
    really hard to figure out why.

    I had the same sort of problem with the Network Center, only on a MUCH
    smaller scale. I have a dual-band router, and if I had both band SSIDs configured, it would connect to the first one on the list, regardless of
    which band I TOLD it to use. I switched to Network Manager where there
    were dual-band adapters on the machine, and it was much better for my
    setup.

    But, That's me. YMMV. What I did find later on our repos was a package
    called "wpa_supplicant-gui." I used it to set the connection priortity
    for each band, and then I connected to the one I wanted to use.

    Of course, that wouldn't work well for a laptop that was used in a
    university library, then used again in a lab across campus. You'd have
    to change the priority levels every time you moved. And I have no idea
    how well it might work for several BSSIDs. But, it might be less
    annoying than what you're dealing with now.

    TJ

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Fri Jun 24 07:06:54 2022
    On 2022-06-23, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Thu, 23 Jun 2022 04:29:32 -0400, Herman Viaene <herman@invalid.invalid> wrote:

    Op Thu, 23 Jun 2022 01:39:32 +0000, schreef William Unruh:

    wpa_supplicant has a bad bug. If there are many BSSID for a single SSID, >>> wpa_supplicant will simply grab the first BSSID it sees to connect to.
    This can often (usualy) be a disaster, as it will grab a weak signal,
    rather than the strongest signal, meaning lots of disconnections, flakey >>> wifi, etc. Does anyone know of a way to get it to grab the strongest
    signal (Yes, I know what the strongest is may fluctuate, but it is
    better to grab a signal that is now strong, rather than grab a very weak >>> BSSID)
    The BSSID is the hadware address of a given wifi access point, while the >>> SSID is the name of the network that that access point is supposed to
    connect to. Thus at a University there may be many BSSID all of which
    connect to the eduroam network. Or in a Hotel, there may be many access
    points all of which have the same name "Hilton Bombay" but being from
    different floors of the hotel, will vary widely in strength.
    wpa_supplicant just grabs the first one it sees, which could be from 3
    floors away with a signal strength of "one bar" and completelydisappears >>> when someone on the intermediate floors takes a bath (the water
    reflecting the signal). This is instead of using the signal from the AP
    just outside the door of your room on your floor.

    Any particular reason why you prefer the command i.s.o. using MCC -
    Network Center???

    The command is used by drakxnet. The bug has been reported https://bugs.mageia.org/show_bug.cgi?id=23453
    but after almost 4 years, no change.

    Yes. Unfortunately the person who wrote the NetworkCenter suite skipped
    town about 3 years ago, and noone else has stepped in. It is such a
    crucial part of laptops that it would be really great if someone
    stepped in. I would have but I do not know Perl. And my coding skills
    have never been the greatest (Inability to imagine all of the ways the
    code could break is one problem I have, which is a key aspect of coding competence).

    Also wpa_supplicant is run by an upstream which is hard to find the bug reporting for.

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Herman Viaene@2:250/1 to All on Fri Jun 24 14:34:29 2022
    Op Thu, 23 Jun 2022 20:04:45 -0400, schreef TJ:
    ....snip....
    I had the same sort of problem with the Network Center, only on a MUCH smaller scale. I have a dual-band router, and if I had both band SSIDs configured, it would connect to the first one on the list, regardless of which band I TOLD it to use. I switched to Network Manager where there
    were dual-band adapters on the machine, and it was much better for my
    setup.

    I got around the dual band setup by giving each band a separate ESSID. My Fritzbox router allows that, I don't know for other routers.

    Herman Viaene



    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)
  • From TJ@2:250/1 to All on Fri Jun 24 15:59:57 2022
    On 6/24/22 09:34, Herman Viaene wrote:
    Op Thu, 23 Jun 2022 20:04:45 -0400, schreef TJ:
    ...snip....
    I had the same sort of problem with the Network Center, only on a MUCH
    smaller scale. I have a dual-band router, and if I had both band SSIDs
    configured, it would connect to the first one on the list, regardless of
    which band I TOLD it to use. I switched to Network Manager where there
    were dual-band adapters on the machine, and it was much better for my
    setup.

    I got around the dual band setup by giving each band a separate ESSID. My Fritzbox router allows that, I don't know for other routers.

    Herman Viaene


    My Linksys does, too. Mine did have different, if similar, SSIDs. But,
    no matter what, if the assigned priorities were the same the Network
    Center connected to the first one on the wpa_supplicant list that's
    available.

    TJ

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Sat Jun 25 06:38:30 2022
    On 2022-06-24, TJ <TJ@noneofyour.business> wrote:
    On 6/24/22 09:34, Herman Viaene wrote:
    Op Thu, 23 Jun 2022 20:04:45 -0400, schreef TJ:
    ...snip....
    I had the same sort of problem with the Network Center, only on a MUCH
    smaller scale. I have a dual-band router, and if I had both band SSIDs
    configured, it would connect to the first one on the list, regardless of >>> which band I TOLD it to use. I switched to Network Manager where there
    were dual-band adapters on the machine, and it was much better for my
    setup.

    I got around the dual band setup by giving each band a separate ESSID. My
    Fritzbox router allows that, I don't know for other routers.

    Herman Viaene


    My Linksys does, too. Mine did have different, if similar, SSIDs. But,
    no matter what, if the assigned priorities were the same the Network
    Center connected to the first one on the wpa_supplicant list that's available.

    Yes that's another problem with wpa_supplicant. It seems to go through
    the wpa_supplicant.conf list and grab entries at random. I set up
    ifup-eth to extract the appropriate name/SSID block, write it to a new
    file and tell wpa_supplicant to use that file .

    An ugly kludge.


    TJ

    --- MBSE BBS v1.0.8 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)