# A guide for intel wireless adapter AC 9260 and 9560 driver installation on Freebsd 12.1



## Raffeale (Mar 14, 2020)

look this thread
https://forums.freebsd.org/threads/i-cant-find-any-wlan0-interface-with-ifconfig.73899
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227044
https://www.intel.com/content/www/u...5511/network-and-i-o/wireless-networking.html

you need checkout svn code from svn.freebsd.org like this:
*svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/ 
and copy it to /usr/src/sys/dev/iwm   (overwrite it)

you need download this Makefile to /usr/src/sys/modules/iwm/  (overwrite orgrinal Makefile file)
https://svnweb.freebsd.org/base/stable/12/sys/modules/iwm/Makefile?view=co

you need download intel wireless adapter firmware from following link.*
_for ac9560 download this_* https://wireless.wiki.kernel.org/_media/en/users/drivers/iwlwifi-9000-pu-b0-jf-b0-34.618819.0.tgz*
_for ac9260 download this_* https://wireless.wiki.kernel.org/_media/en/users/drivers/iwlwifi-9260-th-b0-jf-b0-34.618819.0.tgz*

https://www.intel.com/content/www/u...5511/network-and-i-o/wireless-networking.html
Download: [Intel® Wireless-AC 9260](iwlwifi-9260-th-b0-jf-b0-34.618819.0.tgz]

```
# tar -xf iwlwifi-*.tgz
# cd ./iwlwifi-9xxx*/

For ac9260   # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-43.fw.uu
# mv iwm-9260-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560  # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu
```


add these lines to /usr/src/sys/conf/files at 2015 line (below iwm8265fw.fwo )
* for AC9260*

```
iwm9260.fw                      optional iwm9260fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9260-43.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9260.fw"
iwm9260fw.c                     optional iwm9260fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9260.fw:iwm9260fw -miwm9260fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9260fw.c"
iwm9260fw.fwo                   optional iwm9260fw | iwmfw              \
        dependency      "iwm9260.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9260fw.fwo"
```

_*For AC9560*_

```
iwm9000.fw                      optional iwm9000fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9000-43.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9000.fw"
iwm9000fw.c                     optional iwm9000fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9000.fw:iwm9000fw -miwm9000fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9000fw.c"
iwm9000fw.fwo                   optional iwm9000fw | iwmfw              \
        dependency      "iwm9000.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9000fw.fwo"
```


change 'iwm9000_cfg' to 'iwm_9560_cfg' in /usr/src/sys/dev/iwm/if_iwm_config.h
orginal content is "extern const struct iwm_cfg iwm9000_cfg;"

```
extern const struct iwm_cfg iwm9560_cfg;
```

download Makefile  from this link
For ac9260  https://svnweb.freebsd.org/base/sta...fw/iwm9260fw/Makefile?revision=354201&view=co and copy it to /usr/src/sys/modules/iwmfw/iwm9260fw/
for ac9560 https://svnweb.freebsd.org/base/sta...fw/iwm9000fw/Makefile?revision=354201&view=co  and copy it to /usr/src/sys/modules/iwmfw/iwm9000fw/

*install firmware for ac9260*

```
# cd /usr/src/sys/modules/iwmfw/iwm9260fw
# make clean all install
==> /boot/modules/iwm9260fw.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
# kldload /boot/modules/iwm9260fw.ko
# kldload /boot/modules/if_iwm.ko
```


*install firmware for ac9560*

```
#mkdir /usr/src/sys/modules/iwmfw/iwm9000fw
# cd /usr/src/sys/modules/iwmfw/iwm9000fw
# make clean all install
==> /boot/modules/iwm9000fw.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/iwm.ko

# kldload /boot/modules/iwm9000fw.ko
# kldload /boot/modules/if_iwm.ko
```


*install wpa_supplicant*

```
#pkg install wpa_supplicant
```

configure your wpa_supplicant
your /etc/wpa_supplicant.conf should like this.

```
network={
    ssid="YourWifiRouter SSID"
    bssid=xx:xx:xx:xx:xx:xx  #your wifirouter bssid
    key_mgmt=WPA-PSK
    proto=RSN
    psk="password"
}
```
*if you really don't know how to setup it, you could use wifimgr to do it in xwindow
install wifimgr
#pkg install wifimgr

add option in /etc/rc.conf*

```
wpa_supplicant_program="/usr/local/sbin/wpa_supplicant"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
```
*add auto load kernel module in loader.conf*


```
if_iwm_load="YES"

iwm9260fw_load="YES"  ### for ac9260
iwm9000fw_load="YES" ### for ac9560
legal.intel_iwi.license_ack=1
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```

*restart your laptop now , you will find wlan0 interface with ifconfig

if  you load module successfully , you could find some message with dmesg like this*

_*iwm0: <Intel(R) Dual Band Wireless AC 9260> mem 0xf0800000-0xf0803fff at device 0.0 on pci2
iwm0: hw rev 0x320, fw ver 34.0.0, address xx:xx:xx:xx:xx:xx*_


*note: 
1.if you are running  in securelevel , you can't load kernel by kldload , you need load it in loader.conf
2.sometime , the directory is not exist in /usr/src/sys so you need to make it with mkdir by hand*


----------



## userxbw (Mar 14, 2020)

I needed to change that svn web address to

*svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/ *

Take out the web part of svnweb.


```
$ svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/
A    iwm/if_iwm_8000.c
A    iwm/if_iwm_phy_db.h
A    iwm/if_iwm_9000.c
A    iwm/if_iwm_config.h
A    iwm/if_iwm_pcie_trans.h
A    iwm/if_iwm_fw.h
A    iwm/if_iwm_7000.c
A    iwm/if_iwm_notif_wait.h
A    iwm/if_iwm.c
A    iwm/if_iwm_binding.c
A    iwm/if_iwm_binding.h
A    iwm/if_iwm_constants.h
A    iwm/if_iwm_fw.c
A    iwm/if_iwm_led.c
A    iwm/if_iwm_led.h
A    iwm/if_iwm_mac_ctxt.c
A    iwm/if_iwm_mac_ctxt.h
A    iwm/if_iwm_phy_ctxt.c
A    iwm/if_iwm_phy_ctxt.h
A    iwm/if_iwm_power.c
A    iwm/if_iwm_power.h
A    iwm/if_iwm_scan.c
A    iwm/if_iwm_scan.h
A    iwm/if_iwm_sf.c
A    iwm/if_iwm_sf.h
A    iwm/if_iwm_sta.c
A    iwm/if_iwm_sta.h
A    iwm/if_iwm_time_event.c
A    iwm/if_iwm_time_event.h
A    iwm/if_iwm_util.c
A    iwm/if_iwm_util.h
A    iwm/if_iwmreg.h
A    iwm/if_iwmvar.h
A    iwm/if_iwm_9260.c
A    iwm/if_iwm_pcie_trans.c
A    iwm/if_iwm_debug.h
A    iwm/if_iwm_phy_db.c
A    iwm/if_iwm_notif_wait.c
Checked out revision 358994.
```


