事務所はもっぱら有線LANを使用しているが、たまに無線wifi adapter経由で仕事もする.

「Buffalo」様の「WI-U3-1200AX2/N」を購入してみた.
2021年11月発売の製品https://www.buffalo.jp/product/detail/wi-u3-1200ax2.html

これをRockyLinuxに刺して使えるか確かめた.

ubuntu22

root@ubuntu22:~# grep VERSION_ID /etc/os-release
VERSION_ID="22.04"
root@ubuntu22:~# uname -r
5.19.0-35-generic
root@ubuntu22:~# git clone https://github.com/lwfinger/rtl8852au
root@ubuntu22:~# cd rtl8852au/
root@ubuntu:~/rtl8852au# git log -1
commit cb319bee1375ccf37eabe71dad6876a2894bb155 (HEAD -> dwa-x1850, origin/dwa-x1850, origin/HEAD)
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Sat Feb 25 02:54:07 2023 -0600
 
    rtw8852au: Add TP-Link Archer TX20UH to USB table
 
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
 
root@ubuntu:~/rtl8852au# make; make install; reboot

再起動後

root@ubuntu22:~# nmcli radio wifi
disabled
root@ubuntu22:~# nmcli radio wifi on
root@ubuntu22:~# nmcli radio wifi
enabled
root@ubuntu22:~# nmcli device wifi list
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY
        6C:59:76:XX:XX:XX  FS040W_XXXXXX     Infra  1     130 Mbit/s  77      ???_  WPA2
        FC:4A:E9:XX:XX:XX  BCW710J-XXXXXXXX  Infra  6     130 Mbit/s  47      ??__  WPA1 WPA2
        F8:B7:97:XX:XX:XX  aterm-XXXXXXXX    Infra  6     130 Mbit/s  42      ??__  WPA1 WPA2
        6C:59:76:XX:XX:XX  FS040W_XXXXXX     Infra  36    270 Mbit/s  0       ____  WPA2
root@ubuntu22:~#

と有効で無線も取れた.

ubuntu20

root@ubuntu:~# grep VERSION_ID /etc/os-release
VERSION_ID="20.04"
root@ubuntu:~# uname -r
5.15.0-60-generic
root@ubuntu:~#

ubuntu22と同じく問題なくコンパイル、電波取得可能

RockyLinux9

