iMX6ULL RTL8723BU WiFi蓝牙模块

我移植的板子是讯为的TERMINATOR_V1.1开发板,参考板为官方 i.MX6ULL EVK开发板。

1. 介绍

RTL8723BU是Realtek公司的WiFi蓝牙芯片,内核已经支持了RTL8723BU模块,就不需要我们自己去编写了,只需要简单配置Linux 内核并编译就可以了。
Realtek在Linux内核中的驱动比较通用支持很多WiFi模块,如果追求稳定性最好去下载官方提供专门的RTL8723BU驱动(官方仓库:https://github.com/lwfinger/rtl8723bu.git),直接编译成模块即可使用。

2. 配置Linux内核

2.1 配置支持USB 设备

Device Drivers  --->
	 [*] USB support  --->
	 	<*>   EHCI HCD (USB 2.0) support
	 	<*>   ChipIdea Highspeed Dual Role Controller
	 	  [*]     ChipIdea device controller
	 	  [*]     ChipIdea host controller

2.2 配置支持WiFi设备

Device Drivers  --->
	[*] Network device support  --->
		[*]   Wireless LAN  --->
			<*>     IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)
			[*]       Support downloading firmware images with Host AP driver
			[*]         Support for non-volatile firmware download 
			[*]   Realtek devices
			<*>     Realtek rtlwifi family of devices  --->
			<*>     RTL8723AU/RTL8188[CR]U/RTL819[12]CU (mac80211) support
			[*]       Include support for untested Realtek 8xxx USB devices (EXPERIMENTAL)

2.3 配置支持IEEE 802.11

[*] Networking support  --->
	-*-   Wireless  ---> 
		<*>   cfg80211 - wireless configuration API
		<*>   Generic IEEE 802.11 Networking Stack (mac80211)

2.4 配置支持蓝牙

[*] Networking support  --->
	<*>   Bluetooth subsystem support  --->
		[*]   Bluetooth Classic (BR/EDR) features
		<*>     RFCOMM protocol support
		[*]       RFCOMM TTY support
		<*>     BNEP protocol support
		[*]       Multicast filter support
		[*]       Protocol filter support
		<*>     HIDP protocol support 
		[*]   Bluetooth Low Energy (LE) features 
		[*]   Export Bluetooth internals in debugfs
		Bluetooth device drivers  --->
			<*> HCI USB driver
			[*]   Realtek protocol support

3. 配置Buildroot

测试使用WiFi和蓝牙需要用到bluez和wpa_supplicant工具,直接从Buildroot中添加这两个工具。

Target packages  --->
	Networking applications  --->
		[*] bluez-utils
		[*]   build tools
		[*]     install deprecated tools
		[*] wireless tools
		[*] wpa_supplicant  --->
			[*]   Enable nl80211 support

4. 下载固件

编译完成启动内核,加载WiFi固件和Bluetooth固件失败。
在这里插入图片描述
在这里插入图片描述
需要下载官方的固件,克隆下面两个仓库找到rtl8723b_config和rtl8723b_fw重命名为rtl8723b_config.bin和rtl8723b_fw.bin,将rtl8723bu_nic.bin、rtl8723b_config.bin和rtl8723b_fw.bin按提示放在/lib/firmware目录下,重启开发板。

git clone https://github.com/lwfinger/rtl8723au_bt.git
git clone https://github.com/lwfinger/rtl8723bu.git

在这里插入图片描述
通过这两行打印信息可以看出,Linux内核中RTL8723UB驱动官方没有测试,可以联系Jes.Sorensen@gmail.com。我这里学习使用,对稳定性没有要求,建议使用官方仓库驱动。
在这里插入图片描述

5. 测试WiFi

修改/etc/wpa_supplicant.conf文件,配置要连接的WiFi。

#ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
  ssid="WiFi名"
  psk="密码"
  priority=0
}

修改/etc/network/interfaces文件,添加如下配置自动获取IP并连接WiFi。

auto wlan0
iface wlan0 inet dhcp

pre-up wpa_supplicant -B -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

重启开发板,可以看到wlan0网卡启动正常,上网正常。由于没有外接天线,延迟和丢包比较严重。
在这里插入图片描述

6. 测试蓝牙

使用hciconfig -a查看蓝牙设备,启动蓝牙hciconfig hci0 up。
在这里插入图片描述
打开手机蓝牙设为可被发现,使用hcitool scan扫描附件蓝牙设备,l2ping搜索到的设备正常。
在这里插入图片描述

移植源码获取:

git clone https://github.com/Sonboy97/linux.git -b imx
版本:53bd2a7e96d3e9bc03fdf941973d92c5456f339a
git clone https://github.com/Sonboy97/buildroot.git -b imx
版本:4a3d7e910cf862ea4d19710d90a31fe5ac2746eb
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Sonboy哦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值