----------



## userxbw (Mar 14, 2020)

there was no dir
/usr/src/sys/modules/iwmfw/iwm9260fw/
/usr/src/sys/modules/iwmfw/iwm9000fw/

so I made them copied the respective Makefile into each one. on the first one. 9260
# make clean all install
it came back with
I don't know how to make iwm-9260-34.fw.uu

so I am back in Linux posting this..




this is the 9000


----------



## Raffeale (Mar 14, 2020)

# tar -xf iwlwifi-*.tgz
# cd ./iwlwifi-9xxx*/

For ac9260   # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560  # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-34.fw.uu
# mv iwm-9000-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-34.fw.uu

look at this, you need download firmware from intel website,  I have already written it in the first thread . look at it carefully


----------



## userxbw (Mar 14, 2020)

Raffeale said:


> # tar -xf iwlwifi-*.tgz
> # cd ./iwlwifi-9xxx*/
> 
> For ac9260   # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
> ...


I did that part too .. I'll redo it from the start again. I just copied them over not moved so I still have them in there dir.

if you look closley at the images 2nd one you'll see the tarballs and there dir in there


----------



## Raffeale (Mar 15, 2020)

I’m really sorry,it’s my fault,I will fix this problem. Wait a minute


----------



## Raffeale (Mar 15, 2020)

For ac9560  # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu

this step has an issue , the firmware name not correct, change  iwm-9000-34.fw.uu to iwm-9000-43.fw.uu  in /usr/src/sys/contrib/dev/iwm

and add some lines to /usr/src/sys/conf/files, i have already update the first thread. look at it, insert those lines  at 2015 line (below iwm8265fw.fwo last line)


----------



## userxbw (Mar 15, 2020)

No...
I got the same issue with 
*For ac9260   # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu*
that was posted in the images same error, I changed that to
*For ac9260   # b64encode -o iwm-9260-43.fw.uu iwlwifi-9260-*.ucode iwm-9260-43.fw.uu*
that build the modue iwm9260fw.ko 

next step failed, see photo
did the change for 9000 one it build the modue but too, it failed on the second second step. see image




yes I changed the 'files' file as you stated to do so. the thing I do not understand is in that change it references the drivers as 
   dependency      "$S/contrib/dev/iwm/iwm-9260-34.fw.uu
but failed, when I changed that file to (43)    dependency      "$S/contrib/dev/iwm/iwm-9260-43.fw.uu
it built the module and installed it. with a mismatch in the number within the name.
dependency      "$S/contrib/dev/iwm/iwm-9000-34.fw.uu" 

it says 34 but 43 works
this I too think is a misprint (typo)
For ac9560  # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
I used this to redo it then it build that module

For ac9560  # b64encode -o iwm-9000-43.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu

having 43 on both mentions of the name. 

so I am stuck again at the second step for both 9260 and 9000.


----------



## Raffeale (Mar 16, 2020)

yes ,your kernel firmware have alreay built sucessfully. i will find out the issue and test it . wait for a mininute!
cat your iwm Makfile and ls /usr/src/sys/dev/iwm


----------



## userxbw (Mar 16, 2020)

there is ni make file in there.
look ar post #2
*svn checkout https://svn.freebsd.org/base/stable/12/sys/dev/iwm/*

you will see everything that gave me. 

this makefile is for  for the 2nd stage in this process

# cd /usr/src/sys/modules/iwm
# make install
==> /boot/modules/if_iwm.ko


/usr/src/sys/modules/iwm/Makefile

```
# $FreeBSD$

.PATH:  ${SRCTOP}/sys/dev/iwm

KMOD=    if_iwm
# Main driver
SRCS=    if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c
SRCS+=    if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c
SRCS+=    if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c
SRCS+=    if_iwm_7000.c if_iwm_8000.c if_iwm_9000.c if_iwm_fw.c if_iwm_9260.c
SRCS+=    if_iwm_sta.c if_iwm_sf.c
# bus layer
SRCS+=    if_iwm_pcie_trans.c
SRCS+=    device_if.h bus_if.h pci_if.h opt_wlan.h opt_iwm.h

CFLAGS+= -DIWM_DEBUG

.include <bsd.kmod.mk>
```


----------



## Raffeale (Mar 16, 2020)

change 'iwm9000_cfg' to 'iwm_9560_cfg' in /usr/src/sys/dev/iwm/if_iwm_config.h
orginal content is "extern const struct iwm_cfg iwm9000_cfg;"

```
extern const struct iwm_cfg iwm9560_cfg;
```
and then compile iwm , i have alread compiled it sucessfully!


----------



## userxbw (Mar 16, 2020)

Raffeale said:


> change 'iwm9000_cfg' to 'iwm_9560_cfg' in if_iwm_config.h
> orginal content is "extern const struct iwm_cfg iwm9000_cfg;"
> 
> ```
> ...


grep'ed them in linux .. figured I'd just change it in there then move it over from one laptop to the freebsd laptop. easier to modify like that. , but I'm coming up empty for anything in iwm for either one.

```
bash-5.0# grep -rwn iwm -e iwm9000_cfg
bash-5.0# grep -rwn iwm -e iwm_9560_cfg
bash-5.0#
```

i did find the defs for extern

```
/*
* This list declares the config structures for all devices.
*/
extern const struct iwm_cfg iwm7260_cfg;
extern const struct iwm_cfg iwm3160_cfg;
extern const struct iwm_cfg iwm3165_cfg;
extern const struct iwm_cfg iwm3168_cfg;
extern const struct iwm_cfg iwm7265_cfg;
extern const struct iwm_cfg iwm7265d_cfg;
extern const struct iwm_cfg iwm8260_cfg;
extern const struct iwm_cfg iwm8265_cfg;
extern const struct iwm_cfg iwm9560_cfg;
extern const struct iwm_cfg iwm9260_cfg;

