# Wi-Fi and wired networking not, or no longer, working as expected



## grahamperrin@ (Jun 26, 2021)

Samuel Venable said:


> … I somehow managed to break what initially was perfectly working wifi. After putting my ssid and psk in wpa_supplicant.conf and and setting up my rc.conf accordingly, there seems to be absolutely nothing I can do to get it working with my wireless network adapter anymore. …



Samuel Venable hi, can you describe more about your setup?

13.0-RELEASE⋯, yes?

Do you use wpa_passphrase(8) to generate a key and if so, is the generated key (not the original passphrase) _manually_ pasted into /etc/wpa_supplicant.conf?


Here

As far as I can tell, part of my problem is:

unwanted connections to open networks such as BTWi-fi
– after which, the OS _might_ gain a connection to the required network *however*:

nothing useful is written to /etc/resolv.conf in response to `resolvconf -u`
– for example:


```
…
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.11 -- renewal in 302400 seconds.
root@mowa219-gjp4-8570p:~ # cat /etc/resolv.conf
# Generated by resolvconf

root@mowa219-gjp4-8570p:~ # resolvconf -u
root@mowa219-gjp4-8570p:~ # cat /etc/resolv.conf
# Generated by resolvconf

root@mowa219-gjp4-8570p:~ #
```

– I have an Internet connection but *no resolution of names*.

resolvconf(8)






```
% date
Sat 26 Jun 2021 09:28:37 BST
% bectl list -c creation
BE                    Active Mountpoint Space Created
n246499-097e8701c9f-d -      -          12.4G 2021-05-12 16:33
n247326-2349cda44fe-b -      -          1022M 2021-06-12 09:36
n247326-2349cda44fe-c -      -          218M  2021-06-17 04:15
n247326-2349cda44fe-d -      -          525M  2021-06-19 07:41
n247326-2349cda44fe-e -      -          315M  2021-06-22 19:01
n247326-2349cda44fe-f -      -          45.0M 2021-06-24 11:10
n247565-b49ba74deeb-a -      -          18.3M 2021-06-26 03:06
n247565-b49ba74deeb-b NR     /          66.0G 2021-06-26 05:26
% uname -KUv
FreeBSD 14.0-CURRENT #99 main-n247565-b49ba74deeb: Sat Jun 26 02:36:29 BST 2021     root@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  1400024 1400024
%
```

<https://bsd-hardware.info/?computer=8f084339058d>

Problems were first observed whilst using n247326-2349cda44fe. Updating to n247565-b49ba74deeb has not resolved the situation.

It's possible that problems were latent *much* earlier, but not realised because I stopped using Wi-Fi:

`ifconfig_wlan0="WPA SYNCDHCP NOAUTO"`

– (the `NOAUTO`) due to slowness, which I know can not be solved by me.


When I last started the computer _without_ `NOAUTO`:

a considerable amount of time was wasted with automated connections to the unwanted open network, `wlan0` automatically going down very soon after automatically coming up, then again down soon after up, and so on
eventually, login became possible but I could not use the Internet.
Photographs from two days ago: 





 



The third is difficult to read but essentially, the system fell back to reusing a previously leased address (words to that effect) and the Internet was unusable.


----------



## Phishfry (Jun 26, 2021)

grahamperrin said:


> a considerable amount of time was wasted with automated connections to the unwanted open network





grahamperrin said:


> `ifconfig_wlan0="WPA SYNCDHCP NOAUTO"`


If you are connecting to open networks with WPA enabled then you are doing something wrong.
The only way I can connect to open networks with WPA enabled is to manually add them to wpa_supplicant.conf


----------



## grahamperrin@ (Jun 26, 2021)

Phishfry said:


> If you are connecting to open networks with WPA enabled then you are doing something wrong. …



I can't see anything wrong with the configuration, but the results are confusing.

Earlier this afternoon, a start of the computer _without_ `NOAUTO` resulted in connection to the required network ☑ _piano_ and as far as I recall, no delay.

For the most recent start of the computer _with_ `NOAUTO`, subsequent use of `ifconfig wlan0 up`:

fails to connect to the required network when required ☒
connected to open network BTWi-fi ☒
connected to open network go-brighton*‡* probably when a bus stopped a few yards away
reconnected to open network BTWi-fi ☒
and so on …
– below, at a glance:

