# Wifi stopped working 13.1



## newmh990 (Jun 7, 2022)

I believe I may have misconfigured something, but I am not sure what.  I am connecting to a hotel AP with a captured portal at this time.  I was attempting to request a new dhcp lease (at this point I still had a connection - able to ping google.com). I did so by attempting to run `dhclient` on my wlan0. My IP address did not change and I noticed that I had an old lease for wlan0 in /var/db/, and deleted the lease.  When I attempted to run `dhclient`again, my IP address shows up in `ifconfig` as 0.0.0.0.  

I ran `service netif restart` and got the same result.  I attemped to configure manually using `ifconfig`.....      `ifconfig wlan0 inet XXX.XXX.XXX.XXX netmask XXX.XXX.XXX.XXX`.

`ifconfig` shows the ip address:

however ping does not work.  When I set my IP, mask, and router manually, `ping 172.20.0.1` (router) gives: `ping: sendto: No buffer space available`

I also see when I request an IP address with DHCP, in /var/log/messages 
`dhclient [3076]: send_packet: No buffer space available`

`ifconfig` shows I am connected to the AP that I want.

In windows on the same PC, the wireless works fine.  so I figure I am doing something incorrectly in FreeBSD.


----------



## SirDice (Jun 8, 2022)

Look at the output from `ifconfig`. Specifically look at the `status: associated` line, does it say 'associated' there? If not, then you're not connected. Setting an IP address doesn't connect you to the wireless network. Check your settings in /etc/wpa_supplicant.conf and make sure your wireless is actually 'associated'.


----------



## newmh990 (Jun 8, 2022)

thanks for the reply.  `ifconfig` does show that wlan0 is associated.

output from `ifconfig` from this morning:


```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether d4:d2:52:89:7f:65
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
        groups: wlan
        ssid {shows here, removed} channel 11 (2462 MHz 11g) bssid 94:bf:c4:16:cd:a8
        regdomain FCC country US authmode WPA privacy MIXED deftxkey UNDEF
        txpower 30 bmiss 10 scanvalid 60 protmode CTS wme roaming MANUAL
        parent interface: iwm0
        media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```


----------



## cmoerz (Jun 8, 2022)

So, this might be a total shot in the dark, but hear me out; I've had wlan issues as well after switching to 13.1 but for me, I had major issues even associating. 

What helped me out finally, was doing a `devctl reset iwm0` to simply reset the device and start over.

From what I gather, a lot of work went into improving Intel wireless in 13.1 (see https://wiki.freebsd.org/WiFi/Iwlwifi). I assume, this also broke a couple things - at least in terms of how stuff used to work.


----------



## newmh990 (Jun 8, 2022)

Ok.  So i booted up this afternoon, with the same results... no connection on the hotel wifi.  I ran the command that cmoerz suggested.  It returned nothing (so works)... I then attempted to `service netif restart` with no luck.  

I attempted to scan the wireless networks `ifconfig wlan0 scan` and was not able to see any networks.  Noted in my console log that iwm0 was not able to scan.  Rebooted, and got the same result (link to hotel wifi, DHCP failed).  

I attempted to attach to my phone's hot spot. I commented out the public wifi lines in /etc/wpa_supplicant.conf and made sure my phone's hot spot info was in the list.


```
#
#network={
#        key_mgmt=NONE
#        priority=0
#}
```

I then was able to do `service netif restart` and noted that I connected to my phone.  During the DHCP request i got messages showing that iwm0 was going up and down.

from /var/log/messages


```
Jun  8 17:07:37 ACER kernel: wlan0: link state changed to DOWN
Jun  8 17:07:50 ACER kernel: wlan0: link state changed to UP
```

I was able to obtain a lease and I am now posting this from inside FreeBSD.  I am going to attempt to reconnect to the hot spot.  Maybe the hotel AP or my computer was unhappy about something.


----------



## grahamperrin@ (Jun 11, 2022)

Welcome to FreeBSD Forums.



newmh990 said:


> a hotel



In which country/region?


----------



## grahamperrin@ (Jun 11, 2022)

cmoerz said:


> … improving Intel wireless in 13.1 … I assume, this also broke a couple things - at least in terms of how stuff used to work.



I haven't seen any evidence of regression.

<https://www.freebsd.org/cgi/man.cgi?query=iwlwifi&sektion=4&manpath=FreeBSD#DESCRIPTION> 

If I understand correctly: if iwm(4) worked with 13.0-RELEASE, so it should work with 13.1-RELEASE.


----------



## cmoerz (Jun 12, 2022)

Admittedly, I might have jumped to conclusions. 

grahamperrin, your remarks made me revisit my setup and look for further hints on what's going on on my end. After further examination, I managed to remove the reset from my network scripts today without any further breakage, thus returning everything back to the state that used to work under 13.0.

Must have been some fluke in regards to the wireless traffic in the past. I could no longer properly reproduce the issue I had. Weird.

The only remnant of error messages I can see are in `wpa_supplicant`'s log; I can't remember seeing those messages in 13.0 but then again, I probably never really checked while it was working fine. Additionally, those messages don't seem to be errors as such, since my notebook still manages to associate with the access point after a few seconds.


```
ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
ioctl[SIOCS80211, op=103, val=0, arg_len=128]: Operation now in progress
wlan0: CTRL-EVENT-SCAN-FAILED ret=-1 retry=1
```

Apologies for kind of hijacking this thread with this follow up of my own issue. I figured, my apparently wrong assumption warranted a followup.


----------



## newmh990 (Jun 14, 2022)

grahamperrin@ said:


> Welcome to FreeBSD Forums.
> 
> 
> 
> In which country/region?


U.S.  

Thank you all for your time.

I am now back on my home AP and have no problem.. I don't know if it was a config error on my end, or if the hotels wifi was a problem.



cmoerz said:


> ...
> 
> Apologies for kind of hijacking this thread with this follow up of my own issue. I figured, my apparently wrong assumption warranted a followup.



I certainly don't mind any hijacking especially if it can bring me or someone else some better understanding.  



cmoerz said:


> ...
> From what I gather, a lot of work went into improving Intel wireless in 13.1 (see https://wiki.freebsd.org/WiFi/Iwlwifi). I assume, this also broke a couple things - at least in terms of how stuff used to work.


 FWIW, I have had no other issues on my home network or on my phone's hot spot.  I will have to take note the next time I need to connect to a larger public network.


----------



## dcrosstech (Nov 4, 2022)

I have been having this problem too. But it predates 13.0. The other symptom i get is spurious ‘iwm0: code ce, frame 31/12 b800002c unhandled’ and scan_results with wpa-cli times out. The wpa-cli issue is because we are not setting the send and receive buffers appropriately to handle the dozens of aps that are concurrently available now. 

Status shows associated. If i tcpdump the interface i see ipv6 nd and arp requests but nothing else

Ideas?


----------

