Solved WiFi Connection not working after update to 13.1 Release

My usual way of connecting to the Internet is using a USB WiFi dongle. This worked fine in FreeBSD 13.0 but stopped working immediately after I completed the upgrade to 13.1. The Ethernet connection is unaffected and still works fine.

I use the networkmgr package to manage my connections and this shows that the WiFi connection is still made but the symbol for a completed WiFi connection does not appear.

When I use this device at work, I connect via the "Guest" network and then log in via the portal, now the portal cannot be detected.

I will show the output from ifconfig:

Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether ee:44:a6:2a:bb:dd
    groups: wlan
    ssid ABC-GUEST channel 11 (2462 MHz 11g ht/20) bssid bb:a8:b8:8c:d8:88
    regdomain FCC country US authmode WPA privacy MIXED deftxkey UNDEF
    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>
I have changed the MAC addresses and bssids etc to anonymise.
ABC-GUEST is an open network which then requires authentication. Is there anything in the upgrade process that could have affected this? I am in the UK but it is showing FCC country as US, is this a problem?
 
… I am in the UK but it is showing FCC country as US, is this a problem?

Maybe. Can you share relevant lines from your rc.conf?

… a USB WiFi dongle …

Make and model?

… worked fine in FreeBSD 13.0 but stopped working immediately after I completed the upgrade to 13.1. …

I'm not aware of any regression that might affect a Wi-Fi adapter.

Did you upgrade packages after upgrading the OS?
 
Sorry about the slow reply, I was away from this machine over the the summer.

Maybe. Can you share relevant lines from your rc.conf?
Code:
wlans_run0="wlan0"
ifconfig_wlan0="WPA DHCP"
kld_list="i915kms"
wlans_rtwn0="wlan1"
ifconfig_wlan1="WPA DHCP"
Make and model?

Ralink Technology, Corp. RT5370 Wireless Adapter

I'm not aware of any regression that might affect a Wi-Fi adapter.

Did you upgrade packages after upgrading the OS?

Yes
 
My usual way of connecting to the Internet is using a USB WiFi dongle. This worked fine in FreeBSD 13.0 but stopped working immediately after I completed the upgrade to 13.1. The Ethernet connection is unaffected and still works fine.

I use the networkmgr package to manage my connections and this shows that the WiFi connection is still made but the symbol for a completed WiFi connection does not appear.

When I use this device at work, I connect via the "Guest" network and then log in via the portal, now the portal cannot be detected.

I will show the output from ifconfig:

Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether ee:44:a6:2a:bb:dd
    groups: wlan
    ssid ABC-GUEST channel 11 (2462 MHz 11g ht/20) bssid bb:a8:b8:8c:d8:88
    regdomain FCC country US authmode WPA privacy MIXED deftxkey UNDEF
    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>
I have changed the MAC addresses and bssids etc to anonymise.
ABC-GUEST is an open network which then requires authentication. Is there anything in the upgrade process that could have affected this? I am in the UK but it is showing FCC country as US, is this a problem?
It appears your wifi is associated but ndhcpd has not obtained an address.

Try running,

Code:
dhclient wlan0

/var/log/messages will tell you why. For example, when we were still working at the office I'd use the wifi at the cafe down the hall. (It was in fact the building wifi.) It was easy to get an IP in the morning but by noon, with all the phones in the building having associated with the wifi access points (same ssid), dhclient would print the message that the building wifi refused to hand out an IP (all IPs were in use).

It could be the scenario above or something else. You will only know (or get an idea of) what the problem might be by looking at /var/log/messages.

Please post anything about wpa_supplicant and dhclient from /var/log/messages. Otherwise this is a needle in the haystack thing, except we don't even know if we're looking for a needle, toothpick or a unique piece of straw yet.

Now, another thing to test is, get an IP from the network using your phone. Change the MAC for wlan0 to that of your phone. Put your phone's IP into rc.conf and disable wpa_supplicant. This is temporary for the test. BUT, do not enable wifi on your laptop yet. Disable wifi on your phone and quickly connect to the wifi using your laptop. (This reduces a race condition should someone else grab the IP.) This won't always work but if it does it points to a problem in wpa_supplicant. If this doesn't work this probably points to a problem in the driver itself.

