Solved wifi/wlan0 will not connect to open network

My wifi will not join my workplace's wifi. It's a "Guest-wifi" set up with no pass so that we can join with our laptops/phones/etc, while at work for internet access only.

I believe my FreeBSD laptop (a Thinkpad T495s) is set up reasonably well as I have two main wifi networks at home: my house network, and one in my shop. My laptop effortlessly switches between the two wifi networks when I move it between the two. Neither my macbook nor windows laptops have any problems joining my workplace's "Guest-wifi".

The card in it is an Intel Corporation Wireless-AC 9260. I'm running "FreeBSD TP-FBSD 13.1-RELEASE-p1 FreeBSD 13.1-RELEASE-p1 GENERIC amd64". I have tried putting the firmware for the card into /boot/loader.conf : iwm9260fw_load="YES" and the idea was likely a red herring as it made no difference in the results.

I've talked to the IT guys at work, and they just shrug their shoulders. "The setup isn't anything special, you should be able to get on."

My /boot/loader.conf is:
Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
hw.syscons.disable=0
kern.vty=vt
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

My /etc/rc.conf is:
Code:
sendmail_enable="NONE"
hostname="TP-FBSD"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
sshd_enable="YES"
moused_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
dumpdev="NO"
zfs_enable="YES"
dbus_enable="YES"
slim_enable="YES"
kld_list="amdgpu"
ifconfig_re0="DHCP"
linux_enable="YES"
cupsd_enable="YES"
devfs_system_ruleset="system"
fusefs_load="YES"

My /etc/wpa_supplicant.conf is (lightly edited):
Code:
# /etc/wpa_supplicant.conf written by wifimgr(8)

network={
    ssid="Guest-Wifi"
    priority=1
    #+ any_bssid
    key_mgmt=NONE
}

network={
    ssid="Home1_wifi"
    bssid=12:80:63:04:xx:xx
    key_mgmt=WPA-PSK
    proto=RSN
    psk="xxxxxxxx"
}

network={
    ssid="Home2_wifi"
    bssid=74:24:9f:c9:xx:xx
    key_mgmt=WPA-PSK
    proto=RSN
    psk="xxxxxxxx"
}

I've worked my way through the Handbook carefully. I've tried looking around for similar problems online elsewhere and cannot find the same problem anywhere. During my digging I have this log from the command wpa_supplicant -dd -i wlan0 -c /etc/wpa_supplicant.conf :
Code:
wpa_supplicant v2.10
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=10):
     47 75 65 73 74 2d 57 69 66 69                     Guest-Wifi      
priority=1 (0x1)
key_mgmt: 0x4
Line: 10 - start of a new network block
ssid - hexdump_ascii(len=12):
     53 6f 70 68 69 65 73 5f 77 69 66 69               Home1_wifi    
BSSID - hexdump(len=6): 12 80 63 04 29 8b
key_mgmt: 0x2
proto: 0x2
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Line: 18 - start of a new network block
ssid - hexdump_ascii(len=12):
     53 74 61 72 4c 69 6e 6b                           Home2_wifi        
BSSID - hexdump(len=6): 74 24 9f c9 99 cd
key_mgmt: 0x2
proto: 0x2
PSK (ASCII passphrase) - hexdump_ascii(len=9): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 1
   id=0 ssid='Guest-Wifi'
Priority group 0
   id=1 ssid='Home1_wifi'
   ...
   ...
   ...
   id=5 ssid='Home2_wifi'
