Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Choose a wireless access point
Date: Tue, 05 Apr 2022 03:17:03
Message-Id: 560a5955-4d4b-0816-4ced-332934abdc2a@iinet.net.au
In Reply to: Re: [gentoo-user] Choose a wireless access point by Michael
1 On 5/4/22 07:09, Michael wrote:
2 > On Monday, 4 April 2022 16:12:53 BST Jack wrote:
3 >> On 4/4/22 01:31, William Kenworthy wrote:
4 >>> Is there a way force openrc and wpa_supplicant to map a particular
5 >>> access point to an interface or fail?
6 >>>
7 >>> I have two AP's (each on a different ssid) to connect to so have two
8 >>> wifi interfaces - unfortunately they are not equal so I want wlan0 to
9 >>> connect to only one particular AP, and wlan1 to the other ... reliably!
10 >>> I can manually force it to connect but invariably at the first glitch
11 >>> they both end up connected to the same AP (usually the strongest which
12 >>> is often not what I want :(
13 >>>
14 >>> BillK
15 >> I don't know about wpa-supplicant, but I'm using open-rc and KDE, and
16 >> KDE's systemsettings Network / Connections screen lets you restrict a
17 >> network connection so a specific device. Not sure if this helps you
18 >> any, but it would indicate that what you want is possible.
19 >>
20 >> Jack
21 > Look at the example provided in:
22 >
23 > /usr/share/doc/netifrc-0.7.3/net.example.bz2
24 >
25 > You can set a different ssid for each wireless NIC. The wpa_supplicant can be
26 > set with credentials for the two APs only.
27
28 Unfortunately, this does not work as I want ...wpa_supplicant's
29 behaviour makes sense in that it provides a fallback if the allocated
30 access point cant connect ... it will pick the next available one
31 (seemingly based on signal strength) if it is in its conf file (and does
32 not care that its another ssid) - so it does not fail.  As only one of
33 the two networks has internet access the device often ends up not being
34 able to be connected to (its headless so that's a problem!).
35
36 I have fallen back to openrc for the main connection and will do the
37 other manually - it would be nice to have everything properly controlled
38 but its not working for me.
39
40 BillK

Replies

Subject Author
Re: [gentoo-user] Choose a wireless access point Neil Bothwick <neil@××××××××××.uk>