一、简介
本人调试了视源的3款WiFi、bt模块。分别是:
-
aic88002.1ds 该模块是双频的WiFi/bt模块,含2.4g/5g
-
aic8800dcs.2 该模块是单频的WiFi/bt模块
-
aic8800dws.2 该模块是单频的WiFi模块
这3款当然了,价格方面肯定是依次从高到低的;配置方面近乎大同小异的。后面会依次说一下这3款的配置,以下配置均是在RK平台完成的。文章来源:https://www.toymoban.com/news/detail-777408.html
二、调试
A.配置aic88002.1ds 以下均是针对该模块的patch,就不一一解释了。
主要分为以下几个路径文件的相关配置:文章来源地址https://www.toymoban.com/news/detail-777408.html
1.device/rockchip/common
From 4ca91c8b155ae223cdbf0d47b3a73c09a28e8412 Mon Sep 17 00:00:00 2001
From: Dicke <hale.hale@vanzeak.com>
Date: Mon, 15 Aug 2022 06:28:48 +0000
Subject: [PATCH] add aic8800
Change-Id: If20586d3c6cadc2861ad6d0fd3725f101475485b
---
device.mk | 4 ++++
init.insmod.cfg | 2 ++
init.rk30board.rc | 3 +++
overlay/packages/apps/Bluetooth/res/values/config.xml | 2 +-
wifi_bt_common.mk | 2 +-
wpa_config.txt | 6 ++++++
6 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/device.mk b/device.mk
index 5d97bd0..0f533da 100644
--- a/device.mk
+++ b/device.mk
@@ -891,6 +891,10 @@ ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_RTK)), true)
include hardware/realtek/rtkbt/rtkbt.mk
endif
+ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_AIC)), true)
+include hardware/aic/aicbt/aicbt.mk
+endif
+
ifeq ($(strip $(TARGET_BOARD_PLATFORM_PRODUCT)), box)
include device/rockchip/common/samba/rk31_samba.mk
PRODUCT_COPY_FILES += \
diff --git a/init.insmod.cfg b/init.insmod.cfg
index 14d0c00..7b1c4b9 100644
--- a/init.insmod.cfg
+++ b/init.insmod.cfg
@@ -8,6 +8,8 @@ insmod /vendor/lib/modules/rk29-ipp.ko
insmod /vendor/lib/modules/pvrsrvkm.ko
insmod /vendor/lib/modules/rknpu.ko
insmod /vendor/lib/modules/rknpu-clang.ko
+insmod /vendor/lib/modules/aic8800_bsp.ko
+insmod /vendor/lib/modules/aic_uart_sco.ko
#insmod /system/lib/modules/rtk_btusb.ko
#insmod /rk30xxnand_ko.ko
#insmod /drmboot.ko
diff --git a/init.rk30board.rc b/init.rk30board.rc
index db25dcb..2d12b76 100755
--- a/init.rk30board.rc
+++ b/init.rk30board.rc
@@ -222,6 +222,9 @@ on boot
chmod 0666 /dev/teepriv0
chmod 0444 /proc/pagetypeinfo
+ chmod 0660 /dev/aic_uart_sco_dev
+ chown bluetooth net_bt /dev/aic_uart_sco_dev
+
on property:sys.boot_completed=1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 0
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 0
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
index 6ce63e9..b054d18 100755
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ b/overlay/packages/apps/Bluetooth/res/values/config.xml
@@ -20,7 +20,7 @@
<bool name="profile_supported_a2dp">true</bool>
<bool name="profile_supported_a2dp_sink">false</bool>
<bool name="profile_supported_hdp">false</bool>
- <bool name="profile_supported_hs_hfp">false</bool>
+ <bool name="profile_supported_hs_hfp">true</bool>
<bool name="profile_supported_hfpclient">false</bool>
<bool name="profile_supported_hid">true</bool>
<bool name="profile_supported_opp">true</bool>
diff --git a/wifi_bt_common.mk b/wifi_bt_common.mk
index 9e15768..fd88e45 100644
--- a/wifi_bt_common.mk
+++ b/wifi_bt_common.mk
@@ -38,4 +38,4 @@ endif
endif
BOARD_HAVE_BLUETOOTH_RTK := true
-
+BOARD_HAVE_BLUETOOTH_AIC := true
diff --git a/wpa_config.txt b/wpa_config.txt
index 6dbf49d..294034c 100644
--- a/wpa_config.txt
+++ b/wpa_config.txt
@@ -31,3 +31,9 @@
-O/data/vendor/wifi/wpa/sockets
-g@android:wpa_wlan0
+[aic]
+/vendor/bin/hw/wpa_supplicant
+-O/data/vendor/wifi/wpa/sockets
+-puse_p2p_group_interface=1
+-g@android:wpa_wlan0
+
--
2.17.1
2.路径:framework/opt/net/wifi/
From 6dd09cedd5f32eac0a839a87b8cb871f354a4f33 Mon Sep 17 00:00:00 2001
From: Dicke <hale.hale@vanzeak.com>
Date: Mon, 15 Aug 2022 06:36:05 +0000
Subject: [PATCH] add aic8800
Change-Id: I1fbb38aff3a05550d1dad0da543ebfbb95d9be4b
---
libwifi_hal/rk_wifi_ctrl.cpp | 1 +
libwifi_hal/wifi_hal_common.cpp | 3 +++
2 files changed, 4 insertions(+)
diff --git a/libwifi_hal/rk_wifi_ctrl.cpp b/libwifi_hal/rk_wifi_ctrl.cpp
index 62e694033..8034e4f77 100755
--- a/libwifi_hal/rk_wifi_ctrl.cpp
+++ b/libwifi_hal/rk_wifi_ctrl.cpp
@@ -75,6 +75,7 @@ static wifi_device supported_wifi_devices[] = {
{"MVL88W8977", "02df:9145"},
{"MVL88W8987", "02df:9149"},
{"SPRDWL", "0000:0000"},
+ {"AIC8800", "5449:0145"},
};
int get_wifi_device_id(const char *bus_dir, const char *prefix)
diff --git a/libwifi_hal/wifi_hal_common.cpp b/libwifi_hal/wifi_hal_common.cpp
index 85b8708cb..452060246 100755
--- a/libwifi_hal/wifi_hal_common.cpp
+++ b/libwifi_hal/wifi_hal_common.cpp
@@ -56,6 +56,7 @@ extern "C" int delete_module(const char *, unsigned int);
#define MLAN_DRIVER_MODULE_PATH WIFI_MODULE_PATH"mlan.ko"
#define MVL_DRIVER_MODULE_PATH WIFI_MODULE_PATH"sd8xxx.ko"
#define RK912_DRIVER_MODULE_PATH WIFI_MODULE_PATH"rk912.ko"
+#define AIC8800_DRIVER_MODULE_PATH WIFI_MODULE_PATH"aic8800_fdrv.ko"
#define SPRDWL_DRIVER_MODULE_PATH WIFI_MODULE_PATH"sprdwl_ng.ko"
#define DRIVER_MODULE_PATH_UNKNOW ""
@@ -83,6 +84,7 @@ extern "C" int delete_module(const char *, unsigned int);
#define MVL_DRIVER_MODULE_NAME "sd8xxx"
#define RK912_DRIVER_MODULE_NAME "rk912"
#define SPRDWL_DRIVER_MODULE_NAME "sprdwl"
+#define AIC8800_DRIVER_MODULE_NAME "aic8800_fdrv"
#define DRIVER_MODULE_NAME_UNKNOW ""
#ifndef WIFI_DRIVER_FW_PATH_STA
@@ -170,6 +172,7 @@ wifi_ko_file_name module_list[] =
{"MVL88W8987", MVL_DRIVER_MODULE_NAME, MVL_DRIVER_MODULE_PATH, MVL88W8987_DRIVER_MODULE_ARG},
{"RK912", RK912_DRIVER_MODULE_NAME, RK912_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},
{"SPRDWL", SPRDWL_DRIVER_MODULE_NAME, SPRDWL_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},
+ {"AIC8800", AIC8800_DRIVER_MODULE_NAME, AIC8800_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG},
{"UNKNOW", DRIVER_MODULE_NAME_UNKNOW, DRIVER_MODULE_PATH_UNKNOW, UNKKOWN_DRIVER_MODULE_ARG}
};
--
2.17.1
3.路径文件:system/bt/
From 57ffd5e72a34fc34a84591937be50d0dff52b261 Mon Sep 17 00:00:00 2001
From: Dicke <hale.hale@vanzeak.com>
Date: Mon, 15 Aug 2022 07:10:45 +0000
Subject: [PATCH] add aic8800
Change-Id: I9ce6e32e9751d4374d01029d7bac6e7a6e0cf547
---
bta/ag/bta_ag_sco.cc | 2 +
device/src/esco_parameters.cc | 12 +-
stack/btm/btm_main.cc | 2 +
stack/btm/btm_sco.cc | 605 +++++++++++++++++++++++++++++++++-
4 files changed, 613 insertions(+), 8 deletions(-)
mode change 100644 => 100755 bta/ag/bta_ag_sco.cc
mode change 100644 => 100755 device/src/esco_parameters.cc
mode change 100644 => 100755 stack/btm/btm_main.cc
mode change 100644 => 100755 stack/btm/btm_sco.cc
diff --git a/bta/ag/bta_ag_sco.cc b/bta/ag/bta_ag_sco.cc
old mode 100644
new mode 100755
index 297d93ddd..c1e9a7191
--- a/bta/ag/bta_ag_sco.cc
+++ b/bta/ag/bta_ag_sco.cc
@@ -590,6 +590,8 @@ void bta_ag_codec_negotiate(tBTA_AG_SCB* p_scb) {
/* Change the power mode to Active until SCO open is completed. */
bta_sys_busy(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);
+ p_scb->sco_codec = UUID_CODEC_CVSD;
+
/* Send +BCS to the peer */
bta_ag_send_bcs(p_scb);
diff --git a/device/src/esco_parameters.cc b/device/src/esco_parameters.cc
old mode 100644
new mode 100755
index 7f550a142..8cb3a34d3
--- a/device/src/esco_parameters.cc
+++ b/device/src/esco_parameters.cc
@@ -46,8 +46,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
.output_pcm_data_format = ESCO_PCM_DATA_FORMAT_2_COMP,
.input_pcm_payload_msb_position = 0,
.output_pcm_payload_msb_position = 0,
- .input_data_path = ESCO_DATA_PATH_PCM,
- .output_data_path = ESCO_DATA_PATH_PCM,
+ .input_data_path = ESCO_DATA_PATH_HCI,//ESCO_DATA_PATH_PCM,
+ .output_data_path = ESCO_DATA_PATH_HCI,//ESCO_DATA_PATH_PCM,
.input_transport_unit_size = 0x00,
.output_transport_unit_size = 0x00,
#if (BTA_HFP_VERSION >= HFP_VERSION_1_7)
@@ -94,8 +94,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
.output_pcm_data_format = ESCO_PCM_DATA_FORMAT_2_COMP,
.input_pcm_payload_msb_position = 0,
.output_pcm_payload_msb_position = 0,
- .input_data_path = ESCO_DATA_PATH_PCM,
- .output_data_path = ESCO_DATA_PATH_PCM,
+ .input_data_path = ESCO_DATA_PATH_HCI,//ESCO_DATA_PATH_PCM,
+ .output_data_path = ESCO_DATA_PATH_HCI,//ESCO_DATA_PATH_PCM,
.input_transport_unit_size = 0x00,
.output_transport_unit_size = 0x00,
.max_latency_ms = 8,
@@ -129,8 +129,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
.output_pcm_data_format = ESCO_PCM_DATA_FORMAT_2_COMP,
.input_pcm_payload_msb_position = 0,
.output_pcm_payload_msb_position = 0,
- .input_data_path = ESCO_DATA_PATH_PCM,
- .output_data_path = ESCO_DATA_PATH_PCM,
+ .input_data_path = ESCO_DATA_PATH_HCI,//ESCO_DATA_PATH_PCM,
+ .output_data_path = ESCO_DATA_PATH_HCI,//ESCO_DATA_PATH_PCM,
.input_transport_unit_size = 0x00,
.output_transport_unit_size = 0x00,
.max_latency_ms = 13,
diff --git a/stack/btm/btm_main.cc b/stack/btm/btm_main.cc
old mode 100644
new mode 100755
index f58f44421..2d0a91934
--- a/stack/btm/btm_main.cc
+++ b/stack/btm/btm_main.cc
@@ -74,7 +74,9 @@ void btm_init(void) {
}
/** This function is called to free dynamic memory and system resource allocated by btm_init */
+extern void btm_sco_deinit(void);
void btm_free(void) {
+ btm_sco_deinit();
fixed_queue_free(btm_cb.page_queue, NULL);
btm_cb.page_queue = NULL;
diff --git a/stack/btm/btm_sco.cc b/stack/btm/btm_sco.cc
old mode 100644
new mode 100755
index b8e0c9a3e..3c8bde2c6
--- a/stack/btm/btm_sco.cc
+++ b/stack/btm/btm_sco.cc
@@ -40,6 +40,28 @@
#include "hcimsgs.h"
#include "osi/include/osi.h"
+
+#include <signal.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <linux/uhid.h>
+#include <pthread.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/poll.h>
+#include <unistd.h>
+
+
+#include "hci_layer.h"
+#include "buffer_allocator.h"
+#include "osi/include/allocator.h"
+#include "osi/include/thread.h"
+#include "osi/include/fixed_queue.h"
+#include "utl.h"
+
+
/******************************
到了这里,关于视源aic800wifi/bt调试的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!