wpa_driver_bsd_capa: drivercaps=0x0580c201,cryptocaps=0x00000000
Add interface wlan0 to a new radio N/A
PTKSA: Initializing
wlan0: Failed to attach pkt_type filter
wlan0: Own MAC address: e4:5e:37:63:55:a1
bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=0
bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=1
bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=2
bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=3
bsd_set_key: alg=0 addr=0x0 key_idx=4 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=4
ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
bsd_set_key: alg=0 addr=0x0 key_idx=5 set_tx=0 seq_len=0 key_len=0
bsd_del_key: key_idx=5
ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
wpa_driver_bsd_set_countermeasures: enabled=0
wlan0: RSN: flushing PMKID list in the driver
wlan0: Setting scan request: 0.100000 sec
TDLS: TDLS operation not supported by driver
TDLS: Driver uses internal link setup
TDLS: Driver does not support TDLS channel switching
wlan0: WPS: UUID based on MAC address: 88ca24bb-0a51-58c3-98f8-93fc4e75027c
ENGINE: Loading builtin engines
ENGINE: Loading builtin engines
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
MBO: Update non-preferred channels, non_pref_chan=N/A
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x801e10440
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x801e10440 after 0.000010 second wait
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wlan0: Event SCAN_RESULTS (3) received
Received 3980 bytes of scan results (13 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID d4:20:b0:ae:fe:43 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 5220
wlan0: BSS: Add new id 1 BSSID d4:20:b0:ae:fe:42 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 5220
wlan0: BSS: Add new id 2 BSSID 78:8a:20:52:b6:bf SSID 'NMY' freq 5745
wlan0: BSS: Add new id 3 BSSID 7e:8a:20:52:b6:bf SSID '' freq 5745
wlan0: BSS: Add new id 4 BSSID d4:20:b0:ae:fe:23 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 2412
wlan0: BSS: Add new id 5 BSSID d4:20:b0:ae:fe:22 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 2412
wlan0: BSS: Add new id 6 BSSID 78:8a:20:51:b6:bf SSID 'NMY' freq 2437
wlan0: BSS: Add new id 7 BSSID 7a:45:58:98:b7:6c SSID 'CKBGuest' freq 2462
wlan0: BSS: Add new id 8 BSSID d4:20:b0:ac:07:d1 SSID 'Guest-Wifi' freq 5180
wlan0: BSS: Add new id 9 BSSID d4:20:b0:ae:fe:41 SSID 'Guest-Wifi' freq 5220
wlan0: BSS: Add new id 10 BSSID d4:20:b0:ac:07:b1 SSID 'Guest-Wifi' freq 2462
wlan0: BSS: Add new id 11 BSSID d4:20:b0:ac:08:01 SSID 'Guest-Wifi' freq 5745
wlan0: BSS: Add new id 12 BSSID d4:20:b0:ae:fe:21 SSID 'Guest-Wifi' freq 2412
BSS: last_scan_res_used=13/32
wlan0: New scan results available (own=0 ext=0)
wlan0: Radio work 'scan'@0x801e10440 done in 0.664975 seconds
wlan0: radio_work_free('scan'@0x801e10440): num_active_works --> 0
wlan0: Selecting BSS from priority group 1
wlan0: 0: d4:20:b0:ae:fe:43 ssid='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-67 freq=5220 
wlan0:    skip - SSID mismatch
wlan0: 1: d4:20:b0:ae:fe:42 ssid='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-67 freq=5220 
wlan0:    skip - SSID mismatch
wlan0: 2: 78:8a:20:52:b6:bf ssid='NMY' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-74 freq=5745 
wlan0:    skip - SSID mismatch
wlan0: 3: 7e:8a:20:52:b6:bf ssid='' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-75 freq=5745 
wlan0:    skip - SSID not known
wlan0: 4: d4:20:b0:ae:fe:23 ssid='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=-73 freq=2412 
wlan0:    skip - SSID mismatch
wlan0: 5: d4:20:b0:ae:fe:22 ssid='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=-74 freq=2412 
wlan0:    skip - SSID mismatch
wlan0: 6: 78:8a:20:51:b6:bf ssid='NMY' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=-82 freq=2437 
wlan0:    skip - SSID mismatch
wlan0: 7: 7a:45:58:98:b7:6c ssid='CKBGuest' wpa_ie_len=22 rsn_ie_len=20 caps=0x11 level=-89 freq=2462 
wlan0:    skip - SSID mismatch
wlan0: 8: d4:20:b0:ac:07:d1 ssid='Guest-Wifi' wpa_ie_len=0 rsn_ie_len=0 caps=0x1 level=-60 freq=5180 
wlan0:    allow in non-WPA/WPA2
wlan0:    selected BSS d4:20:b0:ac:07:d1 ssid='Guest-Wifi'
wlan0: Considering connect request: reassociate: 0  selected: d4:20:b0:ac:07:d1  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x801e41000  current_ssid=0x0
wlan0: Request association with d4:20:b0:ac:07:d1
Ignored duplicated SSID element
TDLS: TDLS is allowed in the target BSS
TDLS: TDLS channel switch allowed in the target BSS
wlan0: No ongoing scan/p2p-scan found to abort
wlan0: Add radio work 'connect'@0x801e10440
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'connect'@0x801e10440 after 0.000014 second wait
wlan0: WPA: clearing own WPA/RSN IE
wlan0: RSN: clearing own RSNXE
wlan0: WPA: clearing AP WPA IE
wlan0: WPA: clearing AP RSN IE
wlan0: WPA: clearing AP RSNXE
wlan0: WPA: clearing own WPA/RSN IE
wlan0: RSN: clearing own RSNXE
wlan0: Automatic auth_alg selection: 0x1
No supported operating classes IE to add
wlan0: Trying to associate with d4:20:b0:ac:07:d1 (SSID='Guest-Wifi' freq=5180 MHz)
wlan0: Cancelling scan request
wlan0: State: SCANNING -> ASSOCIATING
Limit connection to BSSID d4:20:b0:ac:07:d1 freq=5180 MHz based on scan results (bssid_set=0 wps=0)
wpa_driver_bsd_associate: ssid 'Guest-Wifi' wpa ie len 13 pairwise 1 group 1 key mgmt 4
wpa_driver_bsd_set_drop_unencrypted: enabled=0
bsd_set_opt_ie: set WPA+RSN ie (len 13)
wpa_driver_bsd_associate: set PRIVACY 1
wlan0: Setting authentication timeout: 10 sec 0 usec
Not configuring frame filtering - BSS 00:00:00:00:00:00 is not a Hotspot 2.0 network
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=ForceAuthorized
EAPOL: disable timer tick
wlan0: Authentication with d4:20:b0:ac:07:d1 timed out.
Added BSSID d4:20:b0:ac:07:d1 into ignore list, ignoring for 10 seconds
TDLS: Remove peers on disassociation
wlan0: WPA: Clear old PMK and PTK
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=d4:20:b0:ac:07:d1 reason=3 (DEAUTH_LEAVING) state=ASSOCIATING
TDLS: Tear down peers
wlan0: Event DEAUTH (11) received
wlan0: Deauthentication notification
wlan0:  * reason 3 (DEAUTH_LEAVING) locally_generated=1
Deauthentication frame IE(s) - hexdump(len=0): [NULL]
wlan0: CTRL-EVENT-DISCONNECTED bssid=d4:20:b0:ac:07:d1 reason=3 locally_generated=1
wlan0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=5)
wlan0: Setting scan request: 0.100000 sec
wlan0: Radio work 'connect'@0x801e10440 done in 10.048941 seconds
wlan0: radio_work_free('connect'@0x801e10440): num_active_works --> 0
BSSID d4:20:b0:ac:07:d1 ignore list count incremented to 2, ignoring for 10 seconds
wlan0: Consecutive connection failures: 1 --> request scan in 100 ms
wlan0: Ignore new scan request for 0.100000 sec since an earlier request is scheduled to trigger sooner
TDLS: Remove peers on disassociation
wlan0: WPA: Clear old PMK and PTK
wlan0: State: ASSOCIATING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlan0: State: DISCONNECTED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
QM: Clear all active DSCP policies
wlan0: CTRL-EVENT-DSCP-POLICY clear_all
wlan0: Ignore new scan request for 1.000000 sec since an earlier request is scheduled to trigger sooner
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x801e10440
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x801e10440 after 0.000015 second wait
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wlan0: Event SCAN_RESULTS (3) received
Received 1756 bytes of scan results (6 BSSes)
wlan0: BSS: Start scan result update 2
wlan0: BSS: Add new id 13 BSSID 7e:8a:20:51:b6:bf SSID '' freq 2437
BSS: last_scan_res_used=6/32
wlan0: New scan results available (own=0 ext=0)
wlan0: Radio work 'scan'@0x801e10440 done in 0.664677 seconds
wlan0: radio_work_free('scan'@0x801e10440): num_active_works --> 0
wlan0: Selecting BSS from priority group 1
wlan0: 0: 78:8a:20:51:b6:bf ssid='NMY' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 leve
...
...