[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.1 (Blue Onyx)
 
[root@rockylinux9 ~]# ip link
(略
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
(略
[root@rockylinux9 ~]# uname -r
5.14.0-162.12.1.el9_1.0.2.x86_64
 
[root@rockylinux9 ~]# dnf list installed |grep kernel
kernel.x86_64                                    5.14.0-162.6.1.el9_1             @anaconda
kernel-core.x86_64                               5.14.0-162.6.1.el9_1             @anaconda
kernel-core.x86_64                               5.14.0-162.12.1.el9_1.0.2        @baseos
kernel-devel.x86_64                              5.14.0-162.6.1.el9_1             @AppStream
kernel-devel.x86_64                              5.14.0-162.12.1.el9_1.0.2        @appstream
kernel-devel-matched.x86_64                      5.14.0-162.12.1.el9_1.0.2        @appstream
kernel-headers.x86_64                            5.14.0-162.12.1.el9_1.0.2        @appstream
kernel-modules.x86_64                            5.14.0-162.6.1.el9_1             @anaconda
kernel-srpm-macros.noarch                        1.0-11.el9                       @AppStream
kernel-tools.x86_64                              5.14.0-162.6.1.el9_1             @anaconda
kernel-tools-libs.x86_64                         5.14.0-162.6.1.el9_1             @anaconda
[root@rockylinux9 ~]#

「5.14.0-162.12.1」でwifiモジュールを作ろうとしたが、「5.14.0-162.12.1」の「kernel-modules」が入手できなかったので、kernel関係は全て最新にしてみた

[root@rockylinux9 ~]# dnf update kernel kernel-devel
 (kernel, kernel-core, kernel-modules, kernel-devel の「5.14.0-162.18.1.el9_1」がインストールされる)
 
[root@rockylinux9 ~]# reboot
[root@rockylinux9 ~]# uname -r
5.14.0-162.18.1.el9_1.x86_64
 
[root@rockylinux9 ~]# git clone https://github.com/lwfinger/rtl8852au
[root@rockylinux9 ~]# cd rtl8852au/
[root@rockylinux9 rtl8852au]# make ; make install; reboot
[root@rockylinux9 ~]# ip a
 :
3: wls33u1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether f2:f3:5d:03:8e:d5 brd ff:ff:ff:ff:ff:ff permaddr c4:3c:ea:33:dc:91
    altname wlp2s1u1
[root@rockylinux9 ~]#

一応デバイスは認識できて電波も取得できた

RockyLinux8

OS提供のカーネルではダメ見たい. RHELさんからRHEL8向けのパッケージ「kmod-redhat-rtw89」を出してるけどkernelバージョンが合わないので却下. 同じくORACLE様からも同様のパッケージが出てるけど、こちらもカーネルバージョンが異なるので却下.

っでどうするかになりますが、
http://elrepo.org/tiki/HomePageを使ってkernelを最新版に引き上げてドライバを淹れてみた

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
yum install --enablerepo=elrepo-kernel kernel-ml kernel-ml-devel
 
git clone https://github.com/lwfinger/rtl8852au
cd rtl8852au
make; make install; reboot

っでこうなった

[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.7 (Green Obsidian)
[root@rockylinux ~]# ip a
(略
3: wls256u2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 76:81:66:02:6f:bf brd ff:ff:ff:ff:ff:ff permaddr c4:3c:ea:33:dc:91
    altname wlp27s0u2
[root@rockylinux ~]#

「WI-U3-866DS」

手元に「Buffalo」様の「WI-U3-866DS」がある. &発売時期: 2017年5月 https://www.buffalo.jp/product/detail/wi-u3-866ds.html

これをRocky/Ubuntuに接続して使えるか確かめてみる.

ubuntu20.04

root@e:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@e:~#

デバイスを刺して確認してみると

root@e:~# lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0411:025d BUFFALO INC. (formerly MelCo., Inc.) WI-U3-866D
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@e:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether d0:50:99:97:56:a1 brd ff:ff:ff:ff:ff:ff
root@e:~#

となってどうも既定では使えないみたい.
だがさすがというべきか、「Software & Updates」から「Additional Drivers」欄を開くとそこには
「BUDDALO INC. (formerly MelCo., Inc.):」とか表示されて「r8812au」のドライバーを用意してくれている.
それを有効にすれば、dkmsで作ってくれて再起動が促されます.
っがこのドライバーは結局使えなかった...

っで調べたらhttps://github.com/gordboy/rtl8812au-5.9.3.2が使えた

root@e:~# git clone https://github.com/gordboy/rtl8812au-5.9.3.2
 
root@e:~# cp -arp rtl8812au-5.9.3.2 /usr/src/rtl8812au-5.9.3.2
root@e:~# dkms add -m rtl8812au -v 5.9.3.2
 
Creating symlink /var/lib/dkms/rtl8812au/5.9.3.2/source ->
                 /usr/src/rtl8812au-5.9.3.2
 
DKMS: add completed.
root@e:~# dkms build -m rtl8812au -v 5.9.3.2
 
Kernel preparation unnecessary for this kernel.  Skipping...
 
Building module:
cleaning build area...
'make' -j4 KVER=5.13.0-48-generic KSRC=/lib/modules/5.13.0-48-generic/build............
Signing module:
 - /var/lib/dkms/rtl8812au/5.9.3.2/5.13.0-48-generic/x86_64/module/8812au.ko
Secure Boot not enabled on this system.
cleaning build area...
 
DKMS: build completed.
root@e:~# dkms install -m rtl8812au -v 5.9.3.2
 
8812au.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.13.0-48-generic/updates/dkms/
 
depmod...
 
DKMS: install completed.
root@e:~# dkms status
rtl8812au, 5.9.3.2, 5.13.0-48-generic, x86_64: installed
root@e:~#

これで「WI-U3-866DS」を差し込むと

root@e:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether d0:50:99:97:56:a1 brd ff:ff:ff:ff:ff:ff
3: wlx50c4ddb3c0e1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 50:c4:dd:b3:c0:e1 brd ff:ff:ff:ff:ff:ff
root@e:~#

とデバイスが自動的に登録されて、

root@e:~# nmcli dev wifi list
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY
        60:84:XX:XX:XX:XX  Buffalo-G-XXXX    Infra  10    270 Mbit/s  64      ???_  WPA2

とか見える

Rocky

参照先 https://quintrokk.subness.net/?p=2057

[root@e ~]# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)
 
[root@e ~]# lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0411:025d BUFFALO INC. (formerly MelCo., Inc.)       <--- これ
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 
[root@e ~]#

一応見えた. っがそのままではnicデバイスとしては見えないみたい

[root@e ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether d0:50:99:97:56:a1 brd ff:ff:ff:ff:ff:ff
[root@e ~]#

やはり既定でカーネルモジュールが用意されていないようで、対応するモジュールをインストールする.
調べると「WI-U3-866DS」の中は「RTL8812au」のようで、このカーネルモジュールを用意いたします.

参照先の通りにhttps://github.com/aircrack-ng/rtl8812auを使います

[root@e ~]# git clone https://github.com/aircrack-ng/rtl8812au
[root@e ~]# cd rtl8812au

ソースコードに修正を施します. ここでは「uname -r」の値が「4.18.0-372.9.1.el8.x86_64」なので「4.18.0」を起点としてます.

--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -460,7 +460,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
        if (started) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0))
                cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
 #else
                cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
@@ -7735,7 +7735,7 @@ exit:
        return ret;
 }
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
 static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy,
                                              struct wireless_dev *wdev,
                                              struct mgmt_frame_regs *upd)
@@ -10187,7 +10187,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
        .mgmt_tx = cfg80211_rtw_mgmt_tx,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0))
        .update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
 #else
        .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,

