TinkerBoard2主板自带的无线模块为RTL8822CE,PCIe接口
?之前在风火轮下载的Linux源码编译出来的BuildRoot根文件系统没有相关的驱动文件
[root@rk3399:/]# find . -name *.ko
[root@rk3399:/]# lsmod
Module Size Used by Not tainted
[root@rk3399:/]#
在kernel路径下执行make menuconfig,然后按/输入8822,Ok
Symbol: RTL8822CE [=m] │ │ Type : tristate │ │ Prompt: Realtek 8822C PCIE WiFi │ │ Location: │ │ -> Device Drivers │ │ -> Network device support (NETDEVICES [=y]) │ │ -> Wireless LAN (WLAN [=y]) │ │ -> Rockchip Wireless LAN support (WL_ROCKCHIP [=y]) │ │ (3) -> Realtek Wireless Device Driver Support (RTL_WIRELESS_SOLUTION [=y]) │ │ Defined at drivers/net/wireless/rockchip_wlan/rtl8822ce/Kconfig:1 │ │ Depends on: NETDEVICES [=y] && WLAN [=y] && WL_ROCKCHIP [=y] && RTL_WIRELESS_SOLUTION [=y] && PCI [=y]
确认配置没问题,RTL8822CE编译成模块,其他配置都有打开
?在8822ce源码目录也确实编译了8822ce.ko驱动文件,但是打包的时候没有拷贝
在Linux_SDK源码目录下执行make menuconfig,没有8822CE选择,而且wifi chip默认选择AWCM256,导致BR2_PACKAGE_RKWIFIBT_VENDOR的值为CYPRESS?
Symbol: BR2_PACKAGE_RKWIFIBT_VENDOR [=CYPRESS] │
│ Type : string │
│ Defined at package/rockchip/rkwifibt/Config.in:107 │
│ Depends on: BR2_PACKAGE_ROCKCHIP [=y] && BR2_PACKAGE_RKWIFIBT [=y]
修改./buildroot/package/Config.in,添加RTL8822CE模块,并在make menuconfig里面选中
diff --git a/package/rockchip/rkwifibt/Config.in b/package/rockchip/rkwifibt/Config.in index e3d25606..2adf0f7a 100644 --- a/package/rockchip/rkwifibt/Config.in +++ b/package/rockchip/rkwifibt/Config.in @@ -52,6 +52,8 @@ config BR2_PACKAGE_RKWIFIBT_RTL8812AU bool "RTL8812AU" config BR2_PACKAGE_RKWIFIBT_RTL8821CS bool "RTL8821CS" +config BR2_PACKAGE_RKWIFIBT_RTL8822CE + bool "RTL8822CE" config BR2_PACKAGE_RKWIFIBT_RTL8822BE bool "RTL8822BE" config BR2_PACKAGE_RKWIFIBT_RTL8822BS @@ -96,6 +98,7 @@ config BR2_PACKAGE_RKWIFIBT_CHIPNAME default "RTL8723DS" if BR2_PACKAGE_RKWIFIBT_RTL8723DS default "RTL8812AU" if BR2_PACKAGE_RKWIFIBT_RTL8812AU default "RTL8821CS" if BR2_PACKAGE_RKWIFIBT_RTL8821CS + default "RTL8822CE" if BR2_PACKAGE_RKWIFIBT_RTL8822CE default "RTL8822BE" if BR2_PACKAGE_RKWIFIBT_RTL8822BE default "RTL8822BS" if BR2_PACKAGE_RKWIFIBT_RTL8822BS default "RTL8822BU" if BR2_PACKAGE_RKWIFIBT_RTL8822BU @@ -126,6 +129,7 @@ config BR2_PACKAGE_RKWIFIBT_VENDOR default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8723DS default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8821CS default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8812AU + default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8822CE default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8822BE default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8822BS default "REALTEK" if BR2_PACKAGE_RKWIFIBT_RTL8822BU @@ -155,6 +159,7 @@ config BR2_PACKAGE_RKWIFIBT_WIFI_KO default "8723cs.ko" if BR2_PACKAGE_RKWIFIBT_RTL8723CS default "8723ds.ko" if BR2_PACKAGE_RKWIFIBT_RTL8723DS default "8812au.ko" if BR2_PACKAGE_RKWIFIBT_RTL8812AU + default "8822ce.ko" if BR2_PACKAGE_RKWIFIBT_RTL8822CE default "8822be.ko" if BR2_PACKAGE_RKWIFIBT_RTL8822BE default "8822bs.ko" if BR2_PACKAGE_RKWIFIBT_RTL8822BS default "8822bu.ko" if BR2_PACKAGE_RKWIFIBT_RTL8822BU
添加以下四个package
iw:?可用于OPEN、WEP这两种"认证/加密",以及扫描WIFI热点等;
wpa_supplicant:?可用于前面4种"认证/加密";
hostapd:?能够使得无线网卡切换为AP模式;
dhcp:?STA模式使WIFI网卡动态获取IP,AP模式分配IP;
diff --git a/configs/rockchip_rk3399_tinkerboard2_defconfig b/configs/rockchip_rk3399_tinkerboard2_defconfig index 969059f3..3bc52487 100644 --- a/configs/rockchip_rk3399_tinkerboard2_defconfig +++ b/configs/rockchip_rk3399_tinkerboard2_defconfig @@ -20,4 +20,14 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to RK3399 Buildroot" BR2_TARGET_GENERIC_GETTY_PORT="ttyFIQ0" BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y BR2_PACKAGE_WIFIAUTOSETUP=y +BR2_PACKAGE_RKWIFIBT_RTL8822CE=y BR2_PACKAGE_RKWIFIBT_BTUART="ttyS0" +BR2_PACKAGE_LIBBSD=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_SERVER=y +BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK=y +BR2_PACKAGE_DHCP_RELAY=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_HOSTAPD_DRIVER_RTW=y +BR2_PACKAGE_HOSTAPD_EAP=y +BR2_PACKAGE_HOSTAPD_WPS=y
[root@rk3399:/]# cp /media/usb1/8822ce.ko /vendor/lib/modules/
[root@rk3399:/]# sync
[root@rk3399:/]# insmod /vendor/lib/modules/8822ce.ko
[ 2992.171377] RTW: module init start
[ 2992.172628] RTW: rtl88x2ce v5.12.1.8-2-g58609677a.20210923_COEX20210504-2323
[ 2992.173898] RTW: build time: Jan 10 2024 22:21:16
[ 2992.175185] RTW: rtl88x2ce BT-Coex version = COEX20210504-2323
[ 2992.176933] RTW: [HALMAC]55772M
[ 2992.176933] HALMAC_MAJOR_VER = 1
[ 2992.176933] HALMAC_PROTOTYPE_VER = 6
[ 2992.176933] HALMAC_MINOR_VER = 6
[ 2992.176933] HALMAC_PATCH_VER = 22
[ 2992.182655] RTW: ERROR [HALMAC][ERR]Dump efuse in suspend
[ 2992.187375] RTW: HW EFUSE
[ 2992.188503] RTW: 0x000: 29 81 00 8F FF 20 0B 00 98 04 E4 35 10 03 F1 EB
[ 2992.189620] RTW: 0x010: 4F 4F 51 51 52 52 46 46 49 49 49 02 00 00 FF FF
[ 2992.190808] RTW: 0x020: FF FF 54 53 54 53 51 4F 4E 4C 4D 4D 4C 4D 4D 4E
[ 2992.192019] RTW: 0x030: 02 00 FF FF 00 FF 00 00 FF FF 59 59 5B 5C 5D 5E
[ 2992.193222] RTW: 0x040: 4D 4E 50 50 51 02 00 00 FF FF FF FF 4F 50 53 52
[ 2992.194461] RTW: 0x050: 55 53 52 50 51 51 4F 4F 50 50 02 00 FF FF 00 FF
[ 2992.195636] RTW: 0x060: 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.196810] RTW: 0x070: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.198069] RTW: 0x080: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.199197] RTW: 0x090: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F[root@rk3399:/]# F
[ 2992.200344] RTW: 0x0A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.201508] RTW: 0x0B0: FF FF FF FF FF FF FF FF 7F 44 FF 00 FF FF FF FF
[ 2992.202549] RTW: 0x0C0: FF 21 00 11 00 00 FF FF 00 33 01 FF FF FF FF FF
[ 2992.203519] RTW: 0x0D0: 20 20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.204509] RTW: 0x0E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.205386] RTW: 0x0F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.206234] RTW: 0x100: F0 94 65 D3 58 C5 FF FF CD F0 FF FF FF FF FF FF
[ 2992.207099] RTW: 0x110: 44 44 FC A0 D8 D8 FD FF 35 8C FF FF FF FF FF FF
[ 2992.207997] RTW: 0x120: 48 E7 DA 0A F3 3D EC 10 22 C8 3B 1A 50 37 FF FF
[ 2992.208858] RTW: 0x130: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.209675] RTW: 0x140: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.210539] RTW: 0x150: D3 13 48 35 FF 5E 02 00 FF FF FF FF FF FF FF FF
[ 2992.211438] RTW: 0x160: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.212297] RTW: 0x170: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.213119] RTW: 0x180: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.213908] RTW: 0x190: 01 FE FF FF 00 00 00 0F FF FF FF FF FF FF FF FF
[ 2992.214761] RTW: 0x1A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.215624] RTW: 0x1B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.216434] RTW: 0x1C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.217313] RTW: 0x1D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.218187] RTW: 0x1E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.219015] RTW: 0x1F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.219762] RTW: 0x200: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.220480] RTW: 0x210: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.221237] RTW: 0x220: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.221916] RTW: 0x230: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.222522] RTW: 0x240: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.223093] RTW: 0x250: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.223689] RTW: 0x260: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.224284] RTW: 0x270: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.224864] RTW: 0x280: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.225421] RTW: 0x290: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.225959] RTW: 0x2A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.226482] RTW: 0x2B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.227048] RTW: 0x2C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.227573] RTW: 0x2D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.228077] RTW: 0x2E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.228567] RTW: 0x2F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
[ 2992.229034] RTW: hal_com_config_channel_plan chplan:0x7F
[ 2992.251030] RTW: [RF_PATH] ver_id.RF_TYPE:RF_2T2R
[ 2992.251500] RTW: [RF_PATH] HALSPEC's rf_reg_trx_path_bmp:0x33, rf_reg_path_avail_num:2, max_tx_cnt:2
[ 2992.251952] RTW: [RF_PATH] PG's trx_path_bmp:0x33, max_tx_cnt:0
[ 2992.252423] RTW: [RF_PATH] Registry's trx_path_bmp:0x00, tx_path_lmt:0, rx_path_lmt:0
[ 2992.252921] RTW: [RF_PATH] HALDATA's trx_path_bmp:0x33, max_tx_cnt:2
[ 2992.253428] RTW: [RF_PATH] HALDATA's rf_type:RF_2T2R, NumTotalRFPath:2
[ 2992.253941] RTW: [TRX_Nss] HALSPEC - tx_nss:2, rx_nss:2
[ 2992.254481] RTW: [TRX_Nss] Registry - tx_nss:0, rx_nss:0
[ 2992.255016] RTW: [TRX_Nss] HALDATA - tx_nss:2, rx_nss:2
[ 2992.255551] RTW: txpath=0x3, rxpath=0x3
[ 2992.256081] RTW: txpath_1ss:0x1, num:1
[ 2992.256623] RTW: txpath_2ss:0x3, num:2
[ 2992.268911] RTW: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1
[ 2992.277479] RTW: rtw_ndev_init(wlan0) if1 mac_addr=48:e7:da:0a:f3:3d
[ 2992.279547] RTW: module init ret=0
[ 2992.285783] rtl88x2ce 0000:01:00.0 wlp1s0: renamed from wlan0
[root@rk3399:/]# ifconfig -a
dummy0 Link encap:Ethernet HWaddr E2:27:05:47:24:21
inet6 addr: fe80::6cc4:9189:94b6:f8e1/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:4384 (4.2 KiB)
eth0 Link encap:Ethernet HWaddr 7C:10:C9:ED:C6:8D
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:27
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1456 errors:0 dropped:0 overruns:0 frame:0
TX packets:1456 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:105280 (102.8 KiB) TX bytes:105280 (102.8 KiB)
wlp1s0 Link encap:Ethernet HWaddr 48:E7:DA:0A:F3:3D
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
[root@rk3399:/]#
?驱动加载成功,也创建了无线接口wlp1s0(无线第1号PCIe扩展卡的0号端口)
修改/usr/bin/wifi_start.sh测试
#!/bin/sh WIFISSID=$1 WIFIPWD=$2 CONF=/tmp/wpa_supplicant.conf cp /etc/wpa_supplicant.conf /tmp/ echo "connect to WiFi ssid: $WIFISSID, Passwd: $WIFIPWD" sed -i "s/SSID/$WIFISSID/g" $CONF sed -i "s/PASSWORD/$WIFIPWD/g" $CONF killall wpa_supplicant sleep 1 wpa_supplicant -B -i wlp1s0 -c $CONF
运行结果
[root@rk3399:/]# wifi_start.sh CMCC-VwMh 6fGWREFq connect to WiFi ssid: CMCC-VwMh, Passwd: 6fGWREFq killall: wpa_supplicant: no process killed Successfully initialized wpa_supplicant [ 3609.276343] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384) [ 3609.278015] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready [root@rk3399:/]# [ 3613.244527] RTW: rtw_set_802_11_connect(wlp1s0) fw_state=0x00000008 [ 3613.355782] RTW: start auth [ 3613.364209] RTW: auth success, start assoc [ 3613.375036] RTW: assoc success [ 3613.378485] RTW: ============ STA [ac:54:74:d2:65:9e] =================== [ 3613.380759] RTW: mac_id : 0 [ 3613.382867] RTW: wireless_mode : 0x0b [ 3613.385043] RTW: mimo_type : 2 [ 3613.387223] RTW: static smps : N [ 3613.389403] RTW: bw_mode : 20MHz, ra_bw_mode : 20MHz [ 3613.391682] RTW: rate_id : 2 [ 3613.393963] RTW: rssi : -1 (%), rssi_level : 0 [ 3613.396285] RTW: is_support_sgi : Y, is_vht_enable : N [ 3613.398610] RTW: disable_ra : N, disable_pt : N [ 3613.400926] RTW: is_noisy : N [ 3613.403174] RTW: txrx_state : 0 [ 3613.405324] RTW: curr_tx_rate : CCK_1M (L) [ 3613.407470] RTW: curr_tx_bw : 20MHz [ 3613.409538] RTW: curr_retry_ratio : 0 [ 3613.411614] RTW: ra_mask : 0x000000000fffffff [ 3613.411614] [ 3622.475076] RTW: OnDeAuth(wlp1s0) reason=15, ta=ac:54:74:d2:65:9e, ignore=0 [ 3626.433364] RTW: nolinked power save enter [ 3626.644748] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384) [ 3626.649229] RTW: nolinked power save leave [ 3626.652990] RTW: rtw_set_802_11_connect(wlp1s0) fw_state=0x00000008 [ 3626.770382] RTW: start auth [ 3626.779375] RTW: auth success, start assoc [ 3626.790531] RTW: assoc success [ 3626.794589] RTW: ============ STA [ac:54:74:d2:65:9e] =================== [ 3626.797887] RTW: mac_id : 0 [ 3626.800965] RTW: wireless_mode : 0x0b [ 3626.803972] RTW: mimo_type : 2 [ 3626.806923] RTW: static smps : N [ 3626.809840] RTW: bw_mode : 20MHz, ra_bw_mode : 20MHz [ 3626.812790] RTW: rate_id : 2 [ 3626.815673] RTW: rssi : -1 (%), rssi_level : 0 [ 3626.818532] RTW: is_support_sgi : Y, is_vht_enable : N [ 3626.821451] RTW: disable_ra : N, disable_pt : N [ 3626.824380] RTW: is_noisy : N [ 3626.827329] RTW: txrx_state : 0 [ 3626.830223] RTW: curr_tx_rate : CCK_1M (L) [ 3626.833122] RTW: curr_tx_bw : 20MHz [ 3626.835966] RTW: curr_retry_ratio : 0 [ 3626.838797] RTW: ra_mask : 0x000000000fffffff [ 3626.838797] [ 3626.886292] RTW: recv eapol packet 1/4 [ 3626.894257] RTW: send eapol packet 2/4 [ 3626.904935] RTW: recv eapol packet 3/4 [ 3626.906945] RTW: send eapol packet 4/4 [ 3626.909115] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready [ 3626.909265] RTW: set pairwise key camid:0, addr:ac:54:74:d2:65:9e, kid:0, type:AES [ 3626.912977] RTW: set group key camid:1, addr:ac:54:74:d2:65:9e, kid:1, type:TKIP [root@rk3399:/]# ifconfig dummy0 Link encap:Ethernet HWaddr E2:27:05:47:24:21 inet6 addr: fe80::6cc4:9189:94b6:f8e1/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:4384 (4.2 KiB) eth0 Link encap:Ethernet HWaddr 7C:10:C9:ED:C6:8D UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:27 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:1784 errors:0 dropped:0 overruns:0 frame:0 TX packets:1784 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:129552 (126.5 KiB) TX bytes:129552 (126.5 KiB) wlp1s0 Link encap:Ethernet HWaddr 48:E7:DA:0A:F3:3D inet6 addr: fe80::4ae7:daff:fe0a:f33d/64 Scope:Link inet6 addr: 2409:8a55:8843:cd00:4ae7:daff:fe0a:f33d/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7 errors:0 dropped:0 overruns:0 frame:0 TX packets:9 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1242 (1.2 KiB) TX bytes:1094 (1.0 KiB) [root@rk3399:/]#
没有分配IPv4地址,网络不通
[root@rk3399:/]# ping 192.168.1.14
connect: Network is unreachable
手动配置一下IP,可以ping通代码服务器[root@rk3399:/]# ifconfig wlp1s0 192.168.1.40 netmask 255.255.255.0
[root@rk3399:/]# ping 192.168.1.14
PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.
64 bytes from 192.168.1.14: icmp_seq=1 ttl=64 time=6.78 ms
64 bytes from 192.168.1.14: icmp_seq=2 ttl=64 time=2.53 ms
64 bytes from 192.168.1.14: icmp_seq=3 ttl=64 time=70.3 ms
64 bytes from 192.168.1.14: icmp_seq=4 ttl=64 time=3.15 ms
^C
--- 192.168.1.14 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 2.532/20.713/70.384/28.723 ms
想要访问外网还需要配置默认网关和DNS
[root@rk3399:/]# route add default gw 192.168.1.1 [root@rk3399:/]# vi /etc/resolv.conf # Generated by dhcpcd # /etc/resolv.conf.head can replace this line # /etc/resolv.conf.tail can replace this line nameserver 114.114.114.114 nameserver 192.168.1.1 # 保存退出 [root@rk3399:/]# ping www.baidu.com PING www.baidu.com(2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:a d75)) 56 data bytes 64 bytes from 2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75): icmp_seq=1 ttl=54 time=83.0 ms 64 bytes from 2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75): icmp_seq=2 ttl=54 time=105 ms 64 bytes from 2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75): icmp_seq=3 ttl=54 time=19.7 ms ^C --- www.baidu.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 19.766/69.520/105.783/36.389 ms
执行wifi_start.sh连接网络后可以使用dhclient自动配置IP地址和DNS?
[root@rk3399:/]# dhclient wlp1s0
[root@rk3399:/]# ifconfig wlp1s0
wlp1s0 Link encap:Ethernet HWaddr 48:E7:DA:0A:F3:3D
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2409:8a55:8843:cd00:a9cf:5754:f3a0:c8a3/64 Scope:Global
inet6 addr: fe80::94c4:6894:f0cf:6c41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:356 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:183258 (178.9 KiB) TX bytes:5181 (5.0 KiB)
[root@rk3399:/]# ping www.baidu.com
PING www.baidu.com(2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75)) 56 data bytes
64 bytes from 2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75): icmp_seq=1 ttl=54 time=89.6 ms
64 bytes from 2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75): icmp_seq=2 ttl=54 time=27.7 ms
64 bytes from 2409:8c54:870:67:0:ff:b0c2:ad75 (2409:8c54:870:67:0:ff:b0c2:ad75): icmp_seq=3 ttl=54 time=30.1 ms
^C
--- www.baidu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 27.748/49.202/89.684/28.642 ms
[root@rk3399:/]# cat /etc/resolv.conf
resolv.conf resolv.conf.dhclient
[root@rk3399:/]# cat /etc/resolv.conf
nameserver 192.168.1.1
[root@rk3399:/]# cat /etc/resolv.conf.dhclient
nameserver 192.168.1.1
[root@rk3399:/]#
wifi_start.sh改为
#!/bin/sh WIFISSID=$1 WIFIPWD=$2 CONF=/tmp/wpa_supplicant.conf cp /etc/wpa_supplicant.conf /tmp/ echo "connect to WiFi ssid: $WIFISSID, Passwd: $WIFIPWD" sed -i "s/SSID/$WIFISSID/g" $CONF sed -i "s/PASSWORD/$WIFIPWD/g" $CONF killall wpa_supplicant sleep 1 wpa_supplicant -B -i wlp1s0 -c $CONF sleep 5 dhclient wlp1s0
修改./buildroot/package/rockchip/rkwifibt/rkwifibt.mk,编译buildroot时就可以拷贝8822ce.ko到buildroot/output/rockchip_rk3399_tinkerboard2/target/system/lib/modules/8822ce.ko,我是执行rm -rf ./buildroot/output/后再编译buildroot的
diff --git a/package/rockchip/rkwifibt/rkwifibt.mk b/package/rockchip/rkwifibt/rkwifibt.mk index b50465df..aab7637a 100644 --- a/package/rockchip/rkwifibt/rkwifibt.mk +++ b/package/rockchip/rkwifibt/rkwifibt.mk @@ -46,6 +46,7 @@ define RKWIFIBT_INSTALL_COMMON $(INSTALL) -D -m 0755 $(@D)/wifi_start.sh $(TARGET_DIR)/usr/bin/ $(INSTALL) -D -m 0755 $(@D)/wifi_ap6xxx_rftest.sh $(TARGET_DIR)/usr/bin/ $(INSTALL) -D -m 0755 $(@D)/src/rk_wifi_init $(TARGET_DIR)/usr/bin/ + $(INSTALL) -D -m 0644 $(TOPDIR)/../kernel/drivers/net/wireless/rockchip_wlan/rtl8822ce/*.ko $(TARGET_DIR)/vendor/lib/modules/ $(SED) 's/WIFI_KO/\/$(FIRMWARE_DIR)\/lib\/modules\/$(BR2_PACKAGE_RKWIFIBT_WIFI_KO)/g' $(@D)/$(SXLOAD_WIFI) $(SED) 's/BT_TTY_DEV/\/dev\/$(BT_TTY_DEV)/g' $(@D)/$(SXLOAD_WIFI) -$(INSTALL) -D -m 0755 $(@D)/$(SXLOAD_WIFI) $(TARGET_DIR)/etc/init.d/
网上也有说如果需要重新编译某个package可以删除.stamp_相关的文件,如rkwifibt-1.0.0,rm -rf?buildroot/output/rockchip_rk3399_tinkerboard2/build/rkwifibt-1.0.0/.stamp_*
或者执行make clean
开机自动加载wifi驱动
Starting system message bus: done /etc/init.d/S36load_wifi_modules: line 43: can't create /sys/class/rfkill/rfkill1/state: nonexistent directory wpa_supplicant.conf init wpa_supplicant.conf init [ 7.390571] RTW: module init start [ 7.392032] RTW: rtl88x2ce v5.12.1.8-2-g58609677a.20210923_COEX20210504-2323 [ 7.393456] RTW: build time: Jan 12 2024 17:07:15 [ 7.394828] RTW: rtl88x2ce BT-Coex version = COEX20210504-2323 [ 7.396891] rtl88x2ce 0000:01:00.0: enabling device (0000 -> 0002) [ 7.398580] RTW: [HALMAC]55772M [ 7.398580] HALMAC_MAJOR_VER = 1 [ 7.398580] HALMAC_PROTOTYPE_VER = 6 [ 7.398580] HALMAC_MINOR_VER = 6 [ 7.398580] HALMAC_PATCH_VER = 22 [ 7.403342] RTW: ERROR [HALMAC][ERR]Dump efuse in suspend [ 7.407825] RTW: HW EFUSE [ 7.408752] RTW: 0x000: 29 81 00 8F FF 20 0B 00 98 04 E4 35 10 03 F1 EB [ 7.409672] RTW: 0x010: 4F 4F 51 51 52 52 46 46 49 49 49 02 00 00 FF FF [ 7.410637] RTW: 0x020: FF FF 54 53 54 53 51 4F 4E 4C 4D 4D 4C 4D 4D 4E [ 7.411596] RTW: 0x030: 02 00 FF FF 00 FF 00 00 FF FF 59 59 5B 5C 5D 5E [ 7.412579] RTW: 0x040: 4D 4E 50 50 51 02 00 00 FF FF FF FF 4F 50 53 52 [ 7.413552] RTW: 0x050: 55 53 52 50 51 51 4F 4F 50 50 02 00 FF FF 00 FF [ 7.414544] RTW: 0x060: 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.415565] RTW: 0x070: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.416580] RTW: 0x080: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.417538] RTW: 0x090: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.418489] RTW: 0x0A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.419420] RTW: 0x0B0: FF FF FF FF FF FF FF FF 7F 44 FF 00 FF FF FF FF [ 7.420283] RTW: 0x0C0: FF 21 00 11 00 00 FF FF 00 33 01 FF FF FF FF FF [ 7.421161] RTW: 0x0D0: 20 20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.422036] RTW: 0x0E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.422920] RTW: 0x0F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.423793] RTW: 0x100: F0 94 65 D3 58 C5 FF FF CD F0 FF FF FF FF FF FF [ 7.424657] RTW: 0x110: 44 44 FC A0 D8Start ing network: D8 FD FF 35 8C FF FF FF FF FF FF [ 7.425522] RTW: 0x120: 48 E7 DA 0A F3 3D EC 10 22 C8 3B 1A 50 37 FF FF [ 7.426390] RTW: 0x130: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.427250] RTW: 0x140: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.428100] RTW: 0x150: D3 13 48 35 FF 5E 02 00 FF FF FF FF FF FF FF FF [ 7.428943] RTW: 0x160: FF FF FF FF FF FF FOK F FF FF FF FF FF FF FF FStarting dhcpcd... F FF [ 7.429793] RTW: 0x170: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.430584] RTW: 0x180: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.431328] RTW: 0x190: 01 FE FF FF 00 00 00 0F FF FF FF FF FF FF FF FF [ 7.432099] RTW: 0x1A0: FF FF dev: loaded udev FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.432889] RTW: 0x1B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.433654] RTW: 0x1C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.434430] RTW: 0x1D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.435165] RTW: 0x1E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.435932] RTW: 0x1F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.436634] RTW: 0x200: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.437290] RTW: 0x210: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.437935] RTW: 0x220: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.438546] RTW: 0x230: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.439151] RTW: 0x240: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.439709] RTW: 0x250: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.440235] RTW: 0x260: FF FF FF FF FF FF FF FF FF FF FF FF no interfac es have a carrieFr F FF forked to background, child pid 540 FF FF [ 7.440757] RTW: 0x270: FF FF FF FF FF FF FF FFStarting ntpd: FF FF FF FF FF FF FF FF [ 7.441279] RTW: 0x280: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.441805] RTW: 0x290: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.442332] RTW: 0x2A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.442882] RTW: 0x2B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.443378] RTW: 0x2C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.443854] RTW: 0x2D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.444322] RTW: 0x2E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.444794] RTW: 0x2F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF [ 7.445263] RTW: hal_com_config_channel_plan chplan:0x7F [ 7.467777] BUG: spinlock bad magic on CPU#5, insmod/499 [ 7.468246] lock: 0xffffffc079517460, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 [ 7.468682] CPU: 5 PID: 499 Comm: insmod Not tainted 4.19.193 #11 [ 7.469147] Hardware name: ASUS Tinker Board 2/2S (DT) [ 7.OK 469617] Call trace: [ 7.470111] dump_backtrace+0x0/0x188 [ 7.470585] show_stack+0x24/0x30 [ 7.471080] dump_stack+0x8c/0xb4 [ 7.471557] spin_bug+0x88/0xa8 [ 7.472014] do_raw_spin_lock+0x3c/0xd8 [ 7.472499] _raw_spin_lock_irqsave+0xStarting dropbea2 sshd: 8/0x38 [ 7.473113] rtl8822ce_reset_bd+0x74/0x174 [8822ce] [ 7.473715] rtw_hal_irp_reset+0x28/0x34 [8822ce] [ 7.474301] init_mac_flow+0x90/0x164 [8822ce] [ 7.474915] rtw_halmac_dlfw+0x94/0xc4 [8822ce] [ 7.475542] rtl8822c_fw_dl+0x50/0x184 [8822ce] [ 7.476175] rtw_hal_fw_dl+0x2c/0x40 [8822ce] [ 7.476829] hal_read_mac_hidden_rpt+0x138/0x2e0 [8822ce] [ 7.477508] rtl8822c_read_efuse+0xeac/0xf38 [8822ce] [ 7.478189] read_adapter_info+0x20/0x38 [8822ce] [ 7.478906] rtw_hal_read_chip_info+0xc0/0xe8 [8822ce] [ 7.479656] rtw_pci_primary_adapter_init+0x110/0x1fc [8822ce] [ 7.480424] rtw_drv_init+0xb10/0xbc8 [8822ce] [ 7.481133] pci_device_probe+0xbc/0x12c [ 7.481842] really_probe+0x2a8/0x3a4 [ 7.482556] driver_probe_device+0x124/0x134 [ 7.483285] device_driver_attach+0x50/0x7c [ 7.484040] __driver_attach+0x13c/0x140 [ 7.484811] bus_for_each_dev+0x8c/0xd4 [ 7.485594] driver_attach+0x30/0x3c [ 7.486379] bus_add_driver+0x1b4/0x1f8 [ 7.487158] driver_register+0xb8/0xf0 [ 7.487921] __pci_register_driver+0x70/0x80 [ 7.488737] rtw_drv_entry+0xa4/0x1000 [8822ce] [ 7.489473] do_one_initcall+0xa0/0x1c0 [ 7.490212] do_init_module+0x64/0x1f4 [ 7.490937] load_module+0x1ac8/0x1c14 [ 7.491654] __se_sys_finit_module+0xd8/0xf4 [ 7.492438] __arm64_sys_finit_module+0x24/0x30 [ 7.493207] el0_svc_common.constprop.0+0xe8/0x168 [ 7.493961] el0_svc_handler+0x70/0x8c [ 7.494705] el0_svc+0x8/0xc [ 7.496372] RTW: [RF_PATH] ver_id.RF_TYPE:RF_2T2R [ 7.497170] RTW: [RF_PATH] HALSPEC's rf_reg_trx_path_bmp:0x33, rf_reg_path_avail_num:2, max_tx_cnt:2 [ 7.498004] RTW: [RF_PATH] PG's trx_path_bmp:0x33, max_tx_cnt:0 [ 7.498856] RTW: [RF_PATH] Registry's trx_path_bmp:0x00, tx_path_lmt:0, rx_path_lmt:0 [ 7.499758] RTW: [RF_PATH] HALDATA's trx_path_bmp:0x33, max_tx_cnt:2 [ 7.500627] RTW: [RF_PATH] HALDATA's rf_type:RF_2T2R, NumTotalRFPath:2 [ 7.501491] RTW: [TRX_Nss] HALSPEC - tx_nss:2, rx_nss:2 [ 7.502399] RTW: [TRX_Nss] Registry - tx_nss:0, rx_nss:0 [ 7.503305] RTW: [TRX_Nss] HALDATA - tx_nss:2, rx_nss:2 [ 7.504174] RTW: txpath=0x3, rxpath=0x3 [ 7.505014] RTW: txpath_1ss:0x1, num:1 [ 7.505847] RTW: txpath_2ss:0x3, num:2 [ 7.526205] RTW: ADAPTIVITY_VERSION 9.7.07 [ 7.527007] RTW: RTW_ADAPTIVITY_EN_ENABLE [ 7.527746] RTW: RTW_ADAPTIVITY_MODE_NORMAL [ 7.528579] RTW: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1 [ 7.545447] RTW: rtw_ndev_init(wlan0) if1 mac_addr=48:e7:da:0a:f3:3d [ 7.547133] RTW: rtw_ndev_init(p2p0) if2 mac_addr=4a:e7:da:0a:f3:3d [ 7.549147] RTW: module init ret=0 [ 7.552201] rtl88x2ce 0000:01:00.0 wlp1s0: renamed from wlan0 OK [ 7.585898] udevd[158]: Error changing net interface name p2p0 to wlp1s0: File exists [ 7.586966] udevd[158]: could not rename interface '5' from 'p2p0' to 'wlp1s0': File exists [ 7.723Starting launcher: 207] Generic PHY stmmac-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:00, irq=POLL) [ 7.735214] rk_gmac-dwmac fe300000.ethernet eth0: No Safety Features support found [ 7.736268] rk_gmac-dwmac fe300000.ethernet eth0: PTP not supported byDebug: configfs_init HW [ 7.737371] [WOL] wakeup enable [ 7.737489] ===========wol_io_isr [ 7.738686] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 8.078575] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384) [ 8.080532] IPv6: ADDRCmkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uac1.gOs0':N No Fsuch( file or directory NETDEV_UP): wlp1s0: link is not ready [ 8.081755] Imkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uac2.gs0': No such file or directory Pv6: ADDRCONF(NETDEV_UP): p2p0: link is not ready [ 8.182043] file system registered mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/mtp.gs0': No such file or directory [ 8.199879] using random self ethernet address [ 8.201141] Read the Ethernet MAC address from EEPROM:
?连接WIFI后自动分配IP
[root@rk3399:/]# wifi_start.sh CMCC-VwMh 6fGWREFq connect to WiFi ssid: CMCC-VwMh, Passwd: 6fGWREFq killall: wpa_supplicant: no process killed Successfully initialized wpa_supplicant [ 280.788331] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384) [ 280.790992] RTW: nolinked power save leave [ 284.622110] RTW: nolinked power save enter [ 284.833030] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384) [ 284.837537] RTW: nolinked power save leave [ 284.841183] RTW: rtw_set_802_11_connect(wlp1s0) fw_state=0x00000008 [ 285.007434] RTW: start auth [ 285.017692] RTW: auth success, start assoc [ 285.028840] RTW: assoc success [ 285.033748] RTW: ============ STA [ac:54:74:d2:65:9e] =================== [ 285.034887] RTW: mac_id : 0 [ 285.035917] RTW: wireless_mode : 0x0b [ 285.036914] RTW: mimo_type : 2 [ 285.037889] RTW: static smps : N [ 285.038889] RTW: bw_mode : 20MHz, ra_bw_mode : 20MHz [ 285.039848] RTW: rate_id : 2 [ 285.040779] RTW: rssi : -1 (%), rssi_level : 0 [ 285.041713] RTW: is_support_sgi : Y, is_vht_enable : N [ 285.042718] RTW: disable_ra : N, disable_pt : N [ 285.043708] RTW: is_noisy : N [ 285.044704] RTW: txrx_state : 0 [ 285.045720] RTW: curr_tx_rate : CCK_1M (L) [ 285.046719] RTW: curr_tx_bw : 20MHz [ 285.047709] RTW: curr_retry_ratio : 0 [ 285.048701] RTW: ra_mask : 0x000000000fffffff [ 285.048701] [ 285.122332] RTW: recv eapol packet 1/4 [ 285.130736] RTW: send eapol packet 2/4 [ 285.146426] RTW: recv eapol packet 3/4 [ 285.148432] RTW: send eapol packet 4/4 [ 285.150559] RTW: set pairwise key camid:0, addr:ac:54:74:d2:65:9e, kid:0, type:AES [ 285.150717] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready [ 285.152697] RTW: set group key camid:1, addr:ac:54:74:d2:65:9e, kid:1, type:TKIP [root@rk3399:/]# ifconfig wlp1s0 wlp1s0 Link encap:Ethernet HWaddr 48:E7:DA:0A:F3:3D inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: 2409:8a55:8843:cd00:503a:defc:a86c:7274/64 Scope:Global inet6 addr: fe80::254e:7928:f2ce:ae29/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:234 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:119722 (116.9 KiB) TX bytes:5241 (5.1 KiB) [root@rk3399:/]# ping www.baidu.com PING www.baidu.com(2409:8c54:870:34e:0:ff:b024:1916 (2409:8c54:870:34e:0:ff:b024:1916)) 56 data bytes 64 bytes from 2409:8c54:870:34e:0:ff:b024:1916 (2409:8c54:870:34e:0:ff:b024:1916): icmp_seq=1 ttl=54 time=96.9 ms 64 bytes from 2409:8c54:870:34e:0:ff:b024:1916 (2409:8c54:870:34e:0:ff:b024:1916): icmp_seq=2 ttl=54 time=121 ms 64 bytes from 2409:8c54:870:34e:0:ff:b024:1916 (2409:8c54:870:34e:0:ff:b024:1916): icmp_seq=3 ttl=54 time=20.7 ms 64 bytes from 2409:8c54:870:34e:0:ff:b024:1916 (2409:8c54:870:34e:0:ff:b024:1916): icmp_seq=4 ttl=54 time=22.8 ms ^C --- www.baidu.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3005ms rtt min/avg/max/mdev = 20.741/65.414/121.129/44.474 ms
代码修改链接:?