iwlwifi on BSD

Help with setting up network cards, including WiFi cards.
epsheldoni
Posts: 19
Joined: Wed Jan 23, 2019 1:58 pm

iwlwifi on BSD

Post by epsheldoni »

I saw on Telegram that Eric has gotten the iwlwifi driver available for GhostBSD. I have a Ryzen 5700G motherboard that uses the
iwlwifi driver on Linux. On GhostBSD and FreeBSD, dmesg does not detect the wifi. How does one get wifi working on BSD?
User avatar
ericbsd
Developer
Posts: 2116
Joined: Mon Nov 19, 2012 7:54 pm

Re: iwlwifi on BSD

Post by ericbsd »

You will need to run on the latest build.

Code: Select all

> ghostbsd-version
22.01.26
You can manually load the driver to test.

Code: Select all

sudo kldload if_iwlwifi
A sysctl net.wlan.devices should now list iwlwifi0.

Do not load it from /boot/loader.conf but form kld_list in /etc/rc.conf .

Code: Select all

sudo sysrc  kld_list+="if_iwlwifi"
At the moment, that driver does not look to load automatically with devmatch.

The following need to be added to /etc/rc.conf to have it working.

Code: Select all

wlans_iwlwifi0="wlan0"
ifconfig_wlan0="WPA DHCP"
Once the driver is loaded, it might be detected by networkmgr automation, but I have not tested that yet.
epsheldoni
Posts: 19
Joined: Wed Jan 23, 2019 1:58 pm

Re: iwlwifi on BSD

Post by epsheldoni »

Eric, thank you so much for your quick reply.
I have been able to get the iwlwifi module loaded via /etc/rc.conf.
sysctl net.wlan.devices does list iwlwifi0. ifconfig -a does not show iwlwifi0, only igb0 and lo0.
I remembered from my laptop that I needed to put the following in /etc/rc.conf
wlans_iwlwifi0="wlan0"
ifconfig_wlan0="WPA DHCP".
I also had to set up wpa_supplicant.conf in /etc as well.
After a reboot, I still do not get iwlwifi0 showing up in ifconfig -a.
I am stumped. I will continue working on this tomorrow.
Again, thanks for all your hard work.
User avatar
ericbsd
Developer
Posts: 2116
Joined: Mon Nov 19, 2012 7:54 pm

Re: iwlwifi on BSD

Post by ericbsd »

There is automation missing for iwlwifi.

If you do sudo service netif restart it should work.

I will try to do an update as soon as possible for iwlwifi automation in /etc/devd.conf.
epsheldoni
Posts: 19
Joined: Wed Jan 23, 2019 1:58 pm

Re: iwlwifi on BSD

Post by epsheldoni »

Eric, doing a sudo service netif restart WORKS!
Thank you! Now, I'll look into what Fred Finster posted on Telegram.

Thanks again
RodMyers
Posts: 87
Joined: Sat Nov 27, 2021 8:16 pm

Re: iwlwifi on BSD

Post by RodMyers »

followed the above instructions, still no WiFI.

this what I seem in dmesg;

iwlwifi0: <iwlwifi> mem 0x9133c000-0x9133ffff at device 20.3 on pci0
iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-67.ucode'
iwlwifi0: File size way too small!
iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-66.ucode'
iwlwifi0: File size way too small!
iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-65.ucode'
iwlwifi0: File size way too small!


I've also rebooted twice as well.

pciconf -lv

iwlwifi0@pci0:0:20:3: class=0x028000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x02f0 subvendor=0x8086 subdevice=0x4070
vendor = 'Intel Corporation'
device = 'Comet Lake PCH-LP CNVi WiFi'
class = network
User avatar
ericbsd
Developer
Posts: 2116
Joined: Mon Nov 19, 2012 7:54 pm

Re: iwlwifi on BSD

Post by ericbsd »

RodMyers wrote: Fri Jan 28, 2022 5:55 pm followed the above instructions, still no WiFI.

this what I seem in dmesg;

iwlwifi0: <iwlwifi> mem 0x9133c000-0x9133ffff at device 20.3 on pci0
iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-67.ucode'
iwlwifi0: File size way too small!
iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-66.ucode'
iwlwifi0: File size way too small!
iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-65.ucode'
iwlwifi0: File size way too small!
I saw the same thing with the following.

Code: Select all

sudo sysrc -f /boot/loader.conf if_iwlwifi_load=YES
It only works with this:

Code: Select all

sudo sysrc kld_list+=if_iwlwifi
epsheldoni
Posts: 19
Joined: Wed Jan 23, 2019 1:58 pm

Re: iwlwifi on BSD

Post by epsheldoni »

My dmesg shows the following:

sheldoni@Ryzen-5700G-ghostbsd-box ~> dmesg | grep iwlwifi
iwlwifi0: <iwlwifi> mem 0xfc600000-0xfc603fff irq 28 at device 0.0 on pci6
iwlwifi0: successfully loaded firmware image 'iwlwifi-cc-a0-67.ucode'
iwlwifi0: api flags index 2 larger than supported by driver
iwlwifi0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
iwlwifi0: loaded firmware version 67.8f59b80b.0 cc-a0-67.ucode op_mode iwlmvm
iwlwifi0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340
iwlwifi0: Detected RF HR B3, rfid=0x10a100
iwlwifi0: base HW address: 68:54:5a:55:9f:e2
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 1/2412/0/0/0/0 returned error 55
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 36/5180/0/0/0/0 returned error 55
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 queues to be allocated by driver

I also notice that in my /boot/kernel/ directory, I do not have
iwlwifi-QuZ-a0-hr-b0-66.ucode, or
iwlwifi-QuZ-a0-hr-b0-65.ucode

I'm not sure what that implies.
epsheldoni
Posts: 19
Joined: Wed Jan 23, 2019 1:58 pm

Re: iwlwifi on BSD

Post by epsheldoni »

With the latest update today, iwlwifi starts up on boot.
Good job Eric!
User avatar
ericbsd
Developer
Posts: 2116
Joined: Mon Nov 19, 2012 7:54 pm

Re: iwlwifi on BSD

Post by ericbsd »

I added the iwlwifi in devd.conf to set up and start at boot.

The driver is not perfect, but it is a start in the right direction.
Post Reply