#endif /* __IWM_CONFIG_H__ */
```

let me go boot the other laptop into freebsd and look to see what that one has.
it is the same, so i do  not know what you did;.

-----
do not know how to make device_if.h

I did a
find / -type f -name device_if.h
and came up empty no file found on system.

I do not know what file is telling it to use that device_if.h  to go look in  to that file ....


----------



## Raffeale (Mar 16, 2020)

i didn't find device_if.h in my laptop , i think that file is  generated automaticlly.
but  i could compile iwm without any issuse, which freebsd version is your?
my freebsd is 12.1 stable.
FreeBSD Raffeale 12.1-RELEASE FreeBSD 12.1-RELEASE GENERIC  amd64
i use a custom kernel


----------



## userxbw (Mar 16, 2020)

Raffeale said:


> i didn't find device_if.h in my laptop , i think that file is  generated automaticlly.
> but  i could compile iwm without any issuse, which freebsd version is your?
> my freebsd is 12.1 stable.
> FreeBSD Raffeale 12.1-RELEASE FreeBSD 12.1-RELEASE GENERIC  amd64
> i use a custom kernel


12.1-RELEASE

uname -a is in post #3 on the bottom of the 1st image to see everything


----------



## Raffeale (Mar 16, 2020)

may be this is the issuse , i think you should check out from here ,
https://svnweb.freebsd.org/base/release/12.1.0/sys/


----------



## userxbw (Mar 16, 2020)

Raffeale said:


> may be this is the issuse , i think you should check out from here ,
> https://svnweb.freebsd.org/base/release/12.1.0/sys/


ok .. give me a minute.

yeah okay i see the diss 12 / 12.1 makes since. I wasn't even paying attention -- blind obedience is a sin
it is pulling  lot of stuff. just take the iwm dir ???? right ???

if i see one


----------



## userxbw (Mar 16, 2020)

I'll get back into to this tomorrow it is late here. thanks for you help


----------



## Raffeale (Mar 16, 2020)

yes ,checkout iwm dir ,and try again.\
you are welcome!


----------



## Raffeale (Mar 16, 2020)

userxbw said:


> I'll get back into to this tomorrow it is late here. thanks for you help


you can try to remove the device_if.h from Makefile . i dont know whether it will work


----------



## userxbw (Mar 16, 2020)

argggg,
I reinstalled for a fresh start.

For ac9260   # b64encode -o iwm-9260-34.fw.uu iwlwifi-9260-*.ucode iwm-9260-34.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560  # b64encode -o iwm-9000-34.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu

didn't work
changed it to

For ac9260   # b64encode -o iwm-9260-43.fw.uu iwlwifi-9260-*.ucode iwm-9260-43.fw.uu
# mv iwm-9260-34.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9260-34.fw.uu

For ac9560  # b64encode -o iwm-9000-43.fw.uu iwlwifi-9000-*.ucode iwm-9000-43.fw.uu
# mv iwm-9000-43.fw.uu /usr/src/sys/contrib/dev/iwm/
==> /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu

that got compiled.

copied in new iwm from 12.1 changed if_iwm_conf.h added last line


```
/*
* This list declares the config structures for all devices.
*/
extern const struct iwm_cfg iwm7260_cfg;
extern const struct iwm_cfg iwm3160_cfg;
extern const struct iwm_cfg iwm3165_cfg;
extern const struct iwm_cfg iwm3168_cfg;
extern const struct iwm_cfg iwm7265_cfg;
extern const struct iwm_cfg iwm7265d_cfg;
extern const struct iwm_cfg iwm8260_cfg;
extern const struct iwm_cfg iwm8265_cfg;

#endif /* __IWM_CONFIG_H__ */
```

chaeged file

```
clean        "iwm8265fw.c"
iwm8265fw.fwo            optional iwm8265fw | iwmfw        \
    dependency    "iwm8265.fw"                    \
    compile-with    "${NORMAL_FWO}"                    \
    no-implicit-rule                        \
    clean        "iwm8265fw.fwo"
iwm9260.fw                      optional iwm9260fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9260-34.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9260.fw"
iwm9260fw.c                     optional iwm9260fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9260.fw:iwm9260fw -miwm9260fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9260fw.c"
iwm9260fw.fwo                   optional iwm9260fw | iwmfw              \
        dependency      "iwm9260.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9260fw.fwo"
iwm9000.fw                      optional iwm9000fw | iwmfw              \
        dependency      "$S/contrib/dev/iwm/iwm-9000-43.fw.uu" \
        compile-with    "${NORMAL_FW}"                                  \
        no-obj no-implicit-rule                                         \
        clean           "iwm9000.fw"
iwm9000fw.c                     optional iwm9000fw | iwmfw              \
        compile-with    "${AWK} -f $S/tools/fw_stub.awk iwm9000.fw:iwm9000fw -miwm9000fw -c${.TARGET}" \
        no-implicit-rule before-depend local                            \
        clean           "iwm9000fw.c"
iwm9000fw.fwo                   optional iwm9000fw | iwmfw              \
        dependency      "iwm9000.fw"                                    \
        compile-with    "${NORMAL_FWO}"                                 \
        no-implicit-rule                                                \
        clean           "iwm9000fw.fwo"
dev/iwn/if_iwn.c        optional iwn
iwn1000fw.c            optional iwn1000fw | iwnfw        \
```

this step

```
install firmware for ac9260
      
# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko
```
don't know how to make if_iwm_9000.c stop

/usr/src/sys/modules/iwm/Makefile

```
# $FreeBSD$

.PATH:  ${SRCTOP}/sys/dev/iwm

KMOD=    if_iwm
# Main driver
SRCS=    if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c
SRCS+=    if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c
SRCS+=    if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c
SRCS+=    if_iwm_7000.c if_iwm_8000.c if_iwm_9000.c if_iwm_fw.c if_iwm_9260.c
SRCS+=    if_iwm_sta.c if_iwm_sf.c
# bus layer
SRCS+=    if_iwm_pcie_trans.c
SRCS+=    device_if.h bus_if.h pci_if.h opt_wlan.h opt_iwm.h

CFLAGS+= -DIWM_DEBUG

.include <bsd.kmod.mk>
```


----------



## userxbw (Mar 16, 2020)

don't bother about this too much where I go for wifi is shutting down for two weeks due to the beer virus (coronavirus) the politically correct term is "social distancing"

I just got told so I am telling you so you don't go beating your brains out on this and get no replies  from me for two weeks.


----------



## Raffeale (Mar 16, 2020)

you will be okay, god bless you! everything will be okay! the virus can be cured , see you soon , where are you from? i'm from China, HaHa! i want to make friend with you!

this step is common , ac900 could use it as well.
# cd /usr/src/sys/modules/iwm
# make clean all install
 li==> /boot/modules/if_iwm.ko

did you compile it successfully?


----------



## userxbw (Mar 16, 2020)

Raffeale said:


> you will be okay, god bless you! everything will be okay! the virus can be cured , see you soon , where are you from? i'm from China, HaHa! i want to make friend with you!
> 
> this step is common , ac900 could use it as well.
> # cd /usr/src/sys/modules/iwm
> ...


make: make don't know how to make /usr/src/sys/contrib/dev/iwm/iwm-9000-43.fw.uu stop

in the files file it has that added ... _do not know what is doing what to what to even try to figure out what to do 

when I am trying to build _9260 
# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko
why it is trying to buile if_iwm_9000.c  make  says it does not know how to


----------



## userxbw (Mar 16, 2020)

this is getting to be ridiculous. this works then it doesn't then sometihng else is screws up .. blah blaha stop wasiting time I am fed up with this.


----------



## Raffeale (Mar 17, 2020)

In your photos which you uploaded ,it said firmware build finish,but building own has some issues,the device_if.h did not find.  Do you try to remove device_if.h from own Makefile?


----------



## fzfq3m (Mar 20, 2020)

Raffeale Thank you for this guide. I was able to get my wlan more or less working but some steps were needed (in my case)

From a fresh 12.1-RELEASE install

1.- I did a svnlite checkout from `releng/12.1` and according to `svnlite info /usr/src` I got revision 359156
2.- There wasn't a iwm9260fw folder inside /usr/src/sys/modules/iwmfw so I did a checkout from `stable/12` and then overwrote the content of /usr/src/sys/modules/iwmfw

After successfully compiling the modules and manually loading them the system recognized the card and attached the driver but  for some reason using  `if_iwm_load="YES"` in /boot/loader.conf will load the module from /boot/kernel instead of /boot/modules
`kldstat -v -n if_iwm.ko
Id Refs Address                Size Name
16    1 0xffffffff8361d000    15d20 if_iwm.ko (/boot/kernel/if_iwm.ko)
        Contains modules:
                 Id Name
                526 pci/iwm`

looks like I need to do some cleanup
`find / -iname if_iwm.ko
/boot/kernel.old/if_iwm.ko
/boot/modules/if_iwm.ko
/boot/kernel/if_iwm.ko`

anyway, I just added `kld_list="/boot/modules/if_iwm.ko"` to /etc/rc.conf and so far the card is automatically recognized and the corresponding firmware module /boot/modules/iwm9260fw.ko is also loaded. The card seem to be working.

Again, thanks for the guide

edit: I have checked the value of `module_path` and it appears to be correct...
`cat /boot/defaults/loader.conf | grep module_path=
module_path="/boot/modules;/boot/dtb;/boot/dtb/overlays"        # Set the module search path[CODE]`


