geerlingguy / raspberry-pi-pcie-devices

Raspberry Pi PCI Express device compatibility database
http://pipci.jeffgeerling.com
GNU General Public License v3.0
1.56k stars 142 forks source link

Test Intel AX210NGW WiFi 6E M.2 card #120

Closed geerlingguy closed 1 year ago

geerlingguy commented 3 years ago

I just ordered a WISE TIGER AX210NGW WiFi Card, Wi-Fi 6E 11AX card, and I'm going to see if I can get it working using a similar layout as what I used for the AX200.

intel-ax210-wifi-6e

The other thing I'd like to see is if I can set it up as an access point and how well it handles that. Apparently the AX200 didn't handle AP mode that well (though I didn't test it at all), and this chipset should handle it better... according to random commenters :)

The WiFi Wiki says the AX210 is supported as of kernel 5.10: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifisupposedly I could get 2+ Gbps through this chipset. We'll see if that's true with the other hardware I have.

Maybe combine this testing with #56?

paulwratt commented 3 years ago

make sure you get the latest kernel fixes for (all) wifi 6 devices

bcliu430 commented 3 years ago

I have tried the raspberry pi 5.10.y kernel. I can get it working with the commit (6495fa3) when I tried on 7/28. I just enabled iwlwifi and copied the latest ucode to /lib/firmware.

BTW, thanks for the ax200 video, it helps a lot for me to make progress on ax210 card.

angelia-gt commented 2 years ago

Thanks for your sharing.

geerlingguy commented 2 years ago

It looks like the AX210 firmware requires kernel 5.10+ (which we have), and is available for download here: https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html

I downloaded iwlwifi-ty-59.601f3a66.0.tgz and ran:

$ tar -xvzf iwlwifi-ty-59.601f3a66.0.tgz
$ cd iwlwifi-ty-59.601f3a66.0/
$ sudo cp iwlwifi-*.ucode /lib/firmware
$ sudo reboot

For the driver, it looks like it'll need a recompile.

bcliu430 commented 2 years ago

It looks like the AX210 firmware requires kernel 5.10+ (which we have), and is available for download here: https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html

I downloaded iwlwifi-ty-59.601f3a66.0.tgz and ran:

$ tar -xvzf iwlwifi-ty-59.601f3a66.0.tgz
$ cd iwlwifi-ty-59.601f3a66.0/
$ sudo cp iwlwifi-*.ucode /lib/firmware
$ sudo reboot

For the driver, it looks like it'll need a recompile.

Check and see if you have iwlwifi and mvm checked in kernel config. When I did some testing before, not all functionalities are fully implemented, i.e. wifi scanning is working but it does not always scan 6GHz channels. It is not fully supported until kernel 5.13.

geerlingguy commented 2 years ago

Using my cross-compile environment, I recompiled enabling iwlwifi in menuconfig:

Device Drivers
  > Network device support
    > Wireless LAN
      > Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
        > Intel Wireless WiFi MVM Firmware support

(I had to check the iwlwifi support to reveal the MVM option).

Also, regarding AP mode for 5/6 Ghz: https://bugzilla.kernel.org/show_bug.cgi?id=206469#c2

geerlingguy commented 2 years ago

Before custom kernel:

pi@seaberry:~ $ uname -a
Linux seaberry 5.10.63-v8+ #1459 SMP PREEMPT Wed Oct 6 16:42:49 BST 2021 aarch64 GNU/Linux

After custom kernel:

pi@seaberry:~ $ uname -a
Linux seaberry 5.10.79-v8+ #1 SMP PREEMPT Thu Nov 18 21:53:24 UTC 2021 aarch64 GNU/Linux

And driver loads:

[   10.878198] iwlwifi 0000:12:00.0: enabling device (0000 -> 0002)
[   10.909737] iwlwifi 0000:10:00.0: api flags index 2 larger than supported by driver
[   10.909878] iwlwifi 0000:10:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 93.8.63.28
[   10.913151] iwlwifi 0000:10:00.0: loaded firmware version 59.601f3a66.0 ty-a0-gf-a0-59.ucode op_mode iwlmvm
[   11.176677] iwlwifi 0000:10:00.0: Detected Intel(R) Wi-Fi 6 AX210 160MHz, REV=0x420
[   11.494958] iwlwifi 0000:10:00.0: base HW address: 84:5c:f3:f6:e9:29
geerlingguy commented 2 years ago

Wrote up a guide since I do this a lot and confuse myself often: Working with multiple WiFi interfaces on a Raspberry Pi.

And dang... I just realized I don't have any external antennae with the plug size for the AX210. I only have the very-slightly-larger size suitable for things like the U.FL antenna connector on the CM4 itself, or larger WiFi cards.

geerlingguy commented 2 years ago

Just ordered a pair of NGFF / IPEX4 / MHF4 antennae for next-day shipping. Hope they come quickly!

angelia-gt commented 2 years ago

Hi friend Can you tell us which order number?thank you

geerlingguy commented 2 years ago

@angelia-gt - See the link — that's the exact part I ordered from Amazon (mostly because it should ship next day :).

angelia-gt commented 2 years ago

龚婷

Fenvi Technology Co., Ltd/国际部

15820354009

geerlingguy commented 2 years ago
$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

wlan1     IEEE 802.11  ESSID:"geerling-acn"  
          Mode:Managed  Frequency:5.18 GHz  Access Point: 3C:7C:3F:6A:FA:C4   
          Bit Rate=1.7296 Gb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=67/70  Signal level=-43 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:77   Missed beacon:0

And iperf in both directions—Mac (10G wired) to seaberry (AX210):

$ iperf3 -c 10.0.100.27
Connecting to host 10.0.100.27, port 5201
[  5] local 10.0.100.100 port 64950 connected to 10.0.100.27 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  29.3 MBytes   246 Mbits/sec                  
[  5]   1.00-2.00   sec  30.0 MBytes   251 Mbits/sec                  
[  5]   2.00-3.00   sec  18.3 MBytes   153 Mbits/sec                  
[  5]   3.00-4.00   sec  29.4 MBytes   247 Mbits/sec                  
[  5]   4.00-5.00   sec  30.1 MBytes   252 Mbits/sec                  
[  5]   5.00-6.00   sec  31.7 MBytes   266 Mbits/sec                  
[  5]   6.00-7.00   sec  31.5 MBytes   264 Mbits/sec                  
[  5]   7.00-8.00   sec  32.2 MBytes   270 Mbits/sec                  
[  5]   8.00-9.00   sec  32.5 MBytes   273 Mbits/sec                  
[  5]   9.00-10.00  sec  30.4 MBytes   255 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec   295 MBytes   248 Mbits/sec                  sender
[  5]   0.00-10.00  sec   295 MBytes   248 Mbits/sec                  receiver

iperf Done.

And seaberry (AX210) to Mac (10G wired):

$ iperf3 -c 10.0.100.100
Connecting to host 10.0.100.100, port 5201
[  5] local 10.0.100.27 port 39026 connected to 10.0.100.100 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   120 MBytes  1.01 Gbits/sec    0   3.29 MBytes       
[  5]   1.00-2.00   sec   148 MBytes  1.23 Gbits/sec    0   3.51 MBytes       
[  5]   2.00-3.00   sec   144 MBytes  1.21 Gbits/sec    0   3.90 MBytes       
[  5]   3.00-4.00   sec   144 MBytes  1.21 Gbits/sec    0   3.90 MBytes       
[  5]   4.00-5.00   sec   145 MBytes  1.22 Gbits/sec    0   3.90 MBytes       
[  5]   5.00-6.00   sec   144 MBytes  1.21 Gbits/sec    0   3.90 MBytes       
[  5]   6.00-7.00   sec   139 MBytes  1.16 Gbits/sec    0   3.90 MBytes       
[  5]   7.00-8.00   sec   136 MBytes  1.14 Gbits/sec    0   3.90 MBytes       
[  5]   8.00-9.00   sec   138 MBytes  1.15 Gbits/sec    0   3.90 MBytes       
[  5]   9.00-10.00  sec   138 MBytes  1.15 Gbits/sec    0   3.90 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.36 GBytes  1.17 Gbits/sec    0             sender
[  5]   0.00-10.01  sec  1.36 GBytes  1.17 Gbits/sec                  receiver

iperf Done.

I was hoping it would've stayed at 1.21 Gbps, since that sounds similar to 1.21 gigawatts, which would've made a great scifi reference.

Anyways, so it seems I can get a lot better TX performance than RX, with a couple mobile antenna and 67/70 link quality.

geerlingguy commented 2 years ago

(Also noting this is through my ASUS RT-AX86U router, which is WiFi 6, but not 6e.)

geerlingguy commented 2 years ago

Need to summarize my findings on the page on the site before closing out this issue.

lealog commented 2 years ago

What is the hardware that you are using to connect ax210 into cm4? Can you please show me the full list of hardware that you are using? I'm assuming you have several pieces (cm4, PCI adapter, etc)?

angelia-gt commented 2 years ago

Can you tell us what is your order number?from which platform?

geerlingguy commented 2 years ago

@angelia-gt - I'm not sure what you're asking... I order most of these things from Amazon, and you seem to be asking a lot about order numbers...?

geerlingguy commented 2 years ago

@lealog - I've been testing through Alftel's Seaberry board, and through their 12-slot M.2 A+E key carrier on a CM4 IO Board as well.

lu-zero commented 2 years ago

Did you try with smaller carrier board as well? (do a A+E M.2 carrier exists?)

aromond commented 2 years ago

Just wanted to say I've been trying to get multiple of these cards working on the seaberry. I was finally able to get 4 ax210 cards working in it after compiling the 5.16 kernel for raspbian 32 bit. had to make sure I included the iwlwifi and iwlmvm drivers in the kernel.

ghost commented 2 years ago

Just wanted to say I've been trying to get multiple of these cards working on the seaberry. I was finally able to get 4 ax210 cards working in it after compiling the 5.16 kernel for raspbian 32 bit. had to make sure I included the iwlwifi and iwlmvm drivers in the kernel.

That seems interesting, are you trying a bonded 4gbit mesh across 4 channels? ax210 shouldn't be able to do 6ghz or 5ghz software AP.

Can you share the iw list of ax210 and whether or not it can operate 6ghz with 5ghz or 2.4ghz simultaneously?

aromond commented 2 years ago

Just wanted to say I've been trying to get multiple of these cards working on the seaberry. I was finally able to get 4 ax210 cards working in it after compiling the 5.16 kernel for raspbian 32 bit. had to make sure I included the iwlwifi and iwlmvm drivers in the kernel.

That seems interesting, are you trying a bonded 4gbit mesh across 4 channels? ax210 shouldn't be able to do 6ghz or 5ghz software AP.

Can you share the iw list of ax210 and whether or not it can operate 6ghz with 5ghz or 2.4ghz simultaneously?

Sorry did not intend to mislead here, for my application I was more interested in monitor mode and capturing. for iw list I see the following:

            Frequencies:
                    * 5955 MHz [1] (22.0 dBm) (no IR)
                    * 5975 MHz [5] (22.0 dBm) (no IR)
                    * 5995 MHz [9] (22.0 dBm) (no IR)
                    * 6015 MHz [13] (22.0 dBm) (no IR)
                    * 6035 MHz [17] (22.0 dBm) (no IR)
                    * 6055 MHz [21] (22.0 dBm) (no IR)
                    * 6075 MHz [25] (22.0 dBm) (no IR)
                    * 6095 MHz [29] (22.0 dBm) (no IR)
                    * 6115 MHz [33] (22.0 dBm) (no IR)
                    * 6135 MHz [37] (22.0 dBm) (no IR)
                    * 6155 MHz [41] (22.0 dBm) (no IR)
                    * 6175 MHz [45] (22.0 dBm) (no IR)
                    * 6195 MHz [49] (22.0 dBm) (no IR)
                    * 6215 MHz [53] (22.0 dBm) (no IR)
                    * 6235 MHz [57] (22.0 dBm) (no IR)
                    * 6255 MHz [61] (22.0 dBm) (no IR)
                    * 6275 MHz [65] (22.0 dBm) (no IR)
                    * 6295 MHz [69] (22.0 dBm) (no IR)
                    * 6315 MHz [73] (22.0 dBm) (no IR)
                    * 6335 MHz [77] (22.0 dBm) (no IR)
                    * 6355 MHz [81] (22.0 dBm) (no IR)
                    * 6375 MHz [85] (22.0 dBm) (no IR)
                    * 6395 MHz [89] (22.0 dBm) (no IR)
                    * 6415 MHz [93] (22.0 dBm) (no IR)
                    * 6435 MHz [97] (22.0 dBm) (no IR)
                    * 6455 MHz [101] (22.0 dBm) (no IR)
                    * 6475 MHz [105] (22.0 dBm) (no IR)
                    * 6495 MHz [109] (22.0 dBm) (no IR)
                    * 6515 MHz [113] (22.0 dBm) (no IR)
                    * 6535 MHz [117] (22.0 dBm) (no IR)
                    * 6555 MHz [121] (22.0 dBm) (no IR)
                    * 6575 MHz [125] (22.0 dBm) (no IR)
                    * 6595 MHz [129] (22.0 dBm) (no IR)
                    * 6615 MHz [133] (22.0 dBm) (no IR)
                    * 6635 MHz [137] (22.0 dBm) (no IR)
                    * 6655 MHz [141] (22.0 dBm) (no IR)
                    * 6675 MHz [145] (22.0 dBm) (no IR)
                    * 6695 MHz [149] (22.0 dBm) (no IR)
                    * 6715 MHz [153] (22.0 dBm) (no IR)
                    * 6735 MHz [157] (22.0 dBm) (no IR)
                    * 6755 MHz [161] (22.0 dBm) (no IR)
                    * 6775 MHz [165] (22.0 dBm) (no IR)
                    * 6795 MHz [169] (22.0 dBm) (no IR)
                    * 6815 MHz [173] (22.0 dBm) (no IR)
                    * 6835 MHz [177] (22.0 dBm) (no IR)
                    * 6855 MHz [181] (22.0 dBm) (no IR)
                    * 6875 MHz [185] (22.0 dBm) (no IR)
                    * 6895 MHz [189] (22.0 dBm) (no IR)
                    * 6915 MHz [193] (22.0 dBm) (no IR)
                    * 6935 MHz [197] (22.0 dBm) (no IR)
                    * 6955 MHz [201] (22.0 dBm) (no IR)
                    * 6975 MHz [205] (22.0 dBm) (no IR)
                    * 6995 MHz [209] (22.0 dBm) (no IR)
                    * 7015 MHz [213] (22.0 dBm) (no IR)
                    * 7035 MHz [217] (22.0 dBm) (no IR)
                    * 7055 MHz [221] (22.0 dBm) (no IR)
                    * 7075 MHz [225] (22.0 dBm) (no IR)
                    * 7095 MHz [229] (22.0 dBm) (no IR)
                    * 7115 MHz [233] (22.0 dBm) (no IR)

If my understanding is correct this means I cannot initiate Radiation, meaning It can't be used as an access point. I think it should still work in monitor mode listening however. unfortunately I don't have a wifi 6e router to test with. My goal is using this with kismet wireless for wardriving and capturing primarily.

ghost commented 2 years ago

If my understanding is correct this means I cannot initiate Radiation

That's correct. No AP mode unfortunately.

Regarding iw list can you also show valid interface combinations?

example:

valid interface combinations:
        * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 2,
          total <= 2, #channels <= 1, STA/AP BI must match

Thanks.

scrappylabs commented 2 years ago

@geerlingguy love the YouTube channel! Our university research lab is trying to do some 6e stuff. Per your guidance we got the AX210 recognized, the RPI sees the 6e SSID from our 6e router, but it is grayed out. Can’t connect to it. No errors in dmesg, just lots of warnings about some iwl calls going across PCIe bus. I’m not sure what is going on any idea? Using the intel 59 firmware. 66/67/68 won’t work. 63 works, but still can’t connect over 6e band. 2.4, and wifi 6 works great.

scrappylabs commented 2 years ago

@geerlingguy love the YouTube channel! Our university research lab is trying to do some 6e stuff. Per your guidance we got the AX210 recognized, the RPI sees the 6e SSID from our 6e router, but it is grayed out. Can’t connect to it. No errors in dmesg, just lots of warnings about some iwl calls going across PCIe bus. I’m not sure what is going on any idea? Using the intel 59 firmware. 66/67/68 won’t work. 63 works, but still can’t connect over 6e band. 2.4, and wifi 6 works great.

Hey ya'll praise the LORD Jesus Christ! I just wanted to say that my issue is solved. The issue is the version of wpa_supplicant.

I followed this tutorial: here

Here is where I deviated:

Be sure you use the iwlwifi 63 firmware and the .pvwm. This did not work for me with iwlwifi 59 firmware.

When installing the new wpa_supplicant, the latest is now v2.11: pi@raspberrypi1:~ $ wpa_supplicant -v wpa_supplicant v2.11-devel-hostap_2_10-170-gc5d9f9064 Copyright (c) 2003-2022, Jouni Malinen <j@w1.fi> and contributors

Be sure you use the exact wpa_supplicant, from the tutorial. I did not have my supplicant know about the 2.4GHz or 5GHz, just the 6GHz Be sure to feed the wpa_supplicant config to wpa_supplicant:

sudo wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0

And it connects! On the desktop the wifi network will still be grayed out, but it will be connected.

Boom: `pi@raspberrypi1:~ $ iwconfig lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11 ESSID:"NETGEAR25-6G" Mode:Managed Frequency:6.135 GHz Access Point: 80:CC:9C:2C:7A:7D Bit Rate=490 Mb/s Tx-Power=22 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on Link Quality=70/70 Signal level=-40 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:12 Missed beacon:0`

geerlingguy commented 2 years ago

@scrappylabs - Now that you have it working... it'd be interesting to see if you could run some speedtests to some more-than-1 Gbps targets and see how fast you can get it. I see you have 70/70 signal at -40 dBm, though bit rate seems low for that kind of signal if it's a newer 6e AP.

scrappylabs commented 2 years ago

@geerlingguy Would really appreciate your help with that. I was looking through your blog but couldn't find the configurations you use for iperf3 for your tests. I can try to change the bit rate if you know the iwconfig commands, I think the card is just selecting a lower bitrate, I may be able to force it. The AP says the link is 1738Mbps, we know uplink can be slower than downlink. If it would be easier to discuss I'm open to a zoom call.

Also we didn't need to apply the iwlwifi.patch. Apparently that has been fixed as of kernel 5.15, at least for the AX210. I do get some memory warnings regarding the iwl driver in dmesg.

geerlingguy commented 2 years ago

@scrappylabs - For iperf3 the ideal would be to run it on the AP itself but that's not usually possible. Failing that, on another computer on the network (ideally connected through 2.5+ Gbps connection) run iperf3 -s. Then on the Pi that's connected to 6e, run iperf3 -c [ip of main computer running iperf3 -s here].

That will get TCP bandwidth from Pi to the main computer. Then to get the reverse, run separately iperf3 -c [ip of main computer running iperf3 -s here] -R. There's an option to run --bidir to run both tests at once, too, though sometimes that can behave strangely.

scrappylabs commented 2 years ago

@geerlingguy Results are underwhelming. First, I don't have a 2.5Gbps ethernet port on my laptops. I verified through ethernet I can only get your typical Gbit speed. I think the issue is the bit rate, I can't configure the bit rate of the AX210. It may be an intel firmware issue. Windows drivers seem to be working great. Linux is more iffy. I tried using the latest 71 driver, but it didn't work. Only 63 is stable for me right now.

ghost commented 2 years ago

@geerlingguy AP mode can be made to work

https://github.com/coolsnowwolf/lede/issues/9976#issuecomment-1242657036

credits to https://tildearrow.org/?p=post&month=7&year=2022&item=lar

paulwratt commented 2 years ago

nice, and presetting the country code gets around those issues the original author had ..

geerlingguy commented 2 years ago

Now I have extra incentive to get the new 6E AP Netgear sent me working, so I can do some more testing...

ghost commented 2 years ago

Now I have extra incentive to get the new 6E AP Netgear sent me working, so I can do some more testing...

you can make one now using MT7921k, MT7922, and MT7921u https://github.com/morrownr/USB-WiFi/issues/104#issuecomment-1235173344

cn-goic commented 1 year ago

[我刚买了AX210网卡,目前内核5.15,PVE驱动都已更新,Openwrt无法加载无线模块,向你们学习下怎么弄

paulwratt commented 1 year ago

我刚买了AX210网卡,目前内核5.15,PVE驱动都已更新,Openwrt无法加载无线模块,向你们学习下怎么弄

according to translate.google.com ..

I just bought the AX210 network card, the current kernel 5.15, the PVE driver has been updated, Openwrt cannot load the wireless module, I will learn from you how to do it

That last bit might be mis-translated, might be asking for help.

cn-goic commented 1 year ago

问题解决了,我的PVE有驱动,但是虚拟化的openwrt里缺少驱动,先将ucode放入/lib/fireware/ PVE直通AX210会导致openwrt死机,解决办法是: vi /etc/pve/local/qemu-server/100.conf 在hostpci0 下面一行加入 args: -set device.hostpci0.x-msix-relocation=bar2

今天测试开启了AP模式 但只有WIFI6E+2.4GHz可以用,如果选择WIFI6E+5Ghz有发射信号但设备无法识别出来,不知道是不是手机的问题; 需要手动选择信道,开启MU-MIMO,关闭WMM模式和强制40M频宽选项,网络选择lan

paulwratt commented 1 year ago

this time providing help (https://translate.google.com)

The problem is solved, my PVE has a driver, but the virtualized openwrt lacks the driver, first put the ucode into /lib/fireware/PVE through AX210 will cause openwrt to crash, the solution is: vi /etc/pve/local/qemu-server/100.conf Add args to the line below hostpci0: -set device.hostpci0.x-msix-relocation=bar2

Today's test turned on the AP mode, but only WIFI6E+2.4GHz can be used. If you choose WIFI6E+5Ghz, there is a transmitting signal but the device cannot recognize it. I don't know if it is a problem with the mobile phone; Need to manually select the channel, turn on MU-MIMO, turn off WMM mode and forced 40M bandwidth option, choose lan for network

paulwratt commented 1 year ago

Today's test turned on the AP mode, but only WIFI6E+2.4GHz can be used.

A couple of days ago I read a post somewhere about why this happens. The Intel device driver no longer allows setting the Country code before device startup. If you do, it will automatically turn off 5Ghz.

The solutions was to turn the device on within range of another WiFi AP and let the drivers startup auto-scan detect the Country Code from other device(s) . You do not need to connect to the AP/device, it just needs to be within range of another device when the Intel device does its initial auto-scan, after which you can set the Country Code (and channel).

You can see the problem here cant you? What if you dont have any devices within range? What if the other device defaults to the wrong Country Code (because its not force-set - RPiOS used to do this)?

Once detected and set, the problem is not present, unless you reboot the AP OS (or maybe reset the Intel device). This "feature" was not present in the initial (old?) driver, so if you can figure out when it change, post here.

Hope that helps.

(yay for Intel being nice to users and programmers - bah) I think this is to stop certain Intel network devices being used in "unauthorised" or "non-approved" locations

ghost commented 1 year ago

@paulwratt with tildearrow's patch, it does do the scan and if it finds an AP around, it uses that country code heres the kicker, when theres no 5GHz AP around, it will accept the hint you set (country code you set) as long as it did the scan. Hope it helps.

samwiseg0 commented 1 year ago

What is the hardware that you are using to connect ax210 into cm4? Can you please show me the full list of hardware that you are using? I'm assuming you have several pieces (cm4, PCI adapter, etc)?

@lealog, If you would like a more compact solution there is this board from MCUZone. They have a PoE and non PoE variant.

p.s. Thank you Jeff for the detailed information and your cross-compile platform. It made the process of getting this to work much easier.

paulwratt commented 1 year ago

with tildearrow's patch

I am pretty sure that the same guy that wrote the article, he wrote a patch for something specific (wpa_supplicant?). The important thing to know tho, it that if there is no 5G devices around when the driver scans, 5G will be disabled .

ghost commented 1 year ago

@paulwratt 5Ghz AP will work as it will accept the 802.11d hint if theres no 5GHz AP around. but you really have to do that scan. intel's lar is weird like that (also its not supplicant, its hostapd) its like

you: hey ax200 im in US ax200: really? I have to confirm it *proceeds to scan* you: see? ax200: yeah theres nothing around, I'll take your word for it. *sets your country to US* *proceeds to open channel 149~161*

now if theres 5GHz APs around

you: hey ax200 im in US ax200: really? I have to confirm it *proceeds to scan* I found an AP blasting a CA regdomain so im sure as hell that youre in CA *sets your country to CA* *proceeds to open channel 149~161 because thats also allowed in CA*

you can always try. go to a place without any 5GHz AP around then

iw reg set XX iw dev wlanX scan iw phy

something like this https://gist.github.com/stintel/7456ac6860ca492aa48abc967c16cc7a

Now see that some 5GHz channels will open up and ready to initiate radiation. as for the channels that gets open, it will not allow any DFS channel (no dfs scanning capability) nor any channels that requires TPC or channels with lower limits than 22dBm (no TPC). This is why only 149 and up gets opened as those channels are non-DFS and allows > 22dBm

Intel encodes this on their firmware, the PHY is "self-managed" It will accept the country yes (if it cant get it from the environment) but it wont accept your frequency table (wireless-regdb) no matter how hard you modify it.

so far this method works on 9260AC, AX200, AX210. In theory this should also work on 7260AC and 8260AC. ofcourse you do have to understand the downsides. no DFS (Dynamic Frequency Selection) no TPC (Transmit Power Control) no ACS (Automatic Channel Selection) because no noisefloor readings

but yeah its not so bad

https://i.imgur.com/hOVZ1k8.png

geerlingguy commented 1 year ago

Back to doing some testing on this over the next week, now that I have a proper 6E AP at my house over 2.5G wired Ethernet.

geerlingguy commented 1 year ago

New round of tests. Using built-in WiFi:

pi@wifitest:~ $ iwconfig wlan0
wlan0     IEEE 802.11  ESSID:"nebula"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: C8:9E:43:13:4A:41   
          Bit Rate=24 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-35 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:40  Invalid misc:0   Missed beacon:0

pi@wifitest:~ $ iperf3 -c 10.0.100.15
Connecting to host 10.0.100.15, port 5201
[  5] local 10.0.100.163 port 33512 connected to 10.0.100.15 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  6.41 MBytes  53.8 Mbits/sec    0    348 KBytes       
[  5]   1.00-2.00   sec  6.21 MBytes  52.1 Mbits/sec    0    506 KBytes       
[  5]   2.00-3.00   sec  5.85 MBytes  49.1 Mbits/sec    0    653 KBytes       
[  5]   3.00-4.00   sec  6.25 MBytes  52.4 Mbits/sec    0    724 KBytes       
[  5]   4.00-5.00   sec  1.25 MBytes  10.5 Mbits/sec    0    762 KBytes       
[  5]   5.00-6.00   sec  2.50 MBytes  21.0 Mbits/sec    2    553 KBytes       
[  5]   6.00-7.00   sec  1.25 MBytes  10.5 Mbits/sec    2    392 KBytes       
[  5]   7.00-8.00   sec  2.50 MBytes  21.0 Mbits/sec    0    428 KBytes       
[  5]   8.00-9.00   sec  5.00 MBytes  41.9 Mbits/sec    0    455 KBytes       
[  5]   9.00-10.00  sec  5.00 MBytes  41.9 Mbits/sec    0    471 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  42.2 MBytes  35.4 Mbits/sec    4             sender
[  5]   0.00-10.02  sec  39.5 MBytes  33.1 Mbits/sec                  receiver

iperf Done.

I made sure to disable the built-in Ethernet during the test with sudo ifconfig eth0 down.

And after forcing wlan1 instead of wlan0, here are the results with the AX210 from about 15' away through two drywall walls:

pi@wifitest:~ $ iwconfig wlan1
wlan1     IEEE 802.11  ESSID:"nebula"  
          Mode:Managed  Frequency:5.785 GHz  Access Point: C8:9E:43:13:4A:61   
          Bit Rate=117 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=63/70  Signal level=-47 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:45   Missed beacon:0

pi@wifitest:~ $ iperf3 -c 10.0.100.15
Connecting to host 10.0.100.15, port 5201
[  5] local 10.0.100.26 port 39476 connected to 10.0.100.15 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  50.1 MBytes   420 Mbits/sec    0   2.27 MBytes       
[  5]   1.00-2.00   sec  47.5 MBytes   398 Mbits/sec    0   2.88 MBytes       
[  5]   2.00-3.00   sec  51.2 MBytes   430 Mbits/sec    0   3.40 MBytes       
[  5]   3.00-4.00   sec  51.2 MBytes   430 Mbits/sec    0   3.40 MBytes       
[  5]   4.00-5.00   sec  51.2 MBytes   430 Mbits/sec    0   3.40 MBytes       
[  5]   5.00-6.00   sec  50.0 MBytes   419 Mbits/sec    0   3.40 MBytes       
[  5]   6.00-7.00   sec  51.2 MBytes   430 Mbits/sec    0   3.57 MBytes       
[  5]   7.00-8.00   sec  51.2 MBytes   430 Mbits/sec    0   3.57 MBytes       
[  5]   8.00-9.00   sec  50.0 MBytes   419 Mbits/sec    0   3.57 MBytes       
[  5]   9.00-10.00  sec  48.8 MBytes   409 Mbits/sec    0   3.57 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   503 MBytes   422 Mbits/sec    0             sender
[  5]   0.00-10.01  sec   500 MBytes   419 Mbits/sec                  receiver
geerlingguy commented 1 year ago

Testing is complete and I updated its page on the CM4 DB site, so I'm going to close this issue—but feel free to continue discussion here, especially concerning AP performance!

dcousens commented 1 year ago

@geerlingguy did you try the AX200/AX210's on >40MHz bandwidth?

I have a few of each, and neither of them can operate without packet loss and drop outs on recent Linux kernels, if you are greater than 40MHz.

geerlingguy commented 1 year ago

@dcousens - Hmm... I just realized this thing is connecting on the 5 GHz network too... Apparently I need to upgrade to the latest wpa_supplicant?

pi@wifitest:~ $ iwconfig wlan1
wlan1     IEEE 802.11  ESSID:"nebula"  
          Mode:Managed  Frequency:5.785 GHz  Access Point: C8:9E:43:13:4A:61   
          Bit Rate=458.8 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-19 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:154   Missed beacon:0

pi@wifitest:~ $ wpa_supplicant -v
wpa_supplicant v2.9
Copyright (c) 2003-2019, Jouni Malinen <j@w1.fi> and contributors

Going to try https://forums.raspberrypi.com/viewtopic.php?t=338937#p2029874

dcousens commented 1 year ago

iw dev wlan1 info might be easier for retrieving that information

geerlingguy commented 1 year ago

Indeed:

pi@wifitest:~ $ iw dev wlan1 info
Interface wlan1
    ifindex 4
    wdev 0x1
    addr 84:5c:f3:f6:e9:29
    ssid nebula
    type managed
    wiphy 0
    channel 157 (5785 MHz), width: 40 MHz, center1: 5795 MHz
    txpower 22.00 dBm
    multicast TXQ:
        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes    tx-packets
        0   0   0   0   0   0   0   0       0

Even forcing a try on a 6E-only network (either 80 or 160 MHz), I can't seem to get the Pi to connect. It will only connect up to 5E, even with wpa_supplicant 2.10...