wifi
通过dmesg发现可以识别到设备为无线网卡,并驱动蓝牙,但是在ifconfig中没有找到对应的wlan0。
推断有可能是内核里面没有针对8723du wifi的驱动。所以需要查询当前的5.10内核是否包含8723du的驱动。到https://linux-hardware.org/ 上查看。
并结合dmesg的usb信息
image970×90 10.5 KB可以得到信息6.3之前的内核是只包含了蓝牙驱动,6.3之后的内核才包含了内核驱动。
获取rtl8723du的驱动
git clone https://github.com/lwfinger/rtl8723du
拷贝到./kernel/drivers/net/wireless/rockchip_wlan/
Kconfig加入source "drivers/net/wireless/rockchip_wlan/rtl8723du/Kconfig"
Makefile加入obj-$(CONFIG_RTL8723DU) += rtl8723du/
config RTL8723DU
tristate "Realtek 8723DU USB WiFi"
help
Help message of RTL8723DU
内核使能RTL8723DU,make编译报错误,再适当调整一下即可编译成功。
修改Makefile,不单独使用ko文件。
#obj-m := $(MODULE_NAME).o
obj-$(CONFIG_RTL8723DU) := $(MODULE_NAME).o
其中有个错误
ERROR: modpost: module 8723du uses symbol kernel_read from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.
命名空间问题。在os_dep/osdep_service.c中加入:
:MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
Bluetooth
[ 78.365798] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[ 78.366600] Bluetooth: hci0: RTL: rom_version status=0 version=2
[ 78.366622] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[ 78.367549] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723d_fw.bin failed with error -2
[ 78.367579] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723d_fw.bin not found
[ 91.208816] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[ 91.210849] Bluetooth: hci0: RTL: rom_version status=0 version=2
[ 91.210873] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[ 91.211055] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723d_fw.bin failed with error -2
[ 91.211081] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723d_fw.bin not found
root@xd68:~#
缺少的文件,把文件拷贝到/lib/firmware/中。
[ 115.246275] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
[ 115.248019] Bluetooth: hci0: RTL: rom_version status=0 version=2
[ 115.248044] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_fw.bin
[ 115.248681] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723d_config.bin
[ 115.251089] Bluetooth: hci0: RTL: cfg_sz 14, total sz 32558
[ 115.521042] Bluetooth: hci0: RTL: fw version 0x829937de
hci0: Type: Primary Bus: USB
BD Address: 24:8A:3B:19:1F:22 ACL MTU: 1021:8 SCO MTU: 255:12
UP RUNNING
RX bytes:2150 acl:0 sco:0 events:177 errors:0
TX bytes:33501 acl:0 sco:0 commands:173 errors:0
Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'RTK_BT_4.1'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 4.1 (0x7) Revision: 0x8299
LMP Version: 4.1 (0x7) Subversion: 0x37de
Manufacturer: Realtek Semiconductor Corporation (93)