at 15:33:49 the required IP address was gained ☑
at 15:34:37 the link state changed to DOWN ☒


```
% tail -f -n 0 /var/log/messages
Jun 26 15:24:46 mowa219-gjp4-8570p kernel: iwn0: iwn_read_firmware: ucode rev=0x12a80601
Jun 26 15:24:46 mowa219-gjp4-8570p kernel: wlan0: link state changed to UP
Jun 26 15:24:55 mowa219-gjp4-8570p dhclient[3543]: New IP Address (wlan0): 10.28.1.2
Jun 26 15:24:55 mowa219-gjp4-8570p dhclient[3547]: New Subnet Mask (wlan0): 255.255.255.240
Jun 26 15:24:55 mowa219-gjp4-8570p dhclient[3551]: New Broadcast Address (wlan0): 10.28.1.15
Jun 26 15:24:55 mowa219-gjp4-8570p dhclient[3555]: New Routers (wlan0): 10.28.1.1
Jun 26 15:29:45 mowa219-gjp4-8570p kernel: wlan0: link state changed to DOWN
Jun 26 15:29:47 mowa219-gjp4-8570p kernel: wlan0: link state changed to UP
Jun 26 15:31:04 mowa219-gjp4-8570p dhclient[3974]: New IP Address (wlan0): 10.28.1.2
Jun 26 15:31:04 mowa219-gjp4-8570p dhclient[3978]: New Subnet Mask (wlan0): 255.255.255.240
Jun 26 15:31:04 mowa219-gjp4-8570p dhclient[3982]: New Broadcast Address (wlan0): 10.28.1.15
Jun 26 15:31:04 mowa219-gjp4-8570p dhclient[3986]: New Routers (wlan0): 10.28.1.1
Jun 26 15:31:05 mowa219-gjp4-8570p dhclient[3991]: New Routers (wlan0): 10.28.1.1
Jun 26 15:32:25 mowa219-gjp4-8570p kernel: pid 3558 (dhclient), jid 0, uid 65: exited on signal 11
Jun 26 15:32:25 mowa219-gjp4-8570p dhclient[3528]: connection closed
Jun 26 15:32:25 mowa219-gjp4-8570p dhclient[3528]: exiting.
Jun 26 15:32:26 mowa219-gjp4-8570p kernel: wlan0: link state changed to DOWN
Jun 26 15:32:29 mowa219-gjp4-8570p kernel: wlan0: link state changed to UP
Jun 26 15:33:47 mowa219-gjp4-8570p dhclient[4187]: New IP Address (wlan0): 10.28.1.2
Jun 26 15:33:47 mowa219-gjp4-8570p dhclient[4191]: New Subnet Mask (wlan0): 255.255.255.240
Jun 26 15:33:47 mowa219-gjp4-8570p dhclient[4195]: New Broadcast Address (wlan0): 10.28.1.15
Jun 26 15:33:47 mowa219-gjp4-8570p dhclient[4199]: New Routers (wlan0): 10.28.1.1
Jun 26 15:33:48 mowa219-gjp4-8570p dhclient[4204]: New Routers (wlan0): 10.28.1.1
Jun 26 15:33:49 mowa219-gjp4-8570p dhclient[4219]: New IP Address (wlan0): 192.168.1.11
Jun 26 15:33:49 mowa219-gjp4-8570p dhclient[4223]: New Subnet Mask (wlan0): 255.255.255.0
Jun 26 15:33:49 mowa219-gjp4-8570p dhclient[4227]: New Broadcast Address (wlan0): 192.168.1.255
Jun 26 15:33:49 mowa219-gjp4-8570p dhclient[4231]: New Routers (wlan0): 192.168.1.1
Jun 26 15:33:50 mowa219-gjp4-8570p dhclient[4236]: New Routers (wlan0): 192.168.1.1
Jun 26 15:34:37 mowa219-gjp4-8570p kernel: wlan0: link state changed to DOWN
Jun 26 15:34:39 mowa219-gjp4-8570p kernel: wlan0: link state changed to UP
Jun 26 15:34:39 mowa219-gjp4-8570p dhclient[4309]: New IP Address (wlan0): 10.28.1.2
Jun 26 15:34:39 mowa219-gjp4-8570p dhclient[4313]: New Subnet Mask (wlan0): 255.255.255.240
Jun 26 15:34:39 mowa219-gjp4-8570p dhclient[4317]: New Broadcast Address (wlan0): 10.28.1.15
Jun 26 15:34:39 mowa219-gjp4-8570p dhclient[4321]: New Routers (wlan0): 10.28.1.1
Jun 26 15:38:49 mowa219-gjp4-8570p dhclient[4585]: New IP Address (wlan0): 10.28.1.2
Jun 26 15:38:49 mowa219-gjp4-8570p dhclient[4589]: New Subnet Mask (wlan0): 255.255.255.240
Jun 26 15:38:49 mowa219-gjp4-8570p dhclient[4593]: New Broadcast Address (wlan0): 10.28.1.15
Jun 26 15:38:49 mowa219-gjp4-8570p dhclient[4597]: New Routers (wlan0): 10.28.1.1
Jun 26 15:40:28 mowa219-gjp4-8570p kernel: wlan0: link state changed to DOWN
Jun 26 15:40:30 mowa219-gjp4-8570p kernel: wlan0: link state changed to UP
Jun 26 15:40:36 mowa219-gjp4-8570p dhclient[4717]: New IP Address (wlan0): 10.28.1.2
Jun 26 15:40:36 mowa219-gjp4-8570p dhclient[4721]: New Subnet Mask (wlan0): 255.255.255.240
Jun 26 15:40:36 mowa219-gjp4-8570p dhclient[4725]: New Broadcast Address (wlan0): 10.28.1.15
Jun 26 15:40:36 mowa219-gjp4-8570p dhclient[4729]: New Routers (wlan0): 10.28.1.1
Jun 26 15:40:54 mowa219-gjp4-8570p kernel: wlan0: link state changed to DOWN
…
```