----------



## Raffeale (Mar 20, 2020)

You are welcome,thanks for testing, remove the if_iwm.ko from kernel directory,   The guide has this step.


----------



## userxbw (Mar 23, 2020)

I just went and got me a different wifi card ...


----------



## userxbw (Mar 27, 2020)

I'm backkkkkk, 
i put a working wifi card in and finidhed installing a desktop and all of that stuff. then i just got to doing that driver again, and booted it up and it was giving me files not foound
legal.intel_iwi.license_ack=1 not foiund, commented it out and still not getting it in ifconfig. it was going me 

*iwmbt_fw_read: open: ibt-18-16-1.sfi : No such file or directory*




__





						244605 – iwmbtfw: iwmbt_fw_read: open: ibt-18-16-1.sfi : No such file or directory
					






					bugs.freebsd.org
				



that is for the Intel 9260AC Bluetools can't load. right? that that person posted on , and I am using the 9000 / 95xx one. still same message though.


----------



## Raffeale (Mar 27, 2020)

iwm module just for ac9260 and 9560 wireless card.it dont include Bluetooth,r u trying to install Bluetooth driver?
if iwm not work, try using kldload to load iwm and look at dmesg


----------



## fzfq3m (Mar 27, 2020)

Hi userxbw as indicated in Vladimir Kondratyev comment on that bug report, try installing iwmbt-firmware from ports. (I got iwmbt-firmware-20190717_1 installed)

I think you can check for bluetooth kernel messages with `dmesg |grep ng_ubt`

Now according to a bug report I found in Ubuntu's launchpad the firmware you need is called ibt-19-32-1.sfi which should be inside /usr/local/share/iwmbt-firmware/ after iwmbt-firmware gets installed, don't quote me on the name of the firmware though xD 

best regards
edit: *iwmbt_fw_read: open: ibt-18-16-1.sfi : No such file or directory* indicates that the system is trying to load that file... as I said previously the firmware should be inside /usr/local/share/iwmbt-firmware/ after iwmbt-firmware gets installed


----------



## userxbw (Mar 27, 2020)

Raffeale said:


> iwm module just for ac9260 and 9560 wireless card.it dont include Bluetooth,r u trying to install Bluetooth driver?
> if iwm not work, try using kldload to load iwm and look at dmesg


no that is just what was on that bug report for a reference to what is on it. still that message is the same  *iwmbt_fw_read: open: ibt-18-16-1.sfi : No such file or directory
kldload_iwm=yes ??*
in boot.conf or rc.conf

---
nope that did not work in either file, I just get that message on the boot screen.


----------



## fzfq3m (Mar 27, 2020)

userxbw said:


> no that is just what was on that bug report for a reference to what is on it. still that message is the same  *iwmbt_fw_read: open: ibt-18-16-1.sfi : No such file or directory
> kldload_iwm=yes ??*
> in boot.conf or rc.conf
> 
> ...



make sure the file exist `find /usr/local -iname "ibt-18-16-1.sfi"`
if that returns empty or nothing then you need to install iwmbt-firmware by using binary packages `pkg install iwmbt-firmware` or compile it from ports


----------



## userxbw (Mar 28, 2020)

fzfq3m said:


> make sure the file exist `find /usr/local -iname "ibt-18-16-1.sfi"`
> if that returns empty or nothing then you need to install iwmbt-firmware by using binary packages `pkg install iwmbt-firmware` or compile it from ports


oh I just checked for the absolute dir and it is not there.  let me go back  in when I get a chance and run find of the file itself.

iwmbt-firmware or compile it from ports will be from ports seeing how I got no more wifi or net work to it until I get this resolved.


----------



## userxbw (Mar 28, 2020)

yeah I found that  iwmbt-firmware in ports I run make  it it goes whooo I got something missing let me go get it, nope can't no connection out.

which makes me go stupid disto. I already downloaded ports extracted it updated it before changing the card out of my laptop, and still it does not have everything it needs to compile what is in it. ... where is the logic in that... sorry for wasting your time. for something out of my control.

right now, I really don't feel like swapping out that card each time until I get this thing to work on that one card it doesn't.


----------



## fzfq3m (Mar 29, 2020)

userxbw said:


> yeah I found that  iwmbt-firmware in ports I run make  it it goes whooo I got something missing let me go get it, nope can't no connection out.
> 
> which makes me go stupid disto. I already downloaded ports extracted it updated it before changing the card out of my laptop, and still it does not have everything it needs to compile what is in it. ... where is the logic in that... sorry for wasting your time. for something out of my control.
> 
> right now, I really don't feel like swapping out that card each time until I get this thing to work on that one card it doesn't.


My apologies, I thought you already got the wireless driver working for your intel 9560.

The wireless portion of the card should work without the bluetooth firmware installed, mine does work without the bluetooth firmware but I got a 9260AC...

I would say: ignore anything related to iwmbt and check if the wireless card is working, `ifconfig` and check if wlan0 is present... and might be `dmesg |grep iwm` and check if the driver is finding the card.

About the ports: Yeah it sucks but AFAIK this is due to licensing issues... the port is just a bunch of Makefiles and some stuff that tells the computer how to adquire the source code for the port and how to compile... but the source resides elsewhere... in case of iwmbt-firmware I think is downloaded directly from Intel's servers (don't quote me on that though... I could be wrong)

regards


----------



## userxbw (Mar 29, 2020)

now that I'm a bit sledded down I could try to find it download it in Linux and mount my partition and maybe go from there. where does it put the source, I could try slipping it in there and see if it picks it up from there then runs with it.

ifconfig comes up with just lo and nothing else. so yeah it is not picking it up on boot.


----------



## fzfq3m (Mar 29, 2020)

userxbw said:


> now that I'm a bit seddled down I could try to find it download it in linux and mount my parition and maybe go from there. where does it put the source, I could try slipping it in there and see if it picks it up from there then runs with it.


Let's forget about bluetooth for now... and focus the wireless thing. Please post the output of the following commands

`pciconf -lv`
`dmesg |grep iwm`
`kldstat -v -n if_iwm.ko`

the last command will tell us if iwm is loaded and the path from which is being loaded. My installation already had an old version of if_iwm.ko installed in /boot/kernel/ so I needed to explicitly load the one from `/boot/modules`


----------



## userxbw (Mar 29, 2020)

kldstat says no such file or directory, but when I ls the /boot/modules  it comes up /boot/modules/if_iwm.ko
dmesg grep comes up empty. 
pciconf -lv tells me I got a Wireless-AC 9260 ... wtf now I m feeling stupid. I think I got that what's needed on my linux side to copy over to FreeBSD


----------



## userxbw (Mar 29, 2020)

now its telling me it does not know how to make if_iwm_9000.c no matter which one I try to compile in /usr/src/sys/modules/iwm. I commwnted out the reference to 9000 95xx in config.h and the files file. and still it tells me the above.
everything else it set for that 9260 if_iwm.ko is in /boot/modules and kldstat says no such file or directory.

 this thing is cursed.


----------



## fzfq3m (Mar 29, 2020)

if the module exist but is not being loaded I would check that `if_iwm_load="YES"` is present in /boot/loader.conf
but No need to tamper with your file system just yet
try loading the module, as root: `kldload /boot/modules/if_iwm.ko`  if the module loads and the firmware is available(iwm9260fw.ko I think is the name) you should see a message about the card being detected and assigned to iwm0 or something like that....


----------



## fzfq3m (Mar 29, 2020)

here is what you should see when manually loading the module with `kldload /boot/modules/if_iwm.ko` (granted that the module was not previously loaded)

*iwm0: <Intel(R) Dual Band Wireless AC 9260> at device 0.0 on pci3
iwm0: hw rev 0x320, fw ver 34.0.0, address xx:xx:xx:xx:xx:xx*


----------



## Raffeale (Mar 29, 2020)

userxbw said:


> now its telling me it does not know how to make if_iwm_9000.c no matter which one I try to compile in /usr/src/sys/modules/iwm. I commwnted out the reference to 9000 95xx in config.h and the files file. and still it tells me the above.
> everything else it set for that 9260 if_iwm.ko is in /boot/modules and kldstat says no such file or directory.
> 
> this thing is cursed.


did you compiled iwm and iwmfw9560 firmware successfully ?
post your compilation information here.  I will help you .


----------



## Raffeale (Mar 29, 2020)

my ac9260 works well ,I disable bluetooth in bios, because I don't need it.


----------



## userxbw (Mar 29, 2020)

the first line for the both of them compile and install, I seen to errors or warnings so I'd say yes. it is the second line for

# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko

when it comes back install -m 755 whatever whatever then right after that it says if_iwm.ko no file or directory.

okay they both compiled,  kldload /boot/modules/if_iwm.ko and rc.conf set, boot screen is still showing that ibt.xxx.xxx. missing cannot download error. and I do not have any means to turn off bluetooth on this laptop.

I think it is giving me a catch 22, it will not load the wifi card because bluetooth is missing and it cannot download the source because it has no witi (network out).






__





						FreshPorts -- comms/iwmbt-firmware: Intel Wireless 8260 bluetooth adaptor firmwares used by iwmbtfw(8)
					

Firmware for the Intel Wireless 8260/8265 chip based Bluetooth USB devices. To be downloaded with iwmbtfw(8).  See also: https://packages.debian.org/firmware-iwlwifi




					www.freshports.org
				




which one would I download they are debs and I have no idea how to handle that let alone any part of where does hte source go .. 8260




__





						Debian -- Details of package firmware-iwlwifi in sid
					





					packages.debian.org


----------



## fzfq3m (Mar 30, 2020)

userxbw said:


> the first line for the both of them compile and install, I seen to errors or warnings so I'd say yes. it is the second line for
> 
> # cd /usr/src/sys/modules/iwm
> # make clean all install
> ...



This is really weird... my 9260AC work just fine without the bluetooth firmware and I have bluetooth enabled on uefi/bios.
anyway you don't need the whole source code but just the binary blob for the firmware

######## PLEASE SEE MY NEXT POST ###################
##### THIS IS NOT THE CORRECT ANWSER TO YOUR ISSUE BUT JUST A WAY TO TEST#######
https://git.kernel.org/pub/scm/linu...inux-firmware.git/plain/intel/ibt-18-16-1.sfi

I just downloaded that file and then ran as root mkdir -pv /usr/local/share/iwmbt-firmware/ and copied ibt-18-16-1.sfi to /usr/local/share/iwmbt-firmware/
after rebooting the system I can see ubt0 comes up

##### AFTER TESTING IT MIGHT BE A GOOD IDEA TO DELETE THE FOLDER ####
rm -rf /usr/local/share/iwmbt-firmware/
and turn off the system so the firmware gets unloaded (just rebooting won't unload the firmware)


----------



## fzfq3m (Mar 30, 2020)

userxbw said:


> the first line for the both of them compile and install, I seen to errors or warnings so I'd say yes. it is the second line for
> 
> # cd /usr/src/sys/modules/iwm
> # make clean all install
> ...


Interesting... I was able to replicate your issue
if I try to compile using `make clean all install` i get the error `make: don't know how to make device_if.h. Stop`

instead try compile in three separated steps... let every step finish before issuing the next command
`cd /usr/src/sys/modules/iwm`
`make clean`
`make all`
`make install`


----------



## Raffeale (Mar 30, 2020)

I have  just  try to open  bluetooth on my laptop, I didn't found any iwmbt messages from dmesg.


----------



## Raffeale (Mar 30, 2020)

userxbw said:


> the first line for the both of them compile and install, I seen to errors or warnings so I'd say yes. it is the second line for
> 
> # cd /usr/src/sys/modules/iwm
> # make clean all install
> ...



could you post your dmesg message here in detail.  I found the source didn't


userxbw said:


> the first line for the both of them compile and install, I seen to errors or warnings so I'd say yes. it is the second line for
> 
> # cd /usr/src/sys/modules/iwm
> # make clean all install
> ...


i have just had a glance at module source code,I didn’t find any iwmbt module from FreeBSD svn.could you post your dmesg here in detail.


----------



## userxbw (Mar 30, 2020)

I just swapped cards again (this morning) and now I am going to do the Bluetooth side to try and cut back on all of this hunt and peck and hacking to try to get this thing to work.


```
[root@FreeBSD-12 /usr/ports]# find . -type d -iname "iwmbt-firmware" 
./comms/iwmbt-firmware
[root@FreeBSD-12 /usr/ports]# cd ./comms/iwmbt-firmware
[root@FreeBSD-12 /usr/ports/comms/iwmbt-firmware]# make
===>  License INTEL accepted by the user
===>   iwmbt-firmware-20190717_1 depends on file: /usr/local/sbin/pkg - found
=> firmware-iwlwifi_20190717-2_all.deb doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://cdn.debian.net/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20190717-2_all.deb
firmware-iwlwifi_20190717-2_all.deb                   6630 kB 1980 kBps    03s
===> Fetching all distfiles required by iwmbt-firmware-20190717_1 for building
===>  Extracting for iwmbt-firmware-20190717_1
=> SHA256 Checksum OK for firmware-iwlwifi_20190717-2_all.deb.
===>  Patching for iwmbt-firmware-20190717_1
===>  Configuring for iwmbt-firmware-20190717_1
===>  Staging for iwmbt-firmware-20190717_1
===>   Generating temporary packing list
cd /usr/ports/comms/iwmbt-firmware/work/lib/firmware/intel && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) &&  /usr/bin/find -Ed $1 $3 \(   -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} +  -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . /usr/ports/comms/iwmbt-firmware/work/stage/usr/local/share/iwmbt-firmware
====> Compressing man pages (compress-man)
[root@FreeBSD-12 /usr/ports/comms/iwmbt-firmware]# make install
===>  Installing for iwmbt-firmware-20190717_1
===>  Checking if iwmbt-firmware is already installed
===>   Registering installation for iwmbt-firmware-20190717_1
Installing iwmbt-firmware-20190717_1...
[root@FreeBSD-12 /usr/ports/comms/iwmbt-firmware]#
```

########################################

could this be due to your solution is made for ver 12 and I am running 12.1 relese. the  next step in that process fail.


```
# cd /usr/src/sys/modules/iwmfw/iwm9260fw
# make clean all install
==> /boot/modules/iwm9260fw.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
==> /boot/modules/if_iwm.ko

# cd /usr/src/sys/modules/iwm
# make clean all install
# kldload /boot/modules/iwm9260fw.ko
# kldload /boot/modules/if_iwm.ko
```
when I remve the 9000 reference it then get to 9260 and then fails there too.
in * /usr/src/sys/modules/iwm]# nano Makefile *