As you can see it starts trying to join the workplace "Guest-wifi" but cannot associate. It then moves on to another bssid.

This leaves me at work with ifconfig that looks like:
Code:
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 00:2b:67:04:29:80
    media: Ethernet autoselect (none)
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether e4:5e:37:63:55:a1
    groups: wlan
    ssid "" channel 36 (5180 MHz 11a)
    regdomain FCC country US authmode OPEN privacy OFF txpower 17
    bmiss 10 mcastrate 6 mgmtrate 6 scanvalid 60 wme
    parent interface: iwm0
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

The ssid cycles through the various "Guest-wifi" bssid's it can hear, then several non-named ssid's as well before settling where it is. But always is status: no carrier
I feel like I'm missing something simple and I really hated to have to ask here. Any help would be appreciated.

K5KGT.
 
At the moment, I m having this issue too. I am using freebsd 13.1 STABLE. I tried connecting with wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf but failed too. You could try this. It works for me. Doas ifconfig wlan0 down. Doas ifconfig wlan0 up. For me those commands connected me to my wifi hotspot.
 
OP
K5KGT
I've cycled wlan0 up and down at work to no avail. It does work, I'm sending this reply via my home wifi from the laptop at the moment. However, when I get to work in a little while it will not join.

mr8ash thanks for the reply. I will try again with your idea in a little bit just to make sure.