*‡* Free WiFi - Brighton & Hove Buses

Connection to this network is permissible (I chose to use it, on the bus, in 2020):


```
% grep -B 1 -A 3 go-brighton /etc/wpa_supplicant.conf
network={
        ssid="go-brighton"
        bssid=04:f0:21:1a:63:8e
        key_mgmt=NONE
}
%
```

– but not appropriate when my _piano_ router is two metres away in my front room and not likely to be driven away with a busload of passengers on board.


----------



## Phishfry (Jun 26, 2021)

grahamperrin said:


> but not appropriate when my _piano_ router is two metres away


How about you set PRIORITY in wpa_supplicant.conf
Higher number is highest priority.
See #29








						How to set WiFi network priority?
					

I understand that I can set up multiple WiFis by adding to /etc/wpa_supplicant/wpa_supplicant.conf (as prescribed in Setting WiFi Up Via The Command Line).  Let's say I have two WiFis registered: w...




					raspberrypi.stackexchange.com


----------



## grahamperrin@ (Jun 26, 2021)

Now according to /var/log/messages I have the required IP address ☑ `192.168.1.11`:


```
…
Jun 26 15:40:54 mowa219-gjp4-8570p kernel: wlan0: link state changed to DOWN
Jun 26 15:48:06 mowa219-gjp4-8570p dhclient[4094]: send_packet: Network is down
Jun 26 15:48:44 mowa219-gjp4-8570p syslogd: last message repeated 4 times
Jun 26 15:50:51 mowa219-gjp4-8570p syslogd: last message repeated 3 times
Jun 26 15:56:36 mowa219-gjp4-8570p syslogd: last message repeated 14 times
Jun 26 15:56:38 mowa219-gjp4-8570p dhclient[5541]: New IP Address (wlan0): 192.168.1.11
Jun 26 15:56:38 mowa219-gjp4-8570p dhclient[5545]: New Subnet Mask (wlan0): 255.255.255.0
Jun 26 15:56:38 mowa219-gjp4-8570p dhclient[5549]: New Broadcast Address (wlan0): 192.168.1.255
Jun 26 15:56:38 mowa219-gjp4-8570p dhclient[5553]: New Routers (wlan0): 192.168.1.1
Jun 26 15:56:39 mowa219-gjp4-8570p dhclient[5558]: New Routers (wlan0): 192.168.1.1
Jun 26 16:01:38 mowa219-gjp4-8570p dhclient[4094]: send_packet: Network is down
Jun 26 16:02:20 mowa219-gjp4-8570p syslogd: last message repeated 5 times
Jun 26 16:02:31 mowa219-gjp4-8570p syslogd: last message repeated 1 times
Jun 26 16:02:39 mowa219-gjp4-8570p dhclient[5878]: New IP Address (wlan0): 192.168.1.11
Jun 26 16:02:39 mowa219-gjp4-8570p dhclient[5882]: New Subnet Mask (wlan0): 255.255.255.0
Jun 26 16:02:39 mowa219-gjp4-8570p dhclient[5886]: New Broadcast Address (wlan0): 192.168.1.255
Jun 26 16:02:39 mowa219-gjp4-8570p dhclient[5890]: New Routers (wlan0): 192.168.1.1
Jun 26 16:02:40 mowa219-gjp4-8570p dhclient[5895]: New Routers (wlan0): 192.168.1.1
```