```
#SRCS+= if_iwm_7000.c if_iwm_8000.c if_iwm_9000.c if_iwm_fw.c if_iwm_9260.c

SRCS+=  if_iwm_7000.c if_iwm_8000.c if_iwm_fw.c if_iwm_9260.c
```
after clean then make

```
[root@FreeBSD-12 /usr/src/sys/modules/iwm]# make
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
make: don't know how to make if_iwm_9260.c. Stop
```


----------



## Raffeale (Mar 30, 2020)

My FreeBSD is 12.1 release now,it work fine one my laptop, I reinstalled my FreeBSD two days ago.


----------



## Raffeale (Mar 30, 2020)

the firmware file name incorrect caused the error.  Look at Makefile and firmware name if they are matched? I have already. change the first post to fix this.


----------



## Raffeale (Mar 30, 2020)

userxbw said:


> I just swapped cards again (this morning) and now I am going to do the Bluetooth side to try and cut back on all of this hunt and peck and hacking to try to get this thing to work.
> 
> 
> ```
> ...


Remove 9260 configuration from files and Makefile. Tomorrow I will fix it in the first post


----------



## userxbw (Mar 30, 2020)

I got them to make and load via /boot/loader.conf but still not working.
and there is nothing coming back for iwm in dmesg grep

*[root@FreeBSD-12 ~]# kldstat -v -n iwm9260fw.ko*


```
Id Refs Address                Size Name
3    1 0xffffffff82676000   28eaf0 iwm9260fw.ko (/boot/modules/iwm9260fw.ko)
    Contains modules:
         Id Name
          2 iwm9260fw_fw
```
*[root@FreeBSD-12 ~]# kldstat -v -n if_iwm.ko*
[code

Id Refs Address                Size Name
2    1 0xffffffff8264a000    2bc70 if_iwm.ko (/boot/kernel/if_iwm.ko)
    Contains modules:
         Id Name
          1 pci/iwm

[/code]
*[root@FreeBSD-12 ~]# pciconf -lv | grep Wireless*

```
device     = 'Wireless-AC 9260'
```
*[root@FreeBSD-12 ~]# cat /boot/loader.conf*

```
nvme_load=yes
fuse_enable=yes
iwm9260fw_load=yes
if_iwm_load=yes
```
*[root@FreeBSD-12 ~]# cat /etc/rc.conf*

```
clear_tmp_enable="YES"
hostname="FreeBSD-12.1.org"

#if_iwm_load=yes

#kldload_iwm=yes

#iwm9260fw_load=yes

#legal.intel_iwi.license_ack=1
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
create_args_wlan0="country US regdomain FCC"
sshd_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
kld_list="amdgpu"
dbus_enable=yes
slim_enable=yes
devd_enable=yes
devfs_system_ruleset="localrules"
mixer_enable="YES"
linux_enable="YES"
fsck_y_enable="YES"
powerd_flags="-b adaptive -a hiadaptive"
snddetect_enable="YES"
clear_tmp_enable="YES"
autofs_enable=yes
```
*[root@FreeBSD-12 ~]# ifconfig*

```
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```


----------



## Raffeale (Mar 31, 2020)

try to use kldload loading module by hand and get dmesg, you.should see some about iwm message there. I remember you use ac9560 card. if you use ac9560 ac9260fw can't recognize ac9560.


----------



## userxbw (Mar 31, 2020)

Raffeale said:


> try to use kldload loading module by hand and get dmesg, you.should see some about iwm message there. I remember you use ac9560 card. if you use ac9560 ac9260fw can't recognize ac9560.


yeah, the mistake on my part I have the 9260 NOT 9560. so having done both without having to reinstall everything would just deleteing the ko file for 9560 help?
how do I unload a driver via cli? (google time) just thought I'd ask anyways.

--- that is simple enough ---

```
kldunload -i ID

OR