っでインストール

[root@e rtl8812au]# which gcc
/usr/bin/gcc
 
[root@e rtl8812au]# gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
[root@e rtl8812au]# make dkms_install
mkdir: created directory '/usr/src/8812au-5.6.4.2_35491.20191025'
cp -r * /usr/src/8812au-5.6.4.2_35491.20191025
dkms add -m 8812au -v 5.6.4.2_35491.20191025
Creating symlink /var/lib/dkms/8812au/5.6.4.2_35491.20191025/source -> /usr/src/8812au-5.6.4.2_35491.20191025
dkms build -m 8812au -v 5.6.4.2_35491.20191025
 
Building module:
cleaning build area...
'make' -j4 KVER=4.18.0-372.9.1.el8.x86_64 KSRC=/lib/modules/4.18.0-372.9.1.el8.x86_64/build..............
cleaning build area...
dkms install -m 8812au -v 5.6.4.2_35491.20191025
 
88XXau.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.18.0-372.9.1.el8.x86_64/extra/
Adding any weak-modules
depmod....
dkms status -m 8812au
8812au/5.6.4.2_35491.20191025, 4.18.0-372.9.1.el8.x86_64, x86_64: installed
 
[root@e rtl8812au]# dkms status
8812au/5.6.4.2_35491.20191025, 4.18.0-372.9.1.el8.x86_64, x86_64: installed
 :
[root@e rtl8812au]# ls -l /lib/modules/4.18.0-372.9.1.el8.x86_64/extra/
 :
-rw-r--r-- 1 root root   711512 Jun 11 21:01 88XXau.ko.xz
[root@e rtl8812au]#

上手く行った模様. っでこの作った「88XXau.ko.xz」を調べると下記のようになる

[root@e ~]# modinfo 88XXau
filename:       /lib/modules/4.18.0-372.9.1.el8.x86_64/extra/88XXau.ko.xz
version:        v5.6.4.2_35491.20191025
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
rhelversion:    8.6
 :
depends:        cfg80211
name:           88XXau
vermagic:       4.18.0-372.9.1.el8.x86_64 SMP mod_unload modversions
parm:           rtw_wireless_mode:int
parm:           rtw_monitor_overwrite_seqnum:Overwrite the sequence number of injected frames (int)
parm:           rtw_monitor_retransmit:Retransmit injected frames (int)
 :
[root@e ~]#

いろいろな「parm」があるけど、ここらはwindowsPCに差し込んでそれぞれのパラメータの意味を知ってからの定義でしょうか.
ここでは簡単に

[root@e ~]# echo "options 88XXau rtw_switch_usb_mode=1" > /etc/modprobe.d/88XXau.conf

と.
デバイスを定義します. 現状は

[root@e rtl8812au]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether d0:50:99:97:56:a1 brd ff:ff:ff:ff:ff:ff
[root@e rtl8812au]#

これで

[root@e ~]# modprobe 88XXau
[root@e ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether d0:50:99:97:56:a1 brd ff:ff:ff:ff:ff:ff
4: &憧t0u2: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2312 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
[root@e ~]#

となるが、文字化けしている...
そして

[root@e ~]# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtl88XXau, 5000M    <--- ここ
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
[root@e ~]#

とusb3で行っているみたい


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2023-03-12 (日) 21:27:08 (89d)