1、概述
目前 A64
Android5.1 平台上支持的 WiFi、BT 模组请参考《A64 WiFi&BT&GPS 支持列表_V1.00》, 本文档将以 A64 t1 方案为例一一说明如何配置每款模组。
WiFi 可分 USB 接口和 SDIO 接口两种类型, wifi 的全功能包括 station、softap 和 wifi direct。 BT 基本都采用 UART 接口通信。
WiFi 和蓝牙在 linux3.10 上逻辑上独立,wifi 和蓝牙分别有自己的供电和时钟部分的配置,如果使用 wifi 和蓝牙二合一的模组,模组和 IO 的供电配置成一样就可以了。
本文档会不断的更新,文档和代码对应可能会稍有差别。
2、
RTL8723bs
功能:wifi(station/softap/p2p)+ bt
接口类型:SDIO + UART
2.1 .config
.config 中需要配置如下选项,将 wifi driver 编译为模块
CONFIG_RTL8723BS = m
2.2 BoardConfig.mk
BoardConfig.mk 文件决定 android 要加载哪一款 wifi模组,以及是否支持蓝牙,要配置成使用 rtl8723bs模组需要把 BoardConfig.mk 文件修改成如下(部分代码)。
# 1. Wifi Configuration
BOARD_WIFI_VENDOR :=
REALTEK
#BOARD_WIFI_VENDOR :=
Broadcom
# 1.1 realtek wifi support ifeq ($(BOARD_WIFI_VENDOR), realtek)
WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_USR_WIFI := rtl8723bs
Endif
# 2.
Bluetooth Configuration
# make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor
BOARD_HAVE_BLUETOOTH := true #BOARD_HAVE_BLUETOOTH_BCM := true BOARD_HAVE_BLUETOOTH_
RTK := true BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs
BOARD_HAVE_BLUETOOTH_RTK_COEX := true BLUETOOTH_HCI_USE_RTK_H5 := true BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR:=device/softwinner/tulip-t1/bluetooth
2.3 init.sun50iw1p1.rc
init.sun50iw1p1.rc 是资源和服务配置相关的文件,使用 rtl8723bs 模组需要作如下修改(部分代码)。
#realtek bluetooth # UART device chmod 0660 /dev/ttyS1 chown bluetooth net_bt_stack /dev/ttyS1
# power up/down interface chmod 0660 /sys/class/rfkill/rfkill0/state chmod 0660 /sys/class/rfkill/rfkill0/type chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
......
2.4 tulip_t1.mk
tulip_t1.mk 文件决定拷贝 rtl8723bs wifi 的
firmware 到相应的目录,要配置成使用 rtl8723bs 模组需要 把 tulip_t1.mk 文件修改成如下(部分代码)。
product_PACKAGES += \ ESFileExplorer \ VideoPlayer \ Bluetooth PRODUCT_COPY_FILES += \
Frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluet
ooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bl
uetooth_le.xml
#rtl8723bs bt fw and config $(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg.mk)
PRODUCT_PROPERTY_OVERRIDES += \ ro.product.8723b_bt.used = true
......
更多详细内容请下载附件查看