kldunload module-name
```









						FreeBSD: How to unload (remove) device driver (module) from kernel? - nixCraft
					

FreeBSD comes with kldstat command. The kldstat utility or command displays the status of any files dynamically linked into the kernel. And the kldunload utility unloads a file which was previously loaded with lldload command. You can use kldunload command as follows. Unload a file from the...




					www.cyberciti.biz


----------



## Raffeale (Mar 31, 2020)

did you get some iwm dmesg after you load iwm and iwm9260 modules ?


----------



## userxbw (Mar 31, 2020)

Raffeale said:


> did you get some iwm dmesg after you load iwm and iwm9260 modules ?


nothing, when it boots up I see a flash of ifconfig something all caps trying to set a config but failing type message. at the bottom of the dmesg it says it is trying to establish a bluetooth and something else. and thats about it. other then I unloaded the iwm9260fw.ko then loaded it again, and it said it has no file so I gave it a absolute path then it tells me it is loaded or in the kernel. i removed the 9560 from /boot/modules just cuz.


----------



## Raffeale (Apr 1, 2020)

it so wired,  could you disable your bluetooth and unload your bluetooth modules,  try it again. I didn't get any bluetooth messages from dmesg even if I enable the bluetooth in bios.  I have already tested it twice.  it work fine  on freebsd 12.1 release and stable.


----------



## userxbw (Apr 1, 2020)

Raffeale said:


> it so wired,  could you disable your bluetooth and unload your bluetooth modules,  try it again. I didn't get any bluetooth messages from dmesg even if I enable the bluetooth in bios.  I have already tested it twice.  it work fine  on freebsd 12.1 release and stable.


no options in boios or anywhere to turn off this bluetooth, levrono 339s ar15.

I'm thinking about saving us all a headache and just use that other wifi m.s card I bought after this happened. I was thinknig having the card that does work then I could put my desktop in then just run through the steps to build the driver/module for this wifi card and just switch them out and volia it'd work. But as you see it is not being nice, and I am not pulling down anything over 800(ish) Mbit anyways, so screw it. (again).


----------



## Raffeale (Apr 1, 2020)

Put your dmesg log and kldload -v here, let me see that.  
Have you tried to unload Bluetooth module and then  load ac9260 module and  iwm module by hand


----------



## userxbw (Apr 1, 2020)

Raffeale said:


> Put your dmesg log and kldload -v here, let me see that.
> Have you tried to unload Bluetooth module and then  load ac9260 module and  iwm module by hand


nope -- but i got this HP EliteBook 840 G3 that needs freeBSD on it..  with the same 9260 wifi card.


----------



## Raffeale (Apr 1, 2020)

My laptop is up 735g6, it works very well


----------



## userxbw (Apr 1, 2020)

Raffeale said:


> My laptop is up 735g6, it works very well


yeah, my first Lenovo and its like it only has enough working abiltiy to call it a laptop, but not really. If it wasn't for them getting ahold of IBM's Think Pad patent they'd not be in business today, and the other issues I've been having with that laptop, besides this wifi one is just showing me why.


----------



## userxbw (Apr 1, 2020)

for 12.1 
svn checkout https://svn.freebsd.org/base/release/12.1.0/sys/dev/iwm/
?


----------



## userxbw (Apr 1, 2020)

CUSS, SWEAR, DIRTY WORDS

laptop stats

```
HP EliteBook 840 G3
CPU Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
RAM 11378 MB : 770 : 9722
Graphics Card [HD Graphics 520] (rev 07)
```
wpa_supplicant

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

network={
ssid="XXXX"
scan_ssid=0
psk="XXXX"
priority=5
}
network={
priority=0
key_mgmt=NONE
}
```

rc.conf

```
clear_tmp_enable="YES"
hostname="FreeBSD121.org"
sshd_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
kld_list="/boot/modules/if_iwm.ko"
wlan_wep_load=yes
wlan_ccmp_load=yes
wlan_tkip_load=yes
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"

# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
```
iwm9260fw.ko stat

```
Id Refs Address                Size Name
2    1 0xffffffff82649000   28eaf0 iwm9260fw.ko (/boot/modules/iwm9260fw.ko)
    Contains modules:
         Id Name
          1 iwm9260fw_fw
```
if_iwm.ko stat

```
Id Refs Address                Size Name
3    1 0xffffffff828d8000    2bc70 if_iwm.ko (/boot/kernel/if_iwm.ko)
    Contains modules:
         Id Name
          2 pci/iwm
```
loader.conf

```
iwm9260fw_load=yes
if_iwm_load=yes
```
Dmesg

```
---<<BOOT>>---
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.1-RELEASE r354233 GENERIC amd64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 1920x1080
CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (2808.13-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406e3  Family=0x6  Model=0x4e  Stepping=3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended Features=0x29c6fbf<FSGSBASE,TSCADJ,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,NFPUSG,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PROCTRACE>
  Structured Extended Features3=0x9c002400<MD_CLEAR,TSXFA,IBPB,STIBP,L1DFL,SSBD>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 12884901888 (12288 MB)
avail memory = 11823988736 (11276 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <HPQOEM 8079    >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-119 on motherboard
Launching APs: 1 3 2
Timecounter "TSC-low" frequency 1404066590 Hz quality 1000
random: entropy device external interface
kbd1 at kbdmux0
000.000023 [4335] netmap_init               netmap: loaded module
[ath_hal] loaded
module_register_init: MOD_LOAD (vesa, 0xffffffff8112e050, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
nexus0
efirtc0: <EFI Realtime Clock> on motherboard
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cryptosoft0: <software crypto> on motherboard
acpi0: <HPQOEM SLIC-BPC> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 24000000 Hz quality 950
Event timer "HPET" frequency 24000000 Hz quality 550
Event timer "HPET1" frequency 24000000 Hz quality 440
Event timer "HPET2" frequency 24000000 Hz quality 440
Event timer "HPET3" frequency 24000000 Hz quality 440
Event timer "HPET4" frequency 24000000 Hz quality 440
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x6e> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x3000-0x303f mem 0xe0000000-0xe0ffffff,0xd0000000-0xdfffffff at device 2.0 on pci0
vgapci0: Boot video device
xhci0: <Intel Sunrise Point-LP USB 3.0 controller> mem 0xe1200000-0xe120ffff at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <simple comms> at device 22.0 (no driver attached)
pci0: <simple comms, UART> at device 22.3 (no driver attached)
ahci0: <Intel Sunrise Point-LP AHCI SATA controller> port 0x3088-0x308f,0x3090-0x3093,0x3040-0x305f mem 0xe1228000-0xe1229fff,0xe1230000-0xe12300ff,0xe122e000-0xe122e7ff at device 23.0 on pci0
ahci0: AHCI v1.31 with 1 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pcib1: [GIANT-LOCKED]
pci1: <ACPI PCI bus> on pcib1
pci1: <unknown> at device 0.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 28.3 on pci0
pci2: <ACPI PCI bus> on pcib2
pci2: <network> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
pci0: <memory> at device 31.2 (no driver attached)
hdac0: <Intel Sunrise Point-LP HDA Controller> mem 0xe1224000-0xe1227fff,0xe1210000-0xe121ffff at device 31.3 on pci0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
acpi_button0: <Sleep Button> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
acpi_tz2: <Thermal Zone> on acpi0
acpi_tz3: <Thermal Zone> on acpi0
acpi_tz4: <Thermal Zone> on acpi0
acpi_tz5: <Thermal Zone> on acpi0
acpi_tz6: <Thermal Zone> on acpi0
acpi_tz7: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
Timecounters tick every 1.000 msec
hdacc0: <Conexant CX20724 HDA CODEC> at cad 0 on hdac0
hdaa0: <Conexant CX20724 Audio Function Group> at nid 1 on hdacc0
pcm0: <Conexant CX20724 (Analog)> at nid 23 and 26 on hdaa0
pcm1: <Conexant CX20724 (Right Analog Headphones)> at nid 29 on hdaa0
hdacc1: <Intel Skylake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Skylake Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Skylake (HDMI/DP 8ch)> at nid 3 on hdaa1
ugen0.1: <0x8086 XHCI root HUB> at usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <Samsung SSD 860 EVO 500GB RVT01B6Q> ACS-4 ATA SATA 3.x device
ada0: Serial Number S3Z1NB0K439399A
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 476940MB (976773168 512 byte sectors)
Trying to mount root from ufs:/dev/ada0p8 [rw]...
lo0: link state changed to UP
uhub0: 18 ports with 18 removable, self powered
ugen0.2: <vendor 0x8087 product 0x0025> at usbus0
ugen0.3: <vendor 0x138a product 0x003f> at usbus0
ugen0.4: <SunplusIT Inc HP HD Camera> at usbus0
ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x0025, class 224/1, rev 2.00/0.02, addr 1> on usbus0
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
Security policy loaded: MAC/ntpd (mac_ntpd)
```
and yeah it is not working aaahhhhh   