I still feel like I'm missing something simple.

K5KGT.
 
The WPA setting in /etc/rc.conf ifconfig_wlan0="WPA SYNCDHCP" inhibits associating with the password-less "Guest-wifi".

Better than to remove WPA, which will break associating with the WPA authenticated networks, use a WiFi manager like net-mgmt/networkmgr or net-mgmt/wifimgr.


hw.syscons.disable=0
kern.vty=vt
vt(4) is default, no need to set it explicitly.

wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
Those are loaded automatically.
ntpdate_enable="YES"
ntpd_enable="YES"
Don't set both, choose one.

fusefs_load="YES"
This (*_load variable) doesn't belong in /etc/rc.conf but in /boot/loader.conf, or set fusefs in kld_list=, if it's not necessary to mount fuse file systems during boot.
 
OP
K5KGT
T-Daemon Thanks for the input. I've changed my WPA setting to ifconfig_wlan0="WPA DHCP"

I'm not sure what else I should use. My understanding is that this tells the system to use WPA to join (then going to /etc/wpa_supplicant.conf to see _what_ to join). Then once associated with an AP, use DHCP to get an ip, etc.

net-mgmt/wifimgr just sets up a wpa_supplicant.conf after scanning your available AP's. I have been using it (it's fingerprint is at the top of my wpa_supplicant.conf). For some reason after an update I can't get net-mgmt/networkmgr to run. However, before my update issue it also would not associate at my work's AP.

The wlan_ config settings above were just me trying to make sure no loose ends from my reading other's wifi efforts and trying to fix my problem. I've removed them at your suggestion.

It's still not joining the "Guest-wifi" so I've missed what I should have for my /etc/rc.conf's ifconfig parameters.

K5KGT.
 
OP
K5KGT
OK, changing my ifconfig setting in /etc/rc.conf to ifconfig_wlan0="DHCP" seems to have allowed me to associate with the "Guest-wifi" here. Thanks T-Daemon for the suggestion.

Will my laptop join at home and switch back and forth between networks as I move around as it does now? Or will I need to script the changes somehow? It should be able to easily move from network to network regardless of whether the wireless network needs a password, as long as it's specified in the /etc/wpa_supplicant.conf. So my problem is partially solved (I need to go home and check how well it works), but it leaves me confused as to why.

Thanks for your help.

K5KGT.
 
OP
K5KGT
Ok thanks all. I'm going to call this Solved.

When I'm at work where the wifi has a No Password "Guest-Wifi" I have to have the line ifconfig_wlan0="DHCP" in my /etc/rc.conf. When I'm at home where my wifi obviously has a password I have to change it to ifconfig_wlan0="WPA DHCP", and issue a service netif restart.

I can write a little script that can do that. Vermaden has some scripts at https://vermaden.wordpress.com/2018/03/24/freebsd-network-management-with-network-sh-script/ which I will use as a guide to help.

This is one place where wpa_supplicant disappoints me. Whether or not the wifi has a pass, it should "just work", if it's properly placed into the /etc/wpa_supplicant.conf. However, now that I know how to get around it I'll be fine.

Cheers all,

K5KGT.
 
If access point is WPA-PSK encrypted network, use line in file /etc/rc.conf
ifconfig_wlan0="WPA SYNCDHCP"

if access point is an OPEN network, use line in file /etc/rc.conf
ifconfig_wlan0="SYNCDHCP" or ifconfig_wlan0="DHCP"

I too have found this to work for me on my OPEN network to router. "Changing the line inside file /etc/rc.conf to drop "WPA DHCP" to just "DHCP" I use Tomato Router software on a Cisco Linksys E2500 router. Works great for my home network needs.

Advanced Tomato for Broadcom router chips
Fresh Tomato Router software
 
Top