You'd better to use stable/13 from snapshot or git.yjqg6666 as I understand it's somewhat necessary to run 13.0-STABLE instead of 13.0-RELEASE on this machine in order to use the new wireless driver. Is that correct?
mkdir /usr/src; cd /usr/src && git clone -b stable/13 https://git.freebsd.org/src.git .
. From the latest commit, i see the iwlwifi patch has been merged into the branch. You may only need to apply the LTE modem patch(if your model had Quectel EM05).CPUTYPE?=cortex-a53
WITHOUT_DEBUG=YES
MK_PROFILE=no
# These only affects ports
OPTIONS_UNSET=DOCS EXAMPLES NLS MANPAGES TEST
OPTIONS_SET=LTO
WITHOUT_DEBUG_FILES=1
WITHOUT_LIB32=1
WITHOUT_KERNEL_SYMBOLS=yes
WITHOUT_TESTS=yes
WITHOUT_PROFILE=yes
WITH_MALLOC_PRODUCTION=yes
WITHOUT_LLVM_ASSERTIONS=yes
WITH_EXTRA_TCP_STACKS=1
kldload if_iwlwifi
but the module apparently doesn't exist.boot/kernel/if_iwlwifi.ko
exists. If not, check that /usr/src/sys/modules/iwlwifi*
exist. If not, make sure you applied the patch from https://people.freebsd.org/~bz/wireless/root@x1g9:/usr/src # ./iwlwifi.sh
Script expects to run from src/
Fetching patches and tarballs ...
20210904-linuxkpi-latest.tar 250 kB 603 kBps 00s
20210904-iwlwifi-latest.tar 25 MB 5134 kBps 05s
20210904-rtw88-latest.tar 3505 kB 2913 kBps 01s
20210904-net80211-latest.diff 13 kB 13 MBps 00s
20210904-build-latest.diff 2878 B 40 MBps 00s
Applying changes related to net80211 ...
Reversed (or previously applied) patch detected! Assume -R? [y] y
Reversed (or previously applied) patch detected! Assume -R? [y] y
1 out of 2 hunks failed while patching sys/net80211/ieee80211.c
Reversed (or previously applied) patch detected! Assume -R? [y] y
Reversed (or previously applied) patch detected! Assume -R? [y] y
Reversed (or previously applied) patch detected! Assume -R? [y] y
Reversed (or previously applied) patch detected! Assume -R? [y] y
Reversed (or previously applied) patch detected! Assume -R? [y] y
… stay up-to-date on this matter …
jbodenmann When you are building the kernel, any error occurred? When I built the kernel after the patch had applied, the introduced module rtw88 caused the build failed. So I addedyjqg6666 would you be able to share some information regarding the iwlwifi driver? From what I understand you have that working on 13.0-STABLE, right?
Today I compiled 13.0-STABLE which seems to be running fine. I then followed these instructions to get the iwlwifi driver: https://wiki.freebsd.org/WiFi/Iwlwifi#Getting_code
I downloaded & ran the script mentioned in the wiki under /usr/src and rebuilt the kernel. After rebooting, I tried to load the kernel module by runningkldload if_iwlwifi
but the module apparently doesn't exist.
My /usr/src is of course tracking stable/13 from https://github.com/freebsd/freebsd-src.
This is the first time I'm compiling my own kernel so I might be missing something obvious here.
WITHOUT_MODULES = rtw88 rtw88fw
cp -Rv /boot/kernel /boot/kernel.orig
. After the installation, there should be a file if_iwlwifi.ko in /boot/kernel.* 2021-11-28 The driver and firmware went into HEAD (detached from build)
options iwlwifi
or similar. Any ideas where to look that up?I rebuilt my kernel from the latest commit, got the same result as yours. I will check later. If the tars were not extracted, how about trying to extract them manually?yjqg6666 The problem I am facing is that the script patching the kernel source doesn't execute completely.
Looking at the wiki history, we have this now:
I would assume that this means that now we don't need that patch anymore. I should be able to just `git pull` the latest `stable/13` branch and build regularly without applying any patches or executing any scripts. Is that correct?
I do assume that I'll need something likeoptions iwlwifi
or similar. Any ideas where to look that up?
Or am I misunderstanding this node and this is only relevant for -CURRENT (because HEAD)?
You may also try to make LTE working to get connected.yjqg6666 The problem I am facing is that the script patching the kernel source doesn't execute completely.
Looking at the wiki history, we have this now:
I would assume that this means that now we don't need that patch anymore. I should be able to just `git pull` the latest `stable/13` branch and build regularly without applying any patches or executing any scripts. Is that correct?
I do assume that I'll need something likeoptions iwlwifi
or similar. Any ideas where to look that up?
Or am I misunderstanding this node and this is only relevant for -CURRENT (because HEAD)?
jbodenmann You could also checkout the code by commit hash(my initial tested one) and apply the iwlwifi patches.Zeeb answered an e-mail on the freebsd-wireless mailing list (extremely quickly btw). That the script doesn't work right now is known.
He's hoping to provide a workable solution within a few days - (quote) For appropriate values of "few". (unquote).
cd /usr/src
git branch tpx1 b1cca74367374bbb9cdc881c671a9f9525dca313
git checkout tpx1
git cherry-pick 0229172a65765392f566ae1cdc730615ab504e15 #add Quectel EM05 support, merged to main.
bash -x ./apply-wireless-latest.sh
make -j9 buildworld && make -j9 kernel
shutdown -r now
cd /usr/src
make installworld
shutdown -r now
etcupdate # see handbook
usbconfig
nor pciconf
.The product: https://www.quectel.com/product/lte-a-em120r-glyjqg6666 while waiting for the latest iwlwifi patches/MFCs I wanted to get the Quectel LTE modem up and running.
I pulled the latest stable/13 branch and applied the patch from your PR. Then I built, installed & booted the kernel.
The u3g kernel module loaded successfully. However, I don't have a /dev/cua* or /dev/ttyU* device at all.
I checked my order and it would seem that the laptop I got has this modem: Quectel EM120R-GL 4G/LTE Cat. 12
That would be different from the EM05 that you have (and provided a patch for).
Any ideas how how easy it is to support this model?
Looking at the datasheet it would seem like this module communicates over PCIe rather than USB.
In any case I don't seem to be able to "locate the device" - neither withusbconfig
norpciconf
.
I loaded up the BIOS/UEFI to check whether the device might be disabled but that doesn't seem to be the case.
Here's my probe: https://bsd-hardware.info/?probe=8f9e9ddde5
The Quectel doesn't show up there either![]()
1eac:1001:1eac:2003
, <https://www.google.com/search?q=1eac:1001:1eac:2003+BSD&tbs=li:1#unfucked> finds nothing.… freebsd (base of pfSense) can't work with mbim or qmi, …
dmesg
regarding failure loading issues:Intel(R) Wireless WiFi based driver for FreeBSD
iwlwifi0: <iwlwifi> mem 0x603d1cc000-0x603d1cffff at device 20.3 on pci0
iwlwifi0: successfully loaded firmware image 'iwlwifi-QuZ-a0-hr-b0-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 QuZ-a0-hr-b0-67.ucode op_mode iwlmvm
iwlwifi0: Detected Intel(R) Wi-Fi 6 AX201 160MHz, REV=0x354
iwlwifi0: base HW address: 70:a6:cc:5c:52:7e
wlan0: Ethernet address: 70:a6:cc:5c:52:7e
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
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: start running, 0 vaps running
wlan0: ieee80211_start_locked: up parent iwlwifi0
wlan0: ieee80211_new_state_locked: INIT -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)
wlan0: [1e:e8:29:95:d6:65] station assoc via MLME
wlan0: ieee80211_alloc_node 0xfffffe010ad99000<1e:e8:29:95:d6:65> in station table
wlan0: node_reclaim: remove 0xfffffe014048f000<70:a6:cc:5c:52:7e> from station table, refcnt 1
wlan0: ieee80211_sta_join1 0xfffffe010ad99000<1e:e8:29:95:d6:65> -> AUTH, FC0_SUBTYPE_DEAUTH
wlan0: ieee80211_new_state_locked: SCAN -> AUTH (arg 192) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> AUTH arg 192
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 4 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 4 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 4 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 3 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 3 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 3 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 2 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 2 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 1 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 1 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 1 quuees to be allocated by driver
wlan0: sta_newstate: SCAN -> AUTH (192)
wlan0: ieee80211_ref_node (ieee80211_send_mgmt:2704) 0xfffffe010ad99000<1e:e8:29:95:d6:65> refcnt 4
wlan0: ni 0xfffffe010ad99000 vap 0xfffffe014048d010 mode STA state AUTH m 0xfffff8039f0ce000 status 0
wlan0: ni 0xfffffe010ad99000 mode STA state AUTH ostate 2 arg 0x2 status 0
wlan0: [1e:e8:29:95:d6:65] recv auth frame with algorithm 0 seq 2
wlan0: ieee80211_new_state_locked: AUTH -> ASSOC (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: AUTH -> ASSOC arg 0
wlan0: sta_newstate: AUTH -> ASSOC (0)
wlan0: ieee80211_ref_node (ieee80211_send_mgmt:2704) 0xfffffe010ad99000<1e:e8:29:95:d6:65> refcnt 4
wlan0: ni 0xfffffe010ad99000 vap 0xfffffe014048d010 mode STA state ASSOC m 0xfffff8001fdbe500 status 0
wlan0: ni 0xfffffe010ad99000 mode STA state ASSOC ostate 3 arg 0x3 status 0
wlan0: [1e:e8:29:95:d6:65] assoc success at aid 3: short preamble, short slot time, QoS
wlan0: ieee80211_new_state_locked: ASSOC -> RUN (arg 16) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: ASSOC -> RUN arg 16
wlan0: sta_newstate: ASSOC -> RUN (16)
wlan0: [1e:e8:29:95:d6:65] bss node join
wlan0: link state changed to UP
wlan0: ieee80211_crypto_newkey: cipher 3 flags 0x3 keyix 65535
wlan0: ieee80211_crypto_newkey: no h/w support for cipher AES-CCM, falling back to s/w
wlan0: ieee80211_crypto_setkey: AES-CCM keyix 0 flags 0x133 mac 1e:e8:29:95:d6:65 rsc 0 tsc 0 len 16
wlan0: ieee80211_crypto_newkey: cipher 3 flags 0x6 keyix 2
wlan0: ieee80211_crypto_newkey: no h/w support for cipher AES-CCM, falling back to s/w
wlan0: ieee80211_crypto_setkey: AES-CCM keyix 2 flags 0x136 mac ff:ff:ff:ff:ff:ff rsc 0 tsc 0 len 16
iwlwifi0: No beacon heard and the session protection is over already...
wlan0: ieee80211_new_state_locked: RUN -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: RUN -> SCAN arg 0
wlan0: sta_newstate: RUN -> SCAN (0)
wlan0: _ieee80211_crypto_delkey: AES-CCM keyix 0 flags 0x133 rsc 0 tsc 0 len 16
wlan0: [1e:e8:29:95:d6:65] bss node leave
wlan0: link state changed to DOWN
iwlwifi0: Couldn't drain frames for staid 0, status 0x8
iwlwifi0:
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
lkpi_iv_newstate: error -5 during state transition 5 (RUN) -> 1 (SCAN)
wlan0: _ieee80211_crypto_delkey: AES-CCM keyix 2 flags 0x136 rsc 0 tsc 0 len 16
wlan0: sta_newstate: SCAN -> SCAN (0)
WARNING mvm_sta->dup_data == ((void *)0) failed at /usr/src/sys/contrib/dev/iwlwifi/mvm/rxmq.c:509
WARNING mvm_sta->dup_data == ((void *)0) failed at /usr/src/sys/contrib/dev/iwlwifi/mvm/rxmq.c:509
WARNING mvm_sta->dup_data == ((void *)0) failed at /usr/src/sys/contrib/dev/iwlwifi/mvm/rxmq.c:509
iwlwifi0: Not associated and the session protection is over already...
wlan0: ieee80211_new_state_locked: SCAN -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> SCAN arg 0
wlan0: sta_newstate: SCAN -> SCAN (0)
wlan0: [18:e8:29:94:d6:65] station assoc via MLME
wlan0: ieee80211_alloc_node 0xfffffe00e1701000<18:e8:29:94:d6:65> in station table
wlan0: node_reclaim: remove 0xfffffe010ad99000<1e:e8:29:95:d6:65> from station table, refcnt 2
wlan0: ieee80211_sta_join1 0xfffffe00e1701000<18:e8:29:94:d6:65> -> AUTH, FC0_SUBTYPE_DEAUTH
wlan0: ieee80211_new_state_locked: SCAN -> AUTH (arg 192) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> AUTH arg 192
iwlwifi0: Microcode SW error detected. Restarting 0x0.
iwlwifi0: Start IWL Error Log Dump:
iwlwifi0: Transport status: 0x0000004B, valid: 6
iwlwifi0: Loaded firmware version: 67.8f59b80b.0 QuZ-a0-hr-b0-67.ucode
iwlwifi0: 0x00000071 | NMI_INTERRUPT_UMAC_FATAL
iwlwifi0: 0x000022F0 | trm_hw_status0
iwlwifi0: 0x00000000 | trm_hw_status1
iwlwifi0: 0x004CB2DE | branchlink2
iwlwifi0: 0x004C806E | interruptlink1
iwlwifi0: 0x004C806E | interruptlink2
iwlwifi0: 0x00012CDA | data1
iwlwifi0: 0x00001000 | data2
iwlwifi0: 0x00000000 | data3
iwlwifi0: 0x00000000 | beacon time
iwlwifi0: 0xBBAE4133 | tsf low
iwlwifi0: 0x0000058D | tsf hi
iwlwifi0: 0x00000000 | time gp1
iwlwifi0: 0x006CEFB2 | time gp2
iwlwifi0: 0x00000001 | uCode revision type
iwlwifi0: 0x00000043 | uCode version major
iwlwifi0: 0x8F59B80B | uCode version minor
iwlwifi0: 0x00000351 | hw version
iwlwifi0: 0x00489004 | board version
iwlwifi0: 0x80B5FD2E | hcmd
iwlwifi0: 0x00020000 | isr0
iwlwifi0: 0x00000000 | isr1
iwlwifi0: 0x08F00002 | isr2
iwlwifi0: 0x00C3400C | isr3
iwlwifi0: 0x00000000 | isr4
iwlwifi0: 0x00370103 | last cmd Id
iwlwifi0: 0x00012CDA | wait_event
iwlwifi0: 0x000000B4 | l2p_control
iwlwifi0: 0x00000000 | l2p_duration
iwlwifi0: 0x0000000F | l2p_mhvalid
iwlwifi0: 0x00000000 | l2p_addr_match
iwlwifi0: 0x00000009 | lmpm_pmg_sel
iwlwifi0: 0x00000000 | timestamp
iwlwifi0: 0x000088CC | flow_handler
iwlwifi0: Start IWL Error Log Dump:
iwlwifi0: Transport status: 0x0000004B, valid: 7
iwlwifi0: 0x20000905 | ADVANCED_SYSASSERT
iwlwifi0: 0x00000000 | umac branchlink1
iwlwifi0: 0x80455E52 | umac branchlink2
iwlwifi0: 0x8045A3E8 | umac interruptlink1
iwlwifi0: 0x00000000 | umac interruptlink2
iwlwifi0: 0x00000000 | umac data1
iwlwifi0: 0xDEADBEEF | umac data2
iwlwifi0: 0xDEADBEEF | umac data3
iwlwifi0: 0x00000043 | umac major
iwlwifi0: 0x8F59B80B | umac minor
iwlwifi0: 0x006CEFAC | frame pointer
iwlwifi0: 0xC0885ED0 | stack pointer
iwlwifi0: 0x003C0108 | last host cmd
iwlwifi0: 0x00000000 | isr status reg
iwlwifi0: IML/ROM dump:
iwlwifi0: 0x00000003 | IML/ROM error/state
iwlwifi0: 0x00005B2C | IML/ROM data1
iwlwifi0: 0x00000080 | IML/ROM WFPM_AUTH_KEY_0
iwlwifi0: Fseq Registers:
iwlwifi0: 0x60000000 | FSEQ_ERROR_CODE
iwlwifi0: 0x80290033 | FSEQ_TOP_INIT_VERSION
iwlwifi0: 0x00090006 | FSEQ_CNVIO_INIT_VERSION
iwlwifi0: 0x0000A482 | FSEQ_OTP_VERSION
iwlwifi0: 0x00000003 | FSEQ_TOP_CONTENT_VERSION
iwlwifi0: 0x4552414E | FSEQ_ALIVE_TOKEN
iwlwifi0: 0x20000302 | FSEQ_CNVI_ID
iwlwifi0: 0x01300504 | FSEQ_CNVR_ID
iwlwifi0: 0x20000302 | CNVI_AUX_MISC_CHIP
iwlwifi0: 0x01300504 | CNVR_AUX_MISC_CHIP
iwlwifi0: 0x05B0905B | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
iwlwifi0: 0x0000025B | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
iwlwifi0: WRT: Collecting data: ini trigger 4 fired (delay=0ms).
iwlwifi0: FW error in SYNC CMD PHY_CONTEXT_CMD
#0 0xffffffff80d3d333 at linux_dump_stack+0x23
#1 0xffffffff83233685 at iwl_trans_txq_send_hcmd+0x3d5
#2 0xffffffff831de5be at iwl_trans_send_cmd+0xce
#3 0xffffffff8321afe9 at iwl_mvm_send_cmd_pdu+0x49
#4 0xffffffff831fcb20 at iwl_mvm_phy_ctxt_apply+0x580
#5 0xffffffff831fcc16 at iwl_mvm_phy_ctxt_changed+0x66
#6 0xffffffff831f410b at iwl_mvm_change_chanctx+0x10b
#7 0xffffffff80d334ef at lkpi_sta_scan_to_auth+0x23f
#8 0xffffffff80d37268 at lkpi_iv_newstate+0x148
#9 0xffffffff80c7e5ca at ieee80211_newstate_cb+0x17a
#10 0xffffffff80b61d21 at taskqueue_run_locked+0x181
#11 0xffffffff80b63032 at taskqueue_thread_loop+0xc2
#12 0xffffffff80abd92e at fork_exit+0x7e
#13 0xffffffff80f3006e at fork_trampoline+0xe
iwlwifi0: PHY ctxt cmd error. ret=-5
iwlwifi0: Failed to send MAC context (action:2): -5
iwlwifi0: failed to update MAC 0xfffffe014048dc9aM
iwlwifi0: lkpi_iv_newstate: error -5 during state transition 1 (SCAN) -> 2 (AUTH)
wlan0: sta_newstate: SCAN -> AUTH (192)
wlan0: ieee80211_ref_node (ieee80211_send_mgmt:2704) 0xfffffe00e1701000<18:e8:29:94:d6:65> refcnt 4
iwlwifi0: No queue was found. Dropping TX
wlan0: ni 0xfffffe00e1701000 vap 0xfffffe014048d010 mode STA state AUTH m 0xfffff80003be9300 status 4543576
wlan0: ni 0xfffffe00e1701000 mode STA state AUTH ostate 2 arg 0x2 status 4543576
wlan0: vap 0xfffffe014048d010 mode STA state AUTH flags 0x42000 & 0x80
wlan0: ieee80211_new_state_locked: AUTH -> SCAN (arg 1) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: AUTH -> SCAN arg 1
wlan0: sta_newstate: AUTH -> SCAN (1)
iwlwifi0: lkpi_iv_newstate: error -5 during state transition 2 (AUTH) -> 1 (SCAN)
wlan0: sta_newstate: SCAN -> SCAN (1)
wlan0: [18:e8:29:94:d6:65] station deauth via MLME (reason: 3 (sending STA is leaving/has left IBSS or ESS))
wlan0: ieee80211_new_state_locked: SCAN -> INIT (arg 3) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> INIT arg 3
wlan0: sta_newstate: SCAN -> INIT (3)
wlan0: node_reclaim: remove 0xfffffe00e1701000<18:e8:29:94:d6:65> from station table, refcnt 2
wlan0: ieee80211_alloc_node 0xfffffe0164929000<70:a6:cc:5c:52:7e> in station table
wlan0: ieee80211_new_state_locked: INIT -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5