BTW, I used the technique above to "steal" my phone's IP on that network when I needed to connect using my laptop. The building I worked at had a Class C (192.168.0.0/24) but only allocated 50 IP addresses for DHCP allocation. The first 50 people with phones who walked into the building that day got IP addresses. The rest were SOL. (Complaining to building facilities management didn't help. They didn't have the capacity to understand the problem -- too technical for them, as they had outsourced WiFi management to some local company who remained anonymous.)

Getting back to the problem at hand. You can use this same technique to help determine if the problem is in the kernel (driver) or userspace (wpa_supplicant). It will take a little bit of sleuthing on your part to gather the information to help diagnose and fix the problem.

Suggest you open a PR at bugs.freebsd.org.
 
I too am having problems with getting my wifi up on FreeBSD 13.1. I have a new install of FreeBSD 13.1 on a Dell XPS 13. I replaced the M2 wifi card in the laptop with a Wifi 6E AX210 adapter. When I boot the adapter is seen by the new iwlwifi driver, no issue there. Using Chapter 32 in the handbook, I configured wpa_supplicant and in the /etc/rc.conf I have
Code:
wlans_iwlwifi0="wlan0"
ifconfig_wlan0="WPA DHCP"

With these settings the interface does not come up after I boot however, if after the machine boots and I run ifconfig wlan0 up scan I see various AP's and their SSID's. Next I run wpa_supplicant -I wlan0 -c /etc/wpa_supplicant.conf and the interface gets associated with the AP. Next in another terminal, I run dhclient wlan0 and I get an IP and all is fine, the wireless interface is working fine. It just won't come up on it's own when I boot with those rc.conf settings. Am I missing another config setting? Any ideas?
 
With these settings the interface does not come up after I boot however, if after the machine boots and I run ifconfig wlan0 up scan I see various AP's and their SSID's. Next I run wpa_supplicant -I wlan0 -c /etc/wpa_supplicant.conf and the interface gets associated with the AP. Next in another terminal, I run dhclient wlan0 and I get an IP and all is fine, the wireless interface is working fine. It just won't come up on it's own when I boot with those rc.conf settings. Am I missing another config setting? Any ideas?
I am running iwlwifi in a VM (Under a 13.1-STABLE machine using pci passthrough). What I have observed is that it takes quite a while for wlan0 to come up and meanwhile the VM has booted up to multiuser. May be this is a common problem? You should ask on the freebsd-wireless mailing list.
 
I am running iwlwifi in a VM (Under a 13.1-STABLE machine using pci passthrough). What I have observed is that it takes quite a while for wlan0 to come up and meanwhile the VM has booted up to multiuser. May be this is a common problem? You should ask on the freebsd-wireless mailing list.
Thanks for the reply! I think you are right. I waited a little over 5 minutes after booting and the interface finally came up, was associated and got an IP from the DHCP server. Is that about how long it takes it to come up on your VM?
 
no, I tried repeating this and the interface never comes up on it's own. I have to manually run ifconfig wlan0 up followed by manually running wpa_supplicant and dhclient in terminal windows. Very strange, maybe a bug in 13.1.
 
You should ask on the -wireless list. I do see some commits re iwlwifi since 13.1. For instance this commit:
Code:
commit 05b1792754ea397bd8147dd15df5e12f8fc1d2db
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
Date:   Sun Jun 26 19:17:04 2022 +0000

    LinuxKPI: 802.11: remove an early bandaid to make sure queues are allocated

    iwlwifi allocates queues on first wakeup.  This takes a lot longer on
    FreeBSD's work implementation that it seems to on Linux based on some
    discussion.  That meant that we couldn't get non-data frames out quickly
    enough initially and failed to associate.
    d0d2911035192473e8bd3f6b99ed5ca9b1b29e47 should have solved most of this
    for us with iwlwifi.  None of the other drivers ported to LinuxKPI/802.11
    up to today will call a dequeue so we get notified when the queus are
    allocated or even need to do so.
    Remove the bandaid initilly put in for iwlwifi now and speed up the
    overall process of getting us associated.

So may be you can run 13.1-STABLE?
 
ABC-GUEST is an open network which then requires authentication.
for OPEN NETWORKs:
Don't use WPA
in the file /etc/rc.conf line:
ifconfig_wlan0="WPA DHCP" use ifconfig_wlan0="DHCP" or ifconfig_wlan0="SYNCDHCP"

for WPA-PSK encrypted networks use line: ifconfig_wlan0="WPA DHCP" or ifconfig_wlan0="WPA SYNCDHCP"