– however this is contradicted by output from `ifconfig wlan0`, which shows me wrongly connected again to BTWi-fi ☒


----------



## grahamperrin@ (Jun 26, 2021)

Phishfry said:


> How about you set PRIORITY in wpa_supplicant.conf …



Done, then `ifconfig wlan0 down` and `ifconfig wlan0 up`

Again, /var/log/messages shows the required IP address *however* `ifconfig wlan0` shows the wrong network BTWi-fi without this address.


```
…
Jun 26 16:06:49 mowa219-gjp4-8570p dhclient[4094]: Interface wlan0 is down, dhclient exiting
Jun 26 16:06:49 mowa219-gjp4-8570p dhclient[4094]: connection closed
Jun 26 16:06:49 mowa219-gjp4-8570p dhclient[4094]: exiting.
Jun 26 16:07:01 mowa219-gjp4-8570p kernel: iwn0: iwn_read_firmware: ucode rev=0x12a80601
Jun 26 16:07:02 mowa219-gjp4-8570p kernel: wlan0: link state changed to UP
Jun 26 16:08:03 mowa219-gjp4-8570p dhclient[6225]: New IP Address (wlan0): 192.168.1.11
Jun 26 16:08:03 mowa219-gjp4-8570p dhclient[6229]: New Subnet Mask (wlan0): 255.255.255.0
Jun 26 16:08:03 mowa219-gjp4-8570p dhclient[6233]: New Broadcast Address (wlan0): 192.168.1.255
Jun 26 16:08:03 mowa219-gjp4-8570p dhclient[6237]: New Routers (wlan0): 192.168.1.1
Jun 26 16:08:04 mowa219-gjp4-8570p dhclient[6242]: New Routers (wlan0): 192.168.1.1
```


----------



## grahamperrin@ (Jun 26, 2021)

