On Wed, Sep 05, 2018 at 01:39:53PM +0200, Stefan Wollny wrote:
> After a 'sh /etc/netstart' 'ifconfig gives me the following:
> 
> iwm0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 80:fa:5b:14:xx:yy
>         index 1 priority 4 llprio 3
>         trunk: trunkdev trunk0
>         groups: wlan
>         media: IEEE802.11 autoselect (HT-MCS0 mode 11n)
>         status: no network
>         ieee80211: join <SSID> chan 36 bssid 84:b2:61:96:aa:bb 83%
> wpaprotos wpa2 wpaakms 802.1x wpaciphers ccmp wpagroupcipher ccmp
> ...
> trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 80:fa:5b:14:xx:yy
>         index 7 priority 0 llprio 3
>         trunk: trunkproto failover
>                 trunkport iwm0
>                 trunkport re0 master
>         groups: trunk
>         media: Ethernet autoselect
>         status: no carrier
> 
> Only after I had commented the join-line for this network I was able to
> reattach to my mobile phone's net.

Let me guess: Your mobile phone is on a 2 GHz channel (1-13)?

If that is true, then the AP on channel 36 (5 GHz) with good RSSI (83%)
will always win because this is how join was taught to make decisions:

 * Given two APs, determine the "better" one of the two.
 * We compute a score based on the following attributes:
 *
 *  crypto: wpa2 > wpa1 > wep > open
 *  band: 5 GHz > 2 GHz provided 5 GHz rssi is above threshold
 *  rssi: rssi1 > rssi2 as a numeric comparison with a slight
 *         disadvantage for 2 GHz APs
 *
 * Crypto carries most weight, followed by band, followed by rssi.

> Attaching to this particular net would be helpful - saves some time
> avoiding workaraounds...

You can use 'ifconfig iwm0 nwid phone' to override auto-join decisions
and always attach to a network called 'phone'. To re-enable automatic
network selection you can use: ifconfig iwm0 -nwid

Reply via email to