Bug 276489

Summary: Cannot connect to a certain wifi hotspot
Product: Base System Reporter: Antti Laiti <laiti>
Component: wirelessAssignee: freebsd-wireless (Nobody) <wireless>
Status: Closed Unable to Reproduce    
Severity: Affects Only Me CC: bz
Priority: ---    
Version: 14.0-RELEASE   
Hardware: Any   
OS: Any   

Description Antti Laiti 2024-01-21 09:09:30 UTC
I cannot connect to one of my wifi hotspots if I am using the built-in wifi in my NUC machine. The hotspot is Ubiquiti U6-PRO with Ubiquiti Edgerouter X doing the DHCP and other networking stuff.

The interesting part is that the wifi works if I run Linux on the same system or use some random el cheapo USB wifi adapter. Another interesting thing is that the other two wifi APs I have work fine.

Log:
Jan 18 16:58:02 lucasia wpa_supplicant[8459]: wlan0: Trying to associate with 00:11:22:33:44:55 (SSID='MYWIFI' freq=2437 MHz)
Jan 18 16:58:12 lucasia wpa_supplicant[8459]: wlan0: Authentication with 00:11:22:33:44:55 timed out.
Jan 18 16:58:12 lucasia wpa_supplicant[8459]: BSSID 00:11:22:33:44:55 ignore list count incremented to 4, ignoring for 120 seconds
Jan 18 16:58:12 lucasia wpa_supplicant[8459]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:11:22:33:44:55 reason=3 locally_generated=1
Jan 18 16:58:12 lucasia wpa_supplicant[8459]: BSSID 00:11:22:33:44:55 ignore list count incremented to 5, ignoring for 600 seconds
Jan 18 16:58:12 lucasia wpa_supplicant[8459]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Jan 18 16:58:13 lucasia wpa_supplicant[8459]: wlan0: Trying to associate with 00:11:22:33:44:55 (SSID='MYWIFI' freq=2437 MHz)
Jan 18 16:58:18 lucasia wpa_supplicant[8459]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:11:22:33:44:55 reason=3 locally_generated=1

Another log:
2024-01-18 17... Trying to associate with 00:11:22:33:44:55 (SSID='MYWIFI' freq=2437 MHz)
2024-01-18 17:... Authentication with 00:11:22:33:44:55 timed out.
2024-01-18 17:... CTRL-EVENT-DISCONNECTED bssid=00:11:22:33:44:55 reason=3 locally_generated=1
2024-01-18 17:... CTRL-EVENT-DSCP-POLICY clear_all
2024-01-18 17:... CTRL-EVENT-BSS-ADDED 88 00:11:22:33:44:57
2024-01-18 17:...CTRL-EVENT-BSS-ADDED 89 00:11:22:33:44:58
2024-01-18 17:... CTRL-EVENT-BSS-ADDED 90 00:11:22:33:44:59 
2024-01-18 17... CTRL-EVENT-BSS-ADDED 91 00:11:22:33:44:60
2024-01-18 17:... CTRL-EVENT-SCAN-RESULTS
2024-01-18 17:... WPS-AP-AVAILABLE


Wifi info with successful connection with USB wifi:

# usbconfig|grep Ralink
ugen0.5: <Ralink 802.11 n WLAN> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)

wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=0
        ether 00:11:22:33:44:56
        inet 192.168.0.4 netmask 0xffffffc0 broadcast 192.168.0.255
        groups: wlan
        ssid MYWIFI channel 6 (2437 MHz 11g ht/20) bssid 00:11:22:33:44:55
        regdomain FCC4 country FI authmode WPA2/802.11i privacy ON
        deftxkey UNDEF AES-CCM 3:128-bit txpower 30 bmiss 7 scanvalid 60
        protmode CTS ht20 ampdulimit 64k -stbc -ldpc -uapsd wme roaming MANUAL
        parent interface: run0
        media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

# kldstat |grep iw
17    1 0xffffffff83566000    93260 if_iwlwifi.ko
18    1 0xffffffff835fa000    17314 if_iwm.ko
20    1 0xffffffff83800000   207d80 iwm8000Cfw.ko

# pciconf -lv |grep -A1 -B2 Wireless
iwm0@pci0:1:0:0:	class=0x028000 rev=0x3a hdr=0x00 vendor=0x8086 device=0x24f3 subvendor=0x8086 subdevice=0x9010
    vendor     = 'Intel Corporation'
    device     = 'Wireless 8260'
    class      = network
Comment 1 Antti Laiti 2024-01-21 09:17:52 UTC
Relevant parts of /etc/rc.conf:

create_args_wlan0="country FI regdomain FCC4"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
Comment 2 Bjoern A. Zeeb freebsd_committer freebsd_triage 2024-01-21 14:43:33 UTC
Questions:

neither iwm nor iwlwifi work is the assumption I get from the outputs you are providing?

What are the other two APs? Also Ubiquiti?  Same SSID?

Any "Greenfield" options on on the Ubiquity?
Comment 3 Antti Laiti 2024-01-21 19:55:16 UTC
(In reply to Bjoern A. Zeeb from comment #2)

> neither iwm nor iwlwifi work is the assumption I get from the outputs you are providing?
Actually I have no idea which one of the drivers I am currently using for the device. Is there an easy way to tell?

> What are the other two APs? Also Ubiquiti?  Same SSID?
Android 14 hotspot AP and ZyXEL VMG3925 series DSL modem. SSIDs are different in all three.

> Any "Greenfield" options on on the Ubiquity?
This is a new term for me. But at least I could not find anything referring to that from the control panel.
Comment 4 Bjoern A. Zeeb freebsd_committer freebsd_triage 2024-01-21 20:27:17 UTC
(In reply to Antti Laiti from comment #3)

(1) ifconifg wlan0 will tell you the "parent interface:" but the pciconf line you posted says iwm0 was attached.

(2) thanks

(3) "Greenfield" mode -- I don't know how they may call it;  In the config for the radio is there some "compatibility" which says "11n only" or something like that (instead of "11g/n" or "auto")?
Alternatively we could go and have a look at the beacon using tcpdump;  would be bit 5 (or bit 4 if counted from 0) in the HT Capabilities Info field;  though I am pretty sure wireshark would decode it correctly.
Otherwise can you ssh into your AP and check what it logs for auth_failures in /var/log/messages (I think that's where it was but don't nail me down on it).
So far this is a shot in the dark from me and it could be something entirely different.  Hard to find Sampo remotely like this ;-)
If you want I can help getting packet traces and full logs (in private) and we can have a look.
Comment 5 Antti Laiti 2024-01-22 14:57:27 UTC
Well, this is odd. I cannot reproduce the issue anymore even though couple of days back it was still present and easy to reproduce every time. I happened to update the Ubiquiti firmware to 6.5.71.14794 while I was at the control panel, perhaps that fixed it.

So it seems that we found Sampo after all by accident. Thanks for the support on this case!