I did not read dmesg untill after posting. went in and turned off bluetooth in my BIOS and nope, just remove the two lines at the bottom of this dmess 

```
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
[/ocde]
that is not showing now and still no wifi just lo in ifconfig
```


----------



## userxbw (Apr 1, 2020)

I finally got it, that message about ifconfig on this one. the other laptop it'd go up off the page.


```
ifconfig: SIOCIFCREATE2: Device not configured
```
both of my laptops are giving this error on boot.








						wifi setup
					

Hi 1st time poster and freeBSD so pleas be gentle :)  I've recently installed freebsd 8 on an old laptop with a linksys wifi card which I'm struggling to set up using the guide http://www.freebsd.org/doc/handbook/network-wireless.html. My network is configured to WPA encryption.  From...




					forums.freebsd.org
				



still reading but something about needing something port, which means the source code is not likely to be there. so got to figure out how to get that and put it into freeBSD where ever that is suppose to go something else I have no idea on.


----------



## Raffeale (Apr 1, 2020)

Use stable svn to checkout source code and compile it again. I use the source code from the FreeBSD 12.1 stable version  svn.


----------



## Raffeale (Apr 1, 2020)

userxbw said:


> for 12.1
> svn checkout https://svn.freebsd.org/base/release/12.1.0/sys/dev/iwm/
> ?


Use stable svn ,this is not stable


----------



## userxbw (Apr 1, 2020)

Raffeale said:


> Use stable svn ,this is not stable





			base - Revision 359538: /stable/2.1/sys
		

'

what address did you use?  that does not have a iwm in its subdirectory




__





						[base] Index of /stable/2.1/sys
					






					svnweb.freebsd.org


----------



## Raffeale (Apr 1, 2020)

Post your pciconf -v


----------



## Raffeale (Apr 1, 2020)

__





						base - Revision 372803: /stable/12/sys
					





					svn.freebsd.org
				



I use this svn


----------



## userxbw (Apr 1, 2020)

Raffeale said:


> __
> 
> 
> 
> ...


for 12.1 ?

well Okay Joe...


----------



## Raffeale (Apr 1, 2020)

Yes,it work for 12.1. My FreeBSD is 12.1 release


----------



## userxbw (Apr 1, 2020)

Raffeale said:


> Yes,it work for 12.1. My FreeBSD is 12.1 release


 phsuuuuu still getting that ifconfig message ,,,  you want to trade laptops?

I order another 8260NGW that works with freeBSD it should be here this Friday, case closed. thanks for all of your help.


----------



## Raffeale (Apr 6, 2020)

you are welcome , i really don't know why the driver did not work on your laptop


----------



## userxbw (Apr 6, 2020)

Raffeale said:


> you are welcome , i really don't know why the driver did not work on your laptop


the Luck of the Irish? 

I got my 6 dollar replacement same as the orginal one that got the connctins poped off off it. and it's working fine.


----------



## pinned (Jul 24, 2020)

I got the Intel 9260 up and running on my laptop, thanks to this guide and a few bits and pieces from the thread. Such a relief to have the ability to connect to a 5Ghz WiFi network where wired is not an option and 2.4Ghz is just too crowded and unstable.


----------



## Hakaba (Oct 25, 2020)

Hello, thanks for all.

I found the issue, error in the /boot/loader.conf file.

Now I have a wlan0 (but not internet though it... But this is an another quest).
wifimgr see some network, so the card is reconized. Thanks for all !


----------



## mkru (Nov 7, 2020)

Is it going to be pulled into the system, so that these WiFi cards work out of the box after system installation?


----------



## scottro (Dec 6, 2020)

I look at the man (4) iwm page and it mentions 9260. I'm going to be getting a T495 and I'd be curious as to its status on 12.2 myself. Looking at the bug report listed on the first post, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227044, I'm not quite clear if it is just in HEAD or if it works in 12.2-RELEASE. I guess I'll find out when the laptop arrives. I'm still undecided whether I'm going to install FreeBSD or some form of Linux on it. From what I understand, the other things I need work fine on both FreeBSD and Linux. Mainly I just wanted video and touchpad to work, and from what I've found, the drm-kmod for amd is fine for the video and touchpad is working fine. 

(Mods, should this have been a separate thread?  If so, let me know and I'll delete this one and open another.)


----------



## scottro (Dec 10, 2020)

Ok, to answer myself, my Thinkpad T495 arrived, and FreeBSD-12.2 works with the AC9260 card.


----------



## scottro (Dec 11, 2020)

However, I couldn't get amdgpu working. More or less followed the wiki, remember the issues I've had with Intel on 12.2, I installed from ports. Put the proper line in /etc/rc.conf and the module shows as loaded, but when I boot, the screen doesn't change the way it does when it properly loads the module.

I've only gotten it to work with Vesa, which, so far, has actually been good enough. I'll also try with CURRENT to see if that gets X working with the amd module.  It's a Ryzen 7 with nvme drive, and maybe that's one reason X seems fine, even with vesa, though the biggest test I gave it was playing youtube videos.
Aside from that, it's pretty much working out of the box. I don't use bluetooth, so haven't check, but sound is fine, keyboard and mouse are fine. Battery life is supposed to be very good on this, and I have powerd running, though I've done no other tweaks, and the battery doesn't seem that great. I've only just gotten it, so haven't done much testing, but apm showed 94 percent battery, and after two hours of use it's at 61 percent, showing 2.44 remaining.  But battery life isn't a big issue for my expected use, so I can deal with that.


----------



## scottro (Dec 11, 2020)

Ok, getting off topic and talking about CURRENT, but anyway, CURRENT's amd driver worked pretty much out of the box. I made  some adjustments, the same as I'd make for any hires laptop to make things easier on my aging eyes. I may give 12.2 another try, depending upon how long it will be for 13 to be released.
Because even having to use vesa, I really didn't notice great improvements.  But--I'm not doing that much with it.


----------



## mameko (Feb 20, 2021)

Hello everybody, I'm new to FreeBSD.
I tested FreeBSD on some older machines but switched back to Linux everytime. Now I got FreeBSD 12 working on my 2-years-old laptop. It is an ASUS TUF Gaming FX705GM with an Intel 9560 AC Wifi.
With @Raffeale Howto I got it working. It works good so far. Only from time to time the speed is reduced for a short time before full speed comes back. Thanks for your work and this Howto!


----------

