移植USB RTL8723DU WIFI无线驱动给Milk-V Duo

为了给手上的duo支持wifi无线,买了一个采用usb接口的RTL8723DU,在内核编译时把所有与RTL无线和RTL蓝牙相关的驱动都选择后,并且在内核配置中将usb设置成host模式。

注意!!如果设置成了host模式,将不能通过rndis连接duo

把网卡接到自己画的扩展版,通过dmesg发现可以识别到设备为无线网卡,并驱动蓝牙,但是在ifconfig中没有找到对应的wlan0。


推断有可能是内核里面没有针对8723du wifi的驱动。所以需要查询当前的5.10内核是否包含8723du的驱动。

通过以下网址

并结合dmesg的usb信息

可以得到信息6.3之前的内核是只包含了蓝牙驱动,6.3之后的内核才包含了内核驱动

而当前duo的内核是5.10,不支持,需要移植驱动。

驱动我选择了lwfinger提供的驱动

以下是具体移植操作步骤:

1、先下载duo-app-sdk

image

2、解压duo-sdk.tar.gz

tar zvxf duo-sdk.tar.gz

3、获取rtl8723du的驱动

git clone https://github.com/lwfinger/rtl8723du

4、进入到下载下来的驱动目录

5、执行编译命令

make ARCH=riscv CROSS_COMPILE=交叉编译工具链 KSRC=内核目录绝对路径

交叉编译工具链是sdk目录下的

riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-
内核绝对路径是buildroot-sdk目录下的
linux_5.10/build/cv1800b_milkv_duo_sd

我自己的编译语句,因为有部分路径是不一样的,不要直接复制使用,供大家参考和修改

make arch=RISCV CROSS_COMPILE=/home/kamin/code/duo-examples/duo-sdk/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl- KSRC=/home/kamin/code/duo-buildroot-sdk/linux_5.10/build/cv1800b_milkv_duo_sd

执行完成后,可以看到已经编译好8723du.ko,我们把它上传到duo中

6、在duo中加载驱动

insmod 8723du.ko

再通过dmesg输出信息,我们可以看到成功加载了8723du的驱动

7、启用WiFi网卡

ifconfig wlan0

8、设置连接信息,编辑duo系统中的 /etc/wpa_supplicant.conf,在network中加入以下两行,加入后保存

ssid=“你的WiFi名称”
psk=“你的WiFi密码”

image

9、连接wifi

wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf &

10、手动设置IP或自动设置IP

通过DHCP获取IP

udhcpc -R -n -O search -p /var/run/udhcpc.wlan0.pid -i wlan0 -x hostname:milkv

手动设置静态IP

ifconfig wlan0 192.168.1.119 netmask 255.255.255.0
route add default gw 192.168.1.1

  • 192.168.1.119 为要设置的静态ip
  • 255.255.255.0 为要设置的子网掩码
  • 192.168.1.1 为要设置的网关

PING测试

3 Likes

由谷歌翻译自英文翻译:
我按照你的步骤安装了 mt7601,该内核中已经有驱动程序。问题是,当我连接任何 USB 设备时,我只得到“usb 1-1: new high-speed USB device number 8 using dwc2”。您可以发布您的内核配置,以防存在任何使您的内核工作正常但我找不到的差异吗?谢谢。
original:
I followed your steps for a mt7601, which already has drivers in that kernel. The problem is that i only get “usb 1-1: new high-speed USB device number 8 using dwc2” when I connect any usb device. Can you publish your kernel config in case there are any differences that make yours work but that I can’t find? Thank you.

官方镜像,取消rndis.sh脚本自启即usb host模式,然后把usb无线的驱动加载上,就可以使用了

1、 Remove rndis.sh script from auto-starting to switch to USB host mode, then load the driver for the USB wireless adapter, then it can be used.

2、 Here is a summary of the relevant information from the PDF document:
In section “3.3.1 USB 2.0 Host 操作过程” , it mentions that you can switch the USB mode by executing the command
echo host > /proc/cviusb/otg_role
PeripheralDriver_zh.pdf (sophgo.com)

Thank you very much, it ended up being that i was editing the wrong kernel config and that it wasn’t getting enough power. Also it appears that some wireless devices may need firmware to be put in /lib/firmware

你好,我在编译好驱动后,在 milkv-duo 上进行安装,dmesg 会看到以下 Warning,请问是驱动模块的编译出问题了吗?我看外网上有人反映过类似问题,不过不是 riscv 的处理器,有人回答说是不用理会,请问您有什么建议吗?

dmesg 如下:

[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: bootconsole [sbi0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Ion: Ion memory setup at 0x0000000082473000 size 26 MiB
[    0.000000] OF: reserved mem: initialized node ion, compatible id ion-region
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080000000-0x0000000083f3ffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x0000000083f3ffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x0000000083f3ffff]
[    0.000000] On node 0 totalpages: 16192
[    0.000000]   DMA32 zone: 222 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 16192 pages, LIFO batch:3
[    0.000000] SBI specification v0.3 detected
[    0.000000] SBI implementation ID=0x1 Version=0x9
[    0.000000] SBI v0.2 TIME extension detected
[    0.000000] SBI v0.2 IPI extension detected
[    0.000000] SBI v0.2 RFENCE extension detected
[    0.000000] riscv: ISA extensions acdfimsuv
[    0.000000] riscv: ELF capabilities acdfimv
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15970
[    0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait rw console=ttyS0,115200 earlycon=sbi loglevel=9 riscv.fwsz=0x80000
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 29084K/64768K available (3869K kernel code, 468K rwdata, 1699K rodata, 152K init, 206K bss, 35684K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: interrupt-controller@70000000: mapped 101 interrupts with 1 handlers for 2 contexts.
[    0.000000] random: get_random_bytes called from start_kernel+0x2e0/0x41c with crng_init=0
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns
[    0.000010] sched_clock: 64 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns
[    0.008424] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=100000)
[    0.019130] pid_max: default: 4096 minimum: 301
[    0.024022] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.031446] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.041076] ASID allocator initialised with 65536 entries
[    0.046796] rcu: Hierarchical SRCU implementation.
[    0.052177] EFI services will not be available.
[    0.057264] devtmpfs: initialized
[    0.066760] early_time_log: do_initcalls: 4572390us
[    0.072426] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.082479] futex hash table entries: 16 (order: -4, 384 bytes, linear)
[    0.089452] pinctrl core: initialized pinctrl subsystem
[    0.095361] NET: Registered protocol family 16
[    0.100428] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.107764] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.116632] thermal_sys: Registered thermal governor 'step_wise'
[    0.132096] OF: /gpio@03020000/gpio-controller@0: could not find phandle
[    0.145316] OF: /gpio@03021000/gpio-controller@1: could not find phandle
[    0.152306] OF: /gpio@03022000/gpio-controller@2: could not find phandle
[    0.159292] OF: /gpio@03023000/gpio-controller@3: could not find phandle
[    0.166277] OF: /gpio@05021000/gpio-controller@4: could not find phandle
[    0.175076] clk reset: nr_reset=64 resource_size=8
[    0.180654] get audio clk=24576000
[    0.184198] cvitek-i2s-subsys 4108000.i2s_subsys: Set clk_sdma_aud0~3 to 24576000
[    0.203849] dw_dmac 4330000.dma: CVITEK DMA Controller, 8 channels, probe done!
[    0.212426] SCSI subsystem initialized
[    0.216744] usbcore: registered new interface driver usbfs
[    0.222521] usbcore: registered new interface driver hub
[    0.228109] usbcore: registered new device driver usb
[    0.236832] Ion: ion_parse_dt_heap_common: id 0 type 2 name carveout align 1000
[    0.244776] Ion: rmem_ion_device_init: heap carveout base 0x0000000082473000 size 0x0000000001acd000 dev (____ptrval____)
[    0.256062] ion_carveout_heap_create, size=0x1acd000
[    0.261369] cvi_get_rtos_ion_size, rtos ion_size get:0x0
[    0.396336] platform carveout: [ion] add heap id 0, type 2, base 0x82473000, size 0x1acd000
[    0.405336] Advanced Linux Sound Architecture Driver Initialized.
[    0.412992] clocksource: Switched to clocksource riscv_clocksource
[    0.421579] NET: Registered protocol family 2
[    0.427267] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.435985] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.443781] TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.451044] TCP: Hash tables configured (established 512 bind 512)
[    0.457650] UDP hash table entries: 128 (order: 0, 4096 bytes, linear)
[    0.464420] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes, linear)
[    0.471878] NET: Registered protocol family 1
[    0.477085] RPC: Registered named UNIX socket transport module.
[    0.483203] RPC: Registered udp transport module.
[    0.488085] RPC: Registered tcp transport module.
[    0.493005] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.502296] Initialise system trusted keyrings
[    0.507191] workingset: timestamp_bits=62 max_order=13 bucket_order=0
[    0.521040] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.528125] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.535307] Key type asymmetric registered
[    0.539525] Asymmetric key parser 'x509' registered
[    0.550827] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
[    0.559380] printk: console [ttyS0] disabled
[    0.563907] 4140000.serial: ttyS0 at MMIO 0x4140000 (irq = 15, base_baud = 1562500) is a 16550A
[    0.572940] printk: console [ttyS0] enabled
[    0.581540] printk: bootconsole [sbi0] disabled
[    0.591801] 41c0000.serial: ttyS4 at MMIO 0x41c0000 (irq = 16, base_baud = 1562500) is a 16550A
[    0.604335] cvi-spif 10000000.cvi-spif: unrecognized JEDEC id bytes: 00 00 00 00 00 00
[    0.612588] cvi-spif 10000000.cvi-spif: device scan failed
[    0.618310] cvi-spif 10000000.cvi-spif: unable to setup flash chip
[    0.631429] libphy: Fixed MDIO Bus: probed
[    0.636311] bm-dwmac 4070000.ethernet: IRQ eth_wake_irq not found
[    0.642676] bm-dwmac 4070000.ethernet: IRQ eth_lpi not found
[    0.648660] bm-dwmac 4070000.ethernet: Hash table entries set to unexpected value 0
[    0.656740] bm-dwmac 4070000.ethernet: no reset control found
[    0.662987] bm-dwmac 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[    0.669905] bm-dwmac 4070000.ethernet:       DWMAC1000
[    0.674810] bm-dwmac 4070000.ethernet: DMA HW capability register supported
[    0.682036] bm-dwmac 4070000.ethernet: RX Checksum Offload Engine supported
[    0.689258] bm-dwmac 4070000.ethernet: COE Type 2
[    0.694150] bm-dwmac 4070000.ethernet: TX Checksum insertion supported
[    0.700925] bm-dwmac 4070000.ethernet: Normal descriptors
[    0.706533] bm-dwmac 4070000.ethernet: Ring mode enabled
[    0.712053] bm-dwmac 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.719816] bm-dwmac 4070000.ethernet: device MAC address 6a:18:d5:c9:1b:55
[    0.754018] libphy: stmmac: probed
[    0.759124] bm-dwmac 4070000.ethernet: Cannot get clk_500m_eth!
[    0.765489] bm-dwmac 4070000.ethernet: Cannot get gate_clk_axi4!
[    0.772882] dwc2 4340000.usb: axi clk installed
[    0.777692] dwc2 4340000.usb: apb clk installed
[    0.782426] dwc2 4340000.usb: 125m clk installed
[    0.787235] dwc2 4340000.usb: 33k clk installed
[    0.791952] dwc2 4340000.usb: 12m clk installed
[    0.796760] dwc2 4340000.usb: EPs: 8, dedicated fifos, 3072 entries in SPRAM
[    0.804649] dwc2 4340000.usb: DWC OTG Controller
[    0.809523] dwc2 4340000.usb: new USB bus registered, assigned bus number 1
[    0.816796] dwc2 4340000.usb: irq 36, io mem 0x04340000
[    0.823164] hub 1-0:1.0: USB hub found
[    0.827193] hub 1-0:1.0: 1 port detected
[    0.832966] usbcore: registered new interface driver usb-storage
[    0.839645] i2c /dev entries driver
[    0.845473] sdhci: Secure Digital Host Controller Interface driver
[    0.851909] sdhci: Copyright(c) Pierre Ossman
[    0.856439] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.862600] cvi:sdhci_cvi_probe
[    0.913009] mmc0: SDHCI controller on 4310000.cv-sd [4310000.cv-sd] using ADMA 64-bit
[    0.921177] cvi_proc_init cvi_host 0x(____ptrval____)
[    0.927163] usbcore: registered new interface driver usbhid
[    0.937021] usbhid: USB HID core driver
[    0.942935] cvitek-i2s 4100000.i2s: cvi_i2s_probe
[    0.953253] cvitek-i2s 4130000.i2s: cvi_i2s_probe
[    0.958979] cviteka-adc sound_adc: cviteka_adc_probe, dev name=sound_adc
[    0.966103] cviteka-adc sound_adc: cviteka_adc_probe start devm_snd_soc_register_card
[    0.974706] cvitekaadc 300a100.adc: cvitekaadc_probe
[    0.985666] cviteka-dac sound_dac: cviteka_dac_probe, dev name=sound_dac
[    0.993150] cvitekadac 300a000.dac: cvitekadac_probe
[    0.998670] cvitekadac_probe gpio_is_valid mute_pin_l
[    1.005329] NET: Registered protocol family 10
[    1.011513] Segment Routing with IPv6
[    1.015523] NET: Registered protocol family 17
[    1.020457] Loading compiled-in X.509 certificates
[    1.066185] mmc0: new high speed SDHC card at address aaaa
[    1.072507] cviteka-adc sound_adc: cviteka_adc_probe, dev name=sound_adc
[    1.079990] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[    1.084679] cviteka-adc sound_adc: cviteka_adc_probe start devm_snd_soc_register_card
[    1.098705]  mmcblk0: p1 p2 p3
[    1.105438] cviteka-dac sound_dac: cviteka_dac_probe, dev name=sound_dac
[    1.118631] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.129668] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.136743] cfg80211: failed to load regulatory.db
[    1.142003] ALSA device list:
[    1.145500] dw-apb-uart 4140000.serial: forbid DMA for kernel console
[    1.163307] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.171874] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.181918] devtmpfs: mounted
[    1.185365] Freeing unused kernel memory: 152K
[    1.190008] Kernel memory protection not selected by kernel config.
[    1.196530] Run /sbin/init as init process
[    1.200800]   with arguments:
[    1.203901]     /sbin/init
[    1.206731]   with environment:
[    1.210011]     HOME=/
[    1.212451]     TERM=linux
[    1.215280] early_time_log: run_init_process: 5720915us
[    1.245062] usb 1-1: new high-speed USB device number 2 using dwc2
[    1.285488] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro
[    1.410002] random: fast init done
[    1.461193] hub 1-1:1.0: USB hub found
[    1.467086] hub 1-1:1.0: 4 ports detected
[    1.472023] random: dd: uninitialized urandom read (512 bytes read)
[    1.612135] random: dhcpcd: uninitialized urandom read (112 bytes read)
[    1.750586] bm-dwmac 4070000.ethernet eth0: PHY [stmmac-0:00] driver [Generic PHY] (irq=POLL)
[    1.769117] usb 1-1.1: new high-speed USB device number 3 using dwc2
[    1.775812] dwmac1000: Master AXI performs any burst length
[    1.784477] bm-dwmac 4070000.ethernet eth0: No Safety Features support found
[    1.793343] bm-dwmac 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
[    1.802174] bm-dwmac 4070000.ethernet eth0: configuring for phy/rmii link mode
[    2.060107] random: dnsmasq: uninitialized urandom read (128 bytes read)
[    2.098544] cv180x_sys: bad vermagic: kernel tainted.
[    2.103842] Disabling lock debugging due to kernel taint
[    2.109887] cv180x_sys: loading out-of-tree module taints kernel.
[    2.137573] res-reg: start: 0xa0c8000, end: 0xa0c801f, virt-addr(ffffffd0040c9000).
[    2.146189] CVITEK CHIP ID = 22
[    2.160548] cvi_rtos_cmdqu_probe start ---
[    2.164977] name=1900000.rtos_cmdqu
[    2.169554] res-reg: start: 0x1900000, end: 0x1900fff, virt-addr(ffffffd004228000).
[    2.177981] cvi_rtos_cmdqu_probe DONE
[    2.182440] [cvi_spinlock_init] success
[    2.401037] RTOS_CMDQU_SEND_WAIT timeout
[    2.405160] SYS_CMD_INFO_LINUX_INIT_DONE fail
[    2.410262] communicate with rtos fail
[    2.428722] cif a0c2000.cif: cam0 clk installed
[    2.433565] cif a0c2000.cif: cam1 clk installed
[    2.438857] cif a0c2000.cif: vip_sys_2 clk installed
[    2.444441] cif a0c2000.cif: clk_mipimpll clk installed (____ptrval____)
[    2.451789] cif a0c2000.cif: clk_disppll clk installed (____ptrval____)
[    2.459068] cif a0c2000.cif: clk_fpll clk installed (____ptrval____)
[    2.466054] cif a0c2000.cif: (0) res-reg: start: 0xa0c2000, end: 0xa0c3fff.
[    2.473607] cif a0c2000.cif:  virt-addr((____ptrval____))
[    2.479591] cif a0c2000.cif: (1) res-reg: start: 0xa0d0000, end: 0xa0d0fff.
[    2.487162] cif a0c2000.cif:  virt-addr((____ptrval____))
[    2.493171] cif a0c2000.cif: (2) res-reg: start: 0xa0c4000, end: 0xa0c5fff.
[    2.500722] cif a0c2000.cif:  virt-addr((____ptrval____))
[    2.506714] cif a0c2000.cif: (3) res-reg: start: 0x3001c30, end: 0x3001c5f.
[    2.514283] cif a0c2000.cif:  virt-addr((____ptrval____))
[    2.520217] cif a0c2000.cif: no pad_ctrl for cif
[    2.525452] cif a0c2000.cif: request irq-26 as cif-irq0
[    2.531323] cif a0c2000.cif: request irq-27 as cif-irq1
[    2.537202] cif a0c2000.cif: rst_pin = 424, pol = 1
[    2.552303] snsr_i2c snsr_i2c: i2c:-------hook 0
[    2.557425] snsr_i2c snsr_i2c: i2c:-------hook 1
[    2.562942] snsr_i2c snsr_i2c: i2c:-------hook 2
[    2.568278] snsr_i2c snsr_i2c: i2c:-------hook 3
[    2.573601] snsr_i2c snsr_i2c: i2c:-------hook 4
[    2.624027] vi_core_probe:203(): res-reg: start: 0xa000000, end: 0xa07ffff, virt-addr(ffffffd004400000).
[    2.633943] vi_core_probe:216(): irq(28) for isp get from platform driver.
[    2.642230] vi_tuning_buf_setup:253(): tuning fe_addr[0]=0x8187f490, be_addr[0]=0x81877290, post_addr[0]=0x81860000
[    2.653554] vi_tuning_buf_setup:253(): tuning fe_addr[1]=0x8197f490, be_addr[1]=0x81977290, post_addr[1]=0x81960000
[    2.664827] vi_tuning_buf_setup:253(): tuning fe_addr[2]=0x8189f490, be_addr[2]=0x81897290, post_addr[2]=0x81880000
[    2.676030] sync_task_init:177(): sync_task_init vi_pipe 0
[    2.682070] sync_task_init:177(): sync_task_init vi_pipe 1
[    2.688085] sync_task_init:177(): sync_task_init vi_pipe 2
[    2.694770] vi_core_probe:252(): isp registered as cvi-vi
[    2.754657] cvi_dwa_probe:487(): done with rc(0).
[    2.790173] cv180x-cooling cv180x_cooling: elems of dev-freqs=6
[    2.796482] cv180x-cooling cv180x_cooling: dev_freqs[0]: 850000000 500000000
[    2.804427] cv180x-cooling cv180x_cooling: dev_freqs[1]: 425000000 375000000
[    2.812159] cv180x-cooling cv180x_cooling: dev_freqs[2]: 425000000 300000000
[    2.819958] cv180x-cooling cv180x_cooling: Cooling device registered: cv180x_cooling
[    2.860206] jpu ctrl reg pa = 0xb030000, va = (____ptrval____), size = 256
[    2.867979] end jpu_init result = 0x0
[    2.989128] cvi_vc_drv_init result = 0x0
[    3.006895] sh (178): drop_caches: 3
[    3.588567] random: crng init done
[    3.588585] random: 1 urandom warning(s) missed due to ratelimiting
[    3.862391] bm-dwmac 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    3.862441] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  132.073408] RTW: module init start
[  132.073425] RTW: rtl8723du v5.13.4-17-ga6e5ee6.20210514_COEX20200103-3535
[  132.073434] RTW: rtl8723du BT-Coex version = COEX20200103-3535
[  132.073534] RTW: rtw_inetaddr_notifier_register
[  132.073685] RTW:
[  132.073685] usb_endpoint_descriptor(0):
[  132.073695] RTW: bLength=7
[  132.073702] RTW: bDescriptorType=5
[  132.073710] RTW: bEndpointAddress=84
[  132.073717] RTW: wMaxPacketSize=512
[  132.073725] RTW: bInterval=0
[  132.073750] RTW: RT_usb_endpoint_is_bulk_in = 4
[  132.073759] RTW:
[  132.073759] usb_endpoint_descriptor(1):
[  132.073767] RTW: bLength=7
[  132.073774] RTW: bDescriptorType=5
[  132.073782] RTW: bEndpointAddress=5
[  132.073789] RTW: wMaxPacketSize=512
[  132.073796] RTW: bInterval=0
[  132.073804] RTW: RT_usb_endpoint_is_bulk_out = 5
[  132.073812] RTW:
[  132.073812] usb_endpoint_descriptor(2):
[  132.073819] RTW: bLength=7
[  132.073827] RTW: bDescriptorType=5
[  132.073834] RTW: bEndpointAddress=6
[  132.073841] RTW: wMaxPacketSize=512
[  132.073848] RTW: bInterval=0
[  132.073856] RTW: RT_usb_endpoint_is_bulk_out = 6
[  132.073876] RTW:
[  132.073876] usb_endpoint_descriptor(3):
[  132.073884] RTW: bLength=7
[  132.073891] RTW: bDescriptorType=5
[  132.073898] RTW: bEndpointAddress=87
[  132.073906] RTW: wMaxPacketSize=64
[  132.073914] RTW: bInterval=3
[  132.073922] RTW: RT_usb_endpoint_is_int_in = 7, Interval = 3
[  132.073929] RTW:
[  132.073929] usb_endpoint_descriptor(4):
[  132.073937] RTW: bLength=7
[  132.073944] RTW: bDescriptorType=5
[  132.073951] RTW: bEndpointAddress=8
[  132.073959] RTW: wMaxPacketSize=512
[  132.073966] RTW: bInterval=0
[  132.073974] RTW: RT_usb_endpoint_is_bulk_out = 8
[  132.073981] RTW:
[  132.073981] usb_endpoint_descriptor(5):
[  132.074000] RTW: bLength=7
[  132.074008] RTW: bDescriptorType=5
[  132.074015] RTW: bEndpointAddress=9
[  132.074023] RTW: wMaxPacketSize=512
[  132.074030] RTW: bInterval=0
[  132.074037] RTW: RT_usb_endpoint_is_bulk_out = 9
[  132.074047] RTW: nr_endpoint=6, in_num=2, out_num=4
[  132.074047]
[  132.074054] RTW: USB_SPEED_HIGH
[  132.074066] RTW: CHIP TYPE: RTL8723DU
[  132.074589] RTW: Chip Version Info: CHIP_8723D_T4_1T1R_RomVer(0)
[  132.074628] RTW: USB NumInPipe(2), NumOutPipe(4/4)
[  132.074829] RTW: EEPROM type is E-FUSE
[  132.075205] RTW: Boot from EFUSE, Autoload OK !
[  132.076459] RTW: hal_EfuseSwitchToBank: Efuse switch bank to 0
[  132.227735] RTW: hal_ReadEFuse_WiFi: data end at address=0x86
[  132.228015] RTW: HW EFUSE
[  132.228035] RTW: 0x000: 29 81 00 7C  01 88 07 00  A0 04 EC 35  12 C0 A2 D8
[  132.228136] RTW: 0x010: 28 28 28 28  28 28 28 28  28 28 28 00  FF FF FF FF
[  132.228219] RTW: 0x020: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.228314] RTW: 0x030: FF FF FF FF  FF FF FF FF  FF FF 2B 2B  2B 2B 2B 2B
[  132.228410] RTW: 0x040: 29 29 2A 29  29 00 FF FF  FF FF FF FF  FF FF FF FF
[  132.228506] RTW: 0x050: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.228590] RTW: 0x060: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.228685] RTW: 0x070: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.228781] RTW: 0x080: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.228876] RTW: 0x090: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.228959] RTW: 0x0A0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.230900] RTW: 0x0B0: FF FF FF FF  FF FF FF FF  20 24 23 00  00 00 FF FF
[  132.230997] RTW: 0x0C0: FF 29 20 51  00 00 00 FF  00 FF 11 FF  FF FF FF FF
[  132.231081] RTW: 0x0D0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.231176] RTW: 0x0E0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.231272] RTW: 0x0F0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.231365] RTW: 0x100: DA 0B 23 D7  C7 46 07 90  DE 80 C3 E3  CB 09 03 52
[  132.231451] RTW: 0x110: 65 61 6C 74  65 6B 16 03  38 30 32 2E  31 31 6E 20
[  132.231545] RTW: 0x120: 57 4C 41 4E  20 41 64 61  70 74 65 72  00 FF FF FF
[  132.231641] RTW: 0x130: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.231725] RTW: 0x140: FF FF FF FF  FF FF FF 0F  FF FF FF FF  FF FF FF FF
[  132.231820] RTW: 0x150: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.231916] RTW: 0x160: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232012] RTW: 0x170: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232095] RTW: 0x180: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232189] RTW: 0x190: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232285] RTW: 0x1A0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232379] RTW: 0x1B0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232464] RTW: 0x1C0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232559] RTW: 0x1D0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232654] RTW: 0x1E0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232750] RTW: 0x1F0: FF FF FF FF  FF FF FF FF  FF FF FF FF  FF FF FF FF
[  132.232844] RTW: VID = 0x0BDA, PID = 0xD723
[  132.232854] RTW: Customer ID: 0x00, SubCustomer ID: 0xCD
[  132.232884] RTW: hal_EfuseParsePowerSavingSetting...bHWPwrPindetect(0)-bHWPowerdown(0) ,bSupportRemoteWakeup(1)
[  132.232895] RTW: ### PS params=>  power_mgnt(2),usbss_enable(0) ###
[  132.236736] RTW: Hal_EfuseParseBTCoexistInfo_8723D: Enable BT-coex, ant_num=1
[  132.236781] RTW: hal_com_config_channel_plan chplan:0x20
[  132.245106] RTW: SetHwReg: bMacPwrCtrlOn=1
[  132.245328] RTW: _InitPowerOn_8723du: Normal Mode
[  132.245448] RTW: _InitPowerOn_8723du: LDO Mode
[  132.246950] RTW: rtl8723d_FirmwareDownload((null)) tmp_ps=0
[  132.246966] RTW: rtl8723d_FirmwareDownload fw: FW_NIC, size: 29262
[  132.246982] RTW: rtl8723d_FirmwareDownload: fw_ver=31 fw_subver=0000 sig=0x23d1, Month=11, Date=18, Hour=20, Minute=41
[  132.247010] RTW: rtl8723d_FirmwareDownload(): Shift for fw header!
[  132.247202] RTW: rtl8723d_FirmwareDownload by IO write!
[  132.284836] RTW: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00070305
[  132.284851] RTW: rtl8723d_FirmwareDownload: download FW count:1
[  132.287073] RTW: _8051Reset8723: Finish
[  132.305363] RTW: _FWFreeToGo: Polling FW ready OK! (125, 20ms), REG_MCUFWDL:0x000703c6
[  132.305399] RTW: rtl8723d_FirmwareDownload success. write_fw:1, 60ms
[  132.305577] RTW:  <=== rtl8723d_FirmwareDownload()
[  132.318961] RTW: CardDisableRTL8723du((null)): bMacPwrCtrlOn=1
[  132.318978] RTW: SetHwReg: bMacPwrCtrlOn=0
[  132.324958] RTW: hal_read_mac_hidden_rpt OK! (2, 16ms), fwdl:1, id:0x19
[  132.324978] RTW: rtw_hal_read_chip_info in 248 ms
[  132.325551] RTW: [RF_PATH] ver_id.RF_TYPE:RF_1T1R
[  132.325565] RTW: [RF_PATH] HALSPEC's rf_reg_trx_path_bmp:0x11, rf_reg_path_avail_num:1, max_tx_cnt:1
[  132.325574] RTW: [RF_PATH] PG's trx_path_bmp:0x00, max_tx_cnt:0
[  132.325584] RTW: [RF_PATH] Registry's trx_path_bmp:0x00, tx_path_lmt:0, rx_path_lmt:0
[  132.325593] RTW: [RF_PATH] HALDATA's trx_path_bmp:0x11, max_tx_cnt:1
[  132.325602] RTW: [RF_PATH] HALDATA's rf_type:RF_1T1R, NumTotalRFPath:1
[  132.325630] RTW: rtw_hal_rfpath_init trx_path_bmp:0x11(RF_1T1R), NumTotalRFPath:1, max_tx_cnt:1
[  132.325641] RTW: [TRX_Nss] HALSPEC - tx_nss:1, rx_nss:1
[  132.325650] RTW: [TRX_Nss] Registry - tx_nss:0, rx_nss:0
[  132.325659] RTW: [TRX_Nss] HALDATA - tx_nss:1, rx_nss:1
[  132.325668] RTW: rtw_hal_trxnss_init tx_nss:1, rx_nss:1
[  132.325679] RTW: txpath=0x1, rxpath=0x1
[  132.325688] RTW: txpath_1ss:0x1, num:1
[  132.325937] RTW: init_mlme_default_rate_set: support CCK
[  132.325950] RTW: init_mlme_default_rate_set: support OFDM
[  132.326968] RTW: NR_RECVBUFF: 8, recvbuf_nr: 8
[  132.326982] RTW: MAX_RECVBUF_SZ: 4000
[  132.327024] RTW: NR_PREALLOC_RECV_SKB: 8
[  132.327436] RTW: rtw_alloc_macid((null)) if1, mac_addr:ff:ff:ff:ff:ff:ff macid:1
[  132.327457] RTW: rtw_init_pwrctrl_priv: IPS_mode=1, LPS_mode=2, LPS_level=0
[  132.327759] RTW: IQK FW offload:disable
[  132.327784] RTW: Init_ODM_ComInfo_8723d(): Fv=0 Cv=3
[  132.327854] RTW: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1
[  132.332528] RTW: phy_ConfigBBWithPgParaFile(): No File PHY_REG_PG.txt, Load from HWImg Array!
[  132.332554] RTW: default power by rate loaded
[  132.332571] RTW: phy_txpwr_by_rate_chk_for_path_dup duplicate 2.4G [A] to [B]
[  132.332601] RTW: init_channel_set_from_rtk_priv((null)) ChannelPlan ID:0x20, ch num:13
[  132.334028] RTW: rtw_macaddr_cfg mac addr:90:de:80:c3:e3:cb
[  132.334047] RTW: bDriverStopped:True, bSurpriseRemoved:False, bup:0, hw_init_completed:0
[  132.334088] RTW: rtw_cfg80211_init_wiphy_band:rf_type=0
[  132.334129] RTW: [HT] HAL Support STBC = 0x01
[  132.334156] RTW: rtw_wiphy_alloc(phy0)
[  132.334204] RTW: rtw_wdev_alloc(padapter=0000000055fe6f75)
[  132.334221] RTW: rtw_wiphy_register(phy0)
[  132.334231] RTW: Register RTW cfg80211 vendor cmd(0x67) interface
[  132.334449] RTW: rtw_reg_notifier(phy0)
[  132.334465] RTW: initiator:CORE, wiphy_idx:0, type:USER
[  132.334472] RTW: alpha2:00
[  132.334480] RTW: dfs_region:UNSET
[  132.334505] RTW: intersect:0
[  132.334513] RTW: processed:1
[  132.334520] RTW: country_ie_env:ANY
[  132.334919] RTW: rtw_ndev_init(wlan0) if1 mac_addr=90:de:80:c3:e3:cb
[  132.335535] RTW: rtw_ndev_notifier_call(wlan0) state:17
[  132.336540] RTW: cfg80211_rtw_get_txpower(wlan0) total max: -10000 mbm
[  132.336863] RTW: rtw_ndev_notifier_call(wlan0) state:5
[  132.341561] usbcore: registered new interface driver rtl8723du
[  132.341577] RTW: module init ret=0
[  132.541454] RTW: rtw_ndev_notifier_call(wlan0) state:14
[  132.541477] RTW: _netdev_open(wlan0) , bup=0
[  132.541954] RTW:  power-on :REG_SYS_CLKR 0x09=0x30. REG_CR 0x100=0xea.
[  132.541965] RTW:  MAC has not been powered on yet.
[  132.550581] RTW: SetHwReg: bMacPwrCtrlOn=1
[  132.550827] RTW: _InitPowerOn_8723du: Normal Mode
[  132.550946] RTW: _InitPowerOn_8723du: LDO Mode
[  132.554082] RTW: rtl8723d_FirmwareDownload(wlan0) tmp_ps=0
[  132.554101] RTW: rtl8723d_FirmwareDownload fw: FW_NIC, size: 29262
[  132.554137] RTW: rtl8723d_FirmwareDownload: fw_ver=31 fw_subver=0000 sig=0x23d1, Month=11, Date=18, Hour=20, Minute=41
[  132.554146] RTW: rtl8723d_FirmwareDownload(): Shift for fw header!
[  132.554328] RTW: rtl8723d_FirmwareDownload by IO write!
[  132.591350] RTW: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00070705
[  132.591386] RTW: rtl8723d_FirmwareDownload: download FW count:1
[  132.592945] RTW: _8051Reset8723: Finish
[  132.611345] RTW: _FWFreeToGo: Polling FW ready OK! (115, 20ms), REG_MCUFWDL:0x000707c6
[  132.611385] RTW: rtl8723d_FirmwareDownload success. write_fw:1, 56ms
[  132.611576] RTW:  <=== rtl8723d_FirmwareDownload()
[  132.611592] RTW: Set RF Chip ID to RF_6052 and RF type to 0.
[  132.611601] RTW: HalDetectPwrDownMode(): PDN=0
[  132.877103] RTW: rtl8723du_hal_init in 336ms
[  132.877145] RTW: rtw_hal_set_macaddr_port wlan0- hw port(0) mac_addr =90:de:80:c3:e3:cb
[  132.878327] RTW: [HW_VAR_ENABLE_RX_BAR] 0x6A2=0x500
[  132.889490] RTW: rtw_hal_set_macaddr_port wlan0- hw port(0) mac_addr =90:de:80:c3:e3:cb
[  132.890702] RTW: #### hw_var_set_opmode() -4450 hw_port(0) mode = 2 ####
[  132.891455] RTW: MAC Address = 90:de:80:c3:e3:cb
[  132.891469] RTW: rtw_start_drv_threads(wlan0) enter
[  132.891478] RTW: rtw_start_drv_threads(wlan0) start RTW_CMD_THREAD
[  132.891911] RTW: -871x_drv - drv_open, bup=1
[  132.892464] RTW: rtw_ndev_notifier_call(wlan0) state:1
[  134.948048] RTW: ==>rtw_ps_processor .fw_state(8)
[  134.953271] RTW: ==>ips_enter cnts:1
[  134.953286] RTW: ===> rtw_ips_pwr_down...................
[  134.953295] RTW: ====> rtw_ips_dev_unload...
[  134.957663] RTW: usb_read_port_cancel
[  134.957739] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.957806] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.957838] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.957896] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.957961] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.958035] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.958101] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.958166] RTW: usb_read_port_complete() RX Warning! bDriverStopped(False) OR bSurpriseRemoved(False)
[  134.958191] RTW: usb_write_port_cancel
[  134.958256] RTW: ==> rtl8723du_hal_deinit
[  134.958955] RTW: CardDisableRTL8723du(wlan0): bMacPwrCtrlOn=1
[  134.958971] RTW: SetHwReg: bMacPwrCtrlOn=0
[  134.991707] RTW: <=== rtw_ips_pwr_down..................... in 36ms

可否分享一个您编译好的驱动?用来验证是我驱动问题还是内核问题。谢谢!

hi, can you show me how you solve this problem?

like show me some picture?

您好,请问蓝牙选项都开启哪些呢?我按照您的教程开启了蓝牙,但是现在显示


这个错误,我不知道是不是我内核选项设置错了,请问有人可以帮我解答一下吗?

蓝牙需要固件,就报错那两个文件需要在系统里,路径是lib/下,不同驱动路径有细微差别,可以去百度下。