2024-05-16 16:18:15

by Kurt Grutzmacher

[permalink] [raw]
Subject: No packets in monitor mode with rtw89_8852ce

Using a Realtek 8852ce module in monitor mode on Ubuntu 22.04 LTS I am
able to capture frames on 2.4 GHz channels but not any other
frequencies. Low power mode is disabled.

[98869.471001] rtw89_8852ce 0000:02:00.0: loaded firmware rtw89/rtw8852c_fw.bin
[98869.480121] rtw89_8852ce 0000:02:00.0: Firmware version 0.27.56.14,
cmd version 0, type 1
[98869.480142] rtw89_8852ce 0000:02:00.0: Firmware version 0.27.56.14,
cmd version 0, type 3
[98869.757041] rtw89_8852ce 0000:02:00.0: chip rfe_type is 1

ubuntu@ubuntu:~$ sudo iw realtekwifi0 set freq 2412
ubuntu@ubuntu:~$ sudo tcpdump -i realtekwifi0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on realtekwifi0, link-type IEEE802_11_RADIO (802.11 plus
radiotap header), snapshot length 262144 bytes
00:26:02.650167 363978528us tsft 11.0 Mb/s 2412 MHz 11b 0dBm signal
antenna 0 Request-To-Send TA:98:18:88:be:f0:04 (oui Unknown)
00:26:02.650362 363978752us tsft 11.0 Mb/s 2412 MHz 11b 0dBm signal
antenna 0 Clear-To-Send RA:98:18:88:be:f0:04 (oui Unknown)

Moving to a 5 GHz or 6E-enabled channel returns no captured packets.
I've tried multiple channels.

ubuntu@ubuntu:~$ sudo iw realtekwifi0 set freq 5220
ubuntu@ubuntu:~$ iw dev realtekwifi0 info
Interface realtekwifi0
ifindex 4
wdev 0x100000001
addr 1c:ce:51:91:5b:50
type monitor
wiphy 1
channel 44 (5220 MHz), width: 20 MHz (no HT), center1: 5220 MHz

ubuntu@ubuntu:~$ sudo time tcpdump -i realtekwifi0
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on realtekwifi0, link-type IEEE802_11_RADIO (802.11 plus
radiotap header), snapshot length 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
0.01user 0.00system 1:02.67elapsed 0%CPU (0avgtext+0avgdata 7936maxresident)k
0inputs+0outputs (0major+515minor)pagefaults 0swaps

APs are visible on freq 5220 when doing iw realtekwifi0 scan:

BSS 8e:18:98:be:f0:04(on realtekwifi0)
TSF: 715485204454 usec (8d, 06:44:45)
freq: 5220
beacon interval: 100 TUs
capability: ESS Privacy SpectrumMgmt ShortSlotTime RadioMeasure (0x1511)
signal: -61.00 dBm
last seen: 2852 ms ago
Information elements from Probe Response frame:
SSID: Free-WiFi
Supported rates: 12.0* 18.0 24.0* 36.0 48.0 54.0
Country: US Environment: bogus

--
Kurt Grutzmacher -=- [email protected]


2024-05-17 00:29:09

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: No packets in monitor mode with rtw89_8852ce

Kurt Grutzmacher <[email protected]> wrote:
> Using a Realtek 8852ce module in monitor mode on Ubuntu 22.04 LTS I am
> able to capture frames on 2.4 GHz channels but not any other
> frequencies. Low power mode is disabled.
>
> [98869.471001] rtw89_8852ce 0000:02:00.0: loaded firmware rtw89/rtw8852c_fw.bin
> [98869.480121] rtw89_8852ce 0000:02:00.0: Firmware version 0.27.56.14,
> cmd version 0, type 1
> [98869.480142] rtw89_8852ce 0000:02:00.0: Firmware version 0.27.56.14,
> cmd version 0, type 3
> [98869.757041] rtw89_8852ce 0000:02:00.0: chip rfe_type is 1
>
> ubuntu@ubuntu:~$ sudo iw realtekwifi0 set freq 2412
> ubuntu@ubuntu:~$ sudo tcpdump -i realtekwifi0

My 8852ce is wlan1, and then below instructions can show up some packets:

sudo iw dev wlan1 interface add mon0 type monitor
sudo ifconfig mon0 up
sudo tcpdump -i mon0


2024-05-17 03:25:19

by Kurt Grutzmacher

[permalink] [raw]
Subject: Re: No packets in monitor mode with rtw89_8852ce

On Thu, May 16, 2024 at 5:29 PM Ping-Ke Shih <[email protected]> wrote:
>
> Kurt Grutzmacher <[email protected]> wrote:
> > Using a Realtek 8852ce module in monitor mode on Ubuntu 22.04 LTS I am
> > able to capture frames on 2.4 GHz channels but not any other
> > frequencies. Low power mode is disabled.
> >
> > [98869.471001] rtw89_8852ce 0000:02:00.0: loaded firmware rtw89/rtw8852c_fw.bin
> > [98869.480121] rtw89_8852ce 0000:02:00.0: Firmware version 0.27.56.14,
> > cmd version 0, type 1
> > [98869.480142] rtw89_8852ce 0000:02:00.0: Firmware version 0.27.56.14,
> > cmd version 0, type 3
> > [98869.757041] rtw89_8852ce 0000:02:00.0: chip rfe_type is 1
> >
> > ubuntu@ubuntu:~$ sudo iw realtekwifi0 set freq 2412
> > ubuntu@ubuntu:~$ sudo tcpdump -i realtekwifi0
>
> My 8852ce is wlan1, and then below instructions can show up some packets:
>
> sudo iw dev wlan1 interface add mon0 type monitor
> sudo ifconfig mon0 up
> sudo tcpdump -i mon0

That just validates my statement that 2.4 GHz channels work. You did
not set a frequency so it started on channel 1.

Try this, or any 5 GHz channel that you know has valid dot11 traffic:

sudo iw dev wlan0 interface add mon0 type monitor
sudo ip link set mon0 up
iw dev mon0 info
Interface mon0
ifindex 8
wdev 0x200000002
addr 1c:ce:51:91:5e:92
type monitor
wiphy 2
channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
sudo iw mon0 set freq 5220
sudo tcpdump -i mon0

For reference, here are my module options. Without these I cannot set
the frequency:

options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss
options rtw89_core debug_mask=65535 disable_ps_mode=y