I discovered one cause of recent problems (I'll add details to this post) however this one can not explain prior problems …


----------



## Samuel Venable (Jun 26, 2021)

That is correct, I was using 13.0-RELEASE and edited the wpa_supplicant.conf manually. Of course, it was initially setup automatically by FreeBSD installer, however all I did was backspace the quoted ssid and psk for security reasons when producing the VM, then I simply re-entered that information and that's when `service netif restart` stopped working.


----------



## grahamperrin@ (Jun 26, 2021)

Thanks, 



Samuel Venable said:


> … `service netif restart` stopped working.



– in what way, exactly? Do you get an internet address but not the required routing?


----------



## grahamperrin@ (Jun 26, 2021)

Interesting …

2021-06-26 17:18:04

one of the two BSSIDs for _piano_ was not listed, neither were the open networks




2021-06-26 17:19:39

I added the generated PSK to the one BSSID that was listed



The *Save and Reconnect* button is error-prone: 




closure of the dialogue is followed by closure of the application.
2021-06-26 17:21:42

after reopening the application, both BSSIDs for _piano_ were listed
just one BTWi-fi listing (fewer than earlier)




2021-06-26 17:22:58

the *WiFi Up/Down* button resulted in partial success – connection to one of the BSSIDs for _piano_



When Wi-Fi alone was used, there remained the name resolution problem:


```
root@mowa219-gjp4-8570p:~ # resolvconf -u
root@mowa219-gjp4-8570p:~ # cat /etc/resolv.conf
# Generated by resolvconf

root@mowa219-gjp4-8570p:~ #
```


----------



## grahamperrin@ (Jun 26, 2021)

grahamperrin said:


> Problems were first observed whilst using n247326-2349cda44fe. Updating to n247565-b49ba74deeb has not resolved the situation.



Reproducible at a separate computer with FreeBSD 13.0-RELEASE-p2.

_Without_ `NOAUTO`, at system startup time there's connection to the one and only network that's specified in /etc/wpa_supplicant.conf ☑

`NOAUTO` at startup followed by `ifconfig wlan0 up` results in connection to unwanted open network BTWi-fi ☒


Cross reference <https://discord.com/channels/727023752348434432/815117353616408577/858392318755602442> "should I report a bug?"


----------



## Samuel Venable (Jun 26, 2021)

grahamperrin said:


> Thanks,
> 
> 
> 
> – in what way, exactly? Do you get an internet address but not the required routing?


Normally it says no link...........got link. Or no link.......giving up. Now it's doing neither but it seems to print everything else and there's no connection. I'm not able to install packages or ping google.com or anything else that needs internet.


----------



## grahamperrin@ (Jun 26, 2021)

Samuel Venable said:


> I'm not able to install packages or ping google.com or anything else that needs internet.



For now, try: 

install net-mgmt/wifimgr
run `wifimgr` as a normal user
at the GUI prompt, enter the password for root
if there are multiple listings for the required network, paste the PSK into each listing
click *Save and Reconnect*
expect untimely closure instead of reconnection (a bug, presumably)
reopen the application
click *WiFi Up/Down*


----------



## Samuel Venable (Jun 27, 2021)

grahamperrin said:


> For now, try:
> 
> install net-mgmt/wifimgr
> run `wifimgr` as a normal user
> ...


I would if i had internet on this thing. lel


----------



## jmos (Jun 27, 2021)

grahamperrin said:


> `NOAUTO` at startup followed by `ifconfig wlan0 up` results in connection to unwanted open network BTWi-fi ☒


What happens if you're using `service netif (re)start` instead?


----------



## grahamperrin@ (Jun 27, 2021)

jmos said:


> … `service netif (re)start` instead?



Most recently:

`wlan0` association to the required network
I took down `em0`
the network was down for ping(8) – half-expected, given steps 1 and 2
nothing subsequently done resulted in `wlan0` becoming useful (again, I could not get what I needed from `resolvconf -u`)
I brought up `em0` to regain use of the Internet
– condensed results below.

I'll restart the OS, I half-expect quite different results.


```
root@mowa219-gjp4-8570p:~ # ifconfig wlan0
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether …
        inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
        groups: wlan
        ssid "" channel 36 (5180 MHz 11a ht/40+)
        regdomain ETSI country GB authmode OPEN privacy OFF txpower 17
        bmiss 10 mcastrate 6 mgmtrate 6 scanvalid 60 ampdulimit 8k
        ampdudensity 4 -amsdutx amsdurx shortgi -stbc -ldpc -uapsd wme
        parent interface: iwn0
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@mowa219-gjp4-8570p:~ # ifconfig wlan0 destroy
root@mowa219-gjp4-8570p:~ # service netif start wlan0
Created wlan(4) interfaces: wlan0.
Starting wpa_supplicant.
Starting dhclient.
wlan0: no link .............. giving up
/etc/rc.d/dhclient: WARNING: failed to start dhclient
Starting Network: wlan0.
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether …
        groups: wlan
        ssid "" channel 36 (5180 MHz 11a ht/40+)
        regdomain ETSI country GB authmode WPA2/802.11i privacy ON
        deftxkey UNDEF txpower 17 bmiss 10 mcastrate 6 mgmtrate 6 scanvalid 60
        ampdulimit 8k ampdudensity 4 -amsdutx amsdurx shortgi -stbc -ldpc
        -uapsd wme roaming MANUAL
        parent interface: iwn0
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@mowa219-gjp4-8570p:~ # ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether …
        inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
        groups: wlan
        ssid piano channel 1 (2412 MHz 11g) bssid …
        regdomain ETSI country GB authmode WPA2/802.11i privacy ON
        deftxkey UNDEF TKIP 2:128-bit txpower 30 bmiss 10 scanvalid 60
        protmode CTS wme roaming MANUAL
        parent interface: iwn0
        media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@mowa219-gjp4-8570p:~ # ifconfig em0 down
root@mowa219-gjp4-8570p:~ # ping -4 forums.freebsd.org
PING forums.freebsd.org (204.109.59.195): 56 data bytes
ping: sendto: Network is down
ping: sendto: Network is down
ping: sendto: Network is down
^C
--- forums.freebsd.org ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
root@mowa219-gjp4-8570p:~ #
```

dhclient(8) | ifconfig(8) | resolvconf(8)


----------



## grahamperrin@ (Jun 27, 2021)

Samuel Venable said:


> … would my time be better spent at this point figuring out why my wifi still isn't working, …



I reckon so, but do whatever makes you happy 



Samuel Venable said:


> I would if i had internet on this thing. …



Ah. Is that thing a physical machine (not virtual) with no wired alternative to wireless?


----------



## grahamperrin@ (Jun 27, 2021)

grahamperrin said:


> I'll restart the OS, I half-expect quite different results.



Much the same as before the most recent restart of the OS:

I do get a connection to the required SSID*‡*
I can not get resolution of names.

*‡* Maybe relevant: at the time of writing, only one of the three unwanted BTWi-fi networks is seen by wifimgr(8).


----------



## grahamperrin@ (Jun 27, 2021)

grahamperrin said:


> The *Save and Reconnect* button is error-prone:








						256858 – net-mgmt/wifimgr: Cannot reset interface wlan0 - exit status 2.
					






					bugs.freebsd.org


----------



## grahamperrin@ (Jun 27, 2021)

jmos said:


> … `service netif (re)start` instead?



With FreeBSD 13.0-RELEASE-p2 and re(4) automatically up when the system started, I ran:

`ifconfig re0 down`
`service netif start wlan0`
Result:


```
Jun 27 09:44:06 mowa219-gjp4-ev631-freebsd-13 login[1004]: ROOT LOGIN (root) ON ttyv1
Jun 27 09:44:31 mowa219-gjp4-ev631-freebsd-13 dhclient[528]: My address (192.168.2.34) was deleted, dhclient exiting
Jun 27 09:44:32 mowa219-gjp4-ev631-freebsd-13 dhclient[528]: connection closed
Jun 27 09:44:32 mowa219-gjp4-ev631-freebsd-13 dhclient[528]: exiting.
Jun 27 09:44:36 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1111]: Successfully initialized wpa_supplicant
Jun 27 09:44:36 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1111]: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument
Jun 27 09:44:36 mowa219-gjp4-ev631-freebsd-13 syslogd: last message repeated 1 times
Jun 27 09:44:36 mowa219-gjp4-ev631-freebsd-13 kernel: iwn0: iwn_read_firmware: ucode rev=0x08530501
Jun 27 09:45:39 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1112]: wlan0: Trying to associate with 58:⋯:⋯:⋯:⋯:a4 (SSID='piano' freq=2412 MHz)
Jun 27 09:45:39 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1112]: Failed to add supported operating classes IE
Jun 27 09:45:39 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1112]: wlan0: Associated with 58:⋯:⋯:⋯:⋯:a4
Jun 27 09:45:39 mowa219-gjp4-ev631-freebsd-13 kernel: wlan0: link state changed to UP
Jun 27 09:45:39 mowa219-gjp4-ev631-freebsd-13 dhclient[1187]: send_packet: No buffer space available
Jun 27 09:45:40 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1112]: wlan0: WPA: Key negotiation completed with 58:⋯:⋯:⋯:⋯:a4 [PTK=CCMP GTK=TKIP]
Jun 27 09:45:40 mowa219-gjp4-ev631-freebsd-13 wpa_supplicant[1112]: wlan0: CTRL-EVENT-CONNECTED - Connection to 58:⋯:⋯:⋯:⋯:a4 completed [id=0 id_str=]
Jun 27 09:45:49 mowa219-gjp4-ev631-freebsd-13 dhclient[1199]: New IP Address (wlan0): 192.168.1.5
Jun 27 09:45:49 mowa219-gjp4-ev631-freebsd-13 dhclient[1203]: New Subnet Mask (wlan0): 255.255.255.0
Jun 27 09:45:49 mowa219-gjp4-ev631-freebsd-13 dhclient[1207]: New Broadcast Address (wlan0): 192.168.1.255
Jun 27 09:45:49 mowa219-gjp4-ev631-freebsd-13 dhclient[1211]: New Routers (wlan0): 192.168.1.1
```

The link state is up, with the required access point, but things are not entirely up:


```
root@mowa219-gjp4-ev631-freebsd-13:/var/log # ping -4 forums.freebsd.org
PING forums.freebsd.org (204.109.59.195): 56 data bytes
ping: sendto: Network is down
ping: sendto: Network is down
ping: sendto: Network is down
^C
--- forums.freebsd.org ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
root@mowa219-gjp4-ev631-freebsd-13:/var/log #
```

How can I get the network up?

*Postscript*

I created a separate topic: 









						Wi-Fi: rc.conf(5) NOAUTO, service(8) netif start wlan0 and resolvconf(8) after disconnecting from a wired network
					

FreeBSD 13.0-RELEASE-p3 starts with a wired connection to a Belkin router.  re(4)  service netif start wlan0 gains the required address from the required wireless router, using DHCP.  I disconnect the network cable, interface re0 disappears, I'm left with the /etc/resolv.conf that was generated...




					forums.freebsd.org


----------



## Samuel Venable (Jun 27, 2021)

I can check out the wifi issue some more, i was initially partial to the other thing because I thought you wanted that a bit more. Now that I know otherwise, I'm going to submit a bug report later today and see what they say regarding the wifi.


grahamperrin said:


> Ah. Is that thing a physical machine (not virtual) with no wired alternative to wireless?


Actually both. I have it written to a bootable mircosd card running natively on my HP Laptop as well as a Virtual Machine running on my Mac Mini (the latest Intel one built this year). I can check out what happens when having it wired.


----------



## grahamperrin@ (Jul 3, 2021)

Samuel Venable hi, any news about Wi-Fi in your case? 

If you'd like to try a build of net-mgmt/wifimgr from ports, bug 256858 is fixed but <https://www.freshports.org/net-mgmt/wifimgr/#packages> 1.16 is not yet packaged. (I'm building for myself now, on two machines. I might be able to share a package for 13.0-RELEASE-p3 before the end of the day.)