see forum post for more explicit details https://forums.freebsd.org/threads/wifi-wlan0-will-not-connect-to-open-network.86247/

Tell us if this change in the /etc/rc.conf file works for you, please. The FreeBSD networking software developers might consider there software operation use of the word "WPA" to NOT, work when connecting to OPEN networks. Pain in the reading and comprehension of networking operations. Took me a whole day to try changing file /etc/rc.conf, because I was NOT LOOKING THERE to solve my connection problem.

Examples of manually connecting Wifi to access point via a USB Edimax EW-7811un Version 1 dongle Realtek RTL8192cu chipset
Edimax EW-7811un Wifi USB nano dongle; 10.3 & 11.0 setup
RealTek RTL8188CE Wii-Fi PCI network hardware setup
 
I finally fixed this issue by switching my network management from networkmgr to wifimgr. Wifimgr gave me the option to add the PEAP authentication information necessary to connect to my work byod wifi. Thank you to everyone who tried to help with this.
 
I finally fixed this issue by switching my network management from networkmgr to wifimgr. Wifimgr gave me the option to add the PEAP authentication information necessary to connect to my work byod wifi. Thank you to everyone who tried to help with this.
Can you share the 3 files /boot/loader.conf /etc/rc.conf /etc/wpa_supplicant.conf here that work for your PEAP authentication information, so that other people can refer to your work, please. I see that Wifimgr is basically and editor for file wpa_supplicant.conf.

What version of Wifimgr did you use? How did you get it installed on your computer. Pkg , Ports, or Git ?

Git server​

The lastest development version of the source can be downloaded from the Opal Git server: git://opal.com/src/wifimgr/
Git:
git clone git://opal.com/src/wifimgr/


About​

wifimgr is a GUI-based tool to manage WiFi network configuration.
wifimgr supports open networks, and secured networks using WEP, WPA-PSK and WPA-EAP with manual password or encryption key configuration. Automatic configuration for WPS is not supported, but passwords for WPS networks can be entered manually as for WPA-PSK networks.

wifimgr acts merely as an editor of the wpa_supplicant.conf(5) file. Actual network interface configuration and management is still done by the wpa_supplicant(8) program. Networks in the configuration file, together with new networks found by a scan of the WiFi interface are displayed to the user. The user may enable/disable networks as needed, enter either passwords or EAP configuration together with a short comment, and set a connection priority. When the "Save" button is clicked, the enabled networks are written back out to the wpa_supplicant.conf(5) file and the network interface is restarted.

wifimgr was originally written for users of the XFce4 window manager but it will work in any environment with the GTK+ libraries installed.

https://opal.com/src/wifimgr/ See Opal.com for newest releases of Wifimgr
Version 1.23 11 September 2022

View: https://www.youtube.com/watch?v=SsLxNU9Nkgc
Youtube Video about DSBMixer and WifiMgr

https://github.com/maxatome/wifimgr Found this version 1.11 or 1.12 , not sure how compares with FreeBSD pkg wifimgr version
http://www.troubleshooters.com/bsd/freebsd_initial_lessons_learned.htm Article from Steve in 2012 mentioning GUI wifimgr
https://linuxhint.com/freebsd-wifi-configuration/ Page describing using FreeBSD Wifimgr
 
Can you share the 3 files /boot/loader.conf /etc/rc.conf /etc/wpa_supplicant.conf here that work for your PEAP authentication information, so that other people can refer to your work, please.

https://github.com/maxatome/wifimgr Found this, not sure how compares with FreeBSD pkg wifimgr
http://www.troubleshooters.com/bsd/freebsd_initial_lessons_learned.htm Article from Steve in 2012 mentioning GUI wifimgr
https://linuxhint.com/freebsd-wifi-configuration/ Page describing using FreeBSD Wifimgr
https://opal.com/src/wifimgr/ See Opal.com for newest releases of Wifimgr
test, lets delete this post
 
I literally installed wifimgr using
Bash:
pkg install wifimgr
and then opened it.
I then just had to input my username, password etc and it connected. I think this will depend on the individual users work setup but in my case it was PEAP without certificate and then my username and password. I then had to go to the portal and agree to T&Cs and I was online.
 
What do you mean with ndhcpd? I know ans use frequently dhcpd and dhclient, but ndhcpd.
Typo. I tend to add extra spaces, probably accidentally hitting the space bar as I type. First time I've hit the n key.
 
Back
Top