lwfinger / rtw89

Driver for Realtek 8852AE, an 802.11ax device
GNU General Public License v2.0
1.25k stars 156 forks source link

8852ce: No packets from 5GHz in Monitor mode #336

Open grutz opened 4 months ago

grutz commented 4 months ago

Using a 8852ce module on Ubuntu 22.04 LTS I am able to capture frames on most 2.4 GHz channels when in monitor mode. 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)

As soon as the frequency is moved to a 5 GHz or 6E-enabled channel, no packets:

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
    multicast TXQ:
        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes    tx-packets
        0   0   0   0   0   0   0   0       0
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

However APs are seen on freq 5220 when doing an iw realtekwifi0 scan process:

...
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
...
pkshih commented 3 months ago

Please try below commands to see if it works to you:

sudo rfkill unblock all

sudo iw dev wlan0 interface add mon0 type monitor
sudo ifconfig mon0 down
sudo ifconfig mon0 up
sudo wireshark  // select mon0, and use wireshark UI to select channel.