----------



## Samuel Venable (Jul 6, 2021)

I would try that but I'm having trouble with a wired connection also. My laptop is plugged in to my router and I followed some instructions I read on stack exchange, also tried what I found here, which basically states the same thing: https://www.serverlab.ca/tutorials/unix/how-to-set-static-ip-and-dhcp-in-freebsd/ not sure how I can go much further in this process without internet as I have the ports tree but when I tried running make on the wifi manager it seems that needs internet as well.


----------



## Jaekelsson (Jul 6, 2021)

At home FreeBSD 13 broke 2 laptops wifi.
They were working well with 12.2.

Had to change *scan_ssid=0* to *scan_ssid=1* in /etc/wpa_supplicant.conf to make wifi work on these 2 laptops.
Had problem with ath0 driver in this case. No problem with rtwn0 driver.

Maybe you can try this small change in /etc/wpa_supplicant.conf.


```
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
ssid="Livebox-XXXXXX"
scan_ssid=1
psk="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
priority=5
}
network={
    priority=0
    key_mgmt=NONE
}
```


----------



## grahamperrin@ (Jul 6, 2021)

Samuel Venable said:


> … trouble with a wired connection also.



I'll broaden the subject line.



Samuel Venable said:


> My laptop is plugged in to my router …



Is the router set to use DHCP for wired service?


----------



## grahamperrin@ (Jul 8, 2021)

I can no longer connect to eduroam


----------



## grahamperrin@ (Aug 17, 2021)

grahamperrin said:


> I can no longer connect to eduroam



From iwn(4): 


```
Alternatively, to load the driver as a module at boot time, place the
     following lines in loader.conf(5):

           if_iwn_load="YES"
           iwn1000fw_load="YES"
           iwn100fw_load="YES"
           iwn105fw_load="YES"
           iwn135fw_load="YES"
           iwn2000fw_load="YES"
           iwn2030fw_load="YES"
           iwn4965fw_load="YES"
           iwn5000fw_load="YES"
           iwn5150fw_load="YES"
           iwn6000fw_load="YES"
           iwn6000g2afw_load="YES"
           iwn6000g2bfw_load="YES"
           iwn6050fw_load="YES"
```

I suspect that some of my problems were caused by those fourteen lines. 

Weird, because my problems were never at (or near) boot time.


----------

