|
|
1.文件说明1 E- Y. B( w9 X( f) b! [% c
Android OS系统' _) D6 c8 D5 B, j7 _: ?! L' ~* ^8 _
文件说明:3 j0 W4 e/ u; n6 V. ?* w
Android_tool/rtlbtmp: 应用程序
0 }- y1 D E B0 c Android_tool/btmp.default.so: 应用程序8 H; b9 m+ `- B/ q" i
BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware
5 m2 y5 @: u0 ?: ]* q; h; Q9 r: ~ BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config $ @+ D0 g" S7 T: ` g
Readme/Readmexxxx.txt: 本说明文档5 O6 C+ g1 P' J5 w+ w! U, y4 |
User Guide/MP tool User guide for androidxxx.pdf:mp tool 的命令集
# ^& T* A U& t! c5 h 9 P- d2 z }7 @3 z
下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:3 O6 G5 E1 W4 p: n8 ?
---------------------------------------------------------------------------------/ x: g5 Q# i2 _7 @5 w# Q
| 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |' b' y" y0 ~) ]; L, M+ V r% _
|---------------------------------------------------------------------------------| a* I# C0 r5 @5 N9 e |% i1 G
| RTL8703AS | rtl8703as_config | mp_rtl8703as_config |
. Y8 x; ]+ B/ X9 T- ~+ P | RTL8703BS | rtl8703bs_config | mp_rtl8703bs_config |
% h% Y7 @; B5 p* l | RTL8723AS | rtl8723as_config | mp_rtl8723as_config |
# O8 m4 {% l+ P2 C0 N/ T | RTL8723A | rtl8723a_config | mp_rtl8723a_config |) D, Q; a4 h/ G2 ?+ L( p
| RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
6 y2 ?9 z: x$ y x# A | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |
+ D6 |2 S% n W& t2 l | RTL8723BS | rtl8723bs_config | mp_rtl8723bs_config | X6 D3 K' b, s2 Q( D
| RTL8723BE | rtl8723b_config | mp_rtl8723b_config |$ C0 `! u! S5 N9 A9 c; [
| RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |6 y( u) y- v& m
| RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |
' P6 |9 y2 e3 z6 m0 Y$ Y | RTL8723CU | rtl8723c_config | mp_rtl8723c_config | }0 ?. P& @0 M$ R& k5 [& B
| RTL8723DS | rtl8723ds_config | mp_rtl8723ds_config |
/ P, B' w# t, a$ _( ]3 n | RTL8723DE | rtl8723d_config | mp_rtl8723d_config |' R& e, P0 @% K0 @9 I) J" k
| RTL8723DU | rtl8723d_config | mp_rtl8723d_config |8 R0 u- S0 ^; r. a$ f0 ]/ n' {
| RTL8761AT | rtl8761at_config | mp_rtl8761at_config |1 L3 q$ i- G2 H0 J% `+ K0 f% p
| RTL8761AU | rtl8761a_config | mp_rtl8761a_config |; ~1 S4 Y. u* W" f: ?% @* j8 ~
| RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |+ x$ @5 x1 _& |+ N9 A
| RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |
6 B# M4 F; d- E | RTL8761AUV | rtl8761a_config | mp_rtl8761a_config |& N! ]) t2 x0 L7 {
| RTL8761AW + 8192EU | rtl8761aw8192eu_config | mp_tl8761aw8192eu_config |
5 f# ^& Z) i" P& ^/ |& B: q+ j | RTL8821AS | rtl8821as_config | mp_rtl8821as_config |- | f d3 i- G# F- m
| RTL8821AE | rtl8821a_config | mp_rtl8821a_config |
c3 r3 l& B% E7 W8 T2 J | RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
' T# R0 L( P) Y: r | RTL8821CE | rtl8821c_config | mp_rtl8821c_config |
$ S/ N) J3 M/ j5 n n: O | RTL8821CS | rtl8821cs_config | mp_rtl8821cs_config | Y/ u3 k5 {2 a2 o
| RTL8821CU | rtl8821c_config | mp_rtl8821c_config |
6 M) w. s7 [9 g5 }& L6 u& m- E | RTL8822BS | rtl8822bs_config | mp_rtl8822bs_config |, o& n5 a. |" K8 t C
| RTL8822BE | rtl8822b_config | mp_rtl8822b_config |$ k" C. \, a% z X0 I5 w" @5 L% u
| RTL8822BEH | rtl8822bs_config | mp_rtl8822bs_config |
4 L1 k, k3 `5 [- y. s( {% r2 B- ^ | RTL8822BU | rtl8822b_config | mp_rtl8822b_config |# [ ^( A4 c4 A" c1 ~
| RTL8761BU | rtl8761b_config | mp_rtl8761b_config |
3 G9 F& Z; N2 w3 g# x2 `7 A | RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |2 Y8 Q' y" j4 p% j7 `/ V8 t3 u& Q
| RTL8822CU | rtl8822c_config | mp_rtl8822c_config |
, M* c! Z3 Z9 q8 s | RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |
C$ S: u7 S) W1 l ---------------------------------------------------------------------------------
4 Y" E& }+ S* t+ P+ M' P+ WLinux OS 系统
3 U/ R( ~4 Q, W! h5 V: \5 b( e: k 文件说明:5 o: ~; v4 |/ h& L0 w
Linux_tool/rtlbtmp: 应用程序,需客户提供平台的交叉编译工具链来生成' u g9 F' J% h. |) ?
BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware
! e- a L z5 q( @' I BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config - }0 M/ G# P; x6 u& I) X
Readme/Readmexxxx.txt: 本说明文档
) g& z; l F0 h0 ^" p8 ~( Q User Guide/MP tool User guide for linuxxxx.pdf:mp tool 的命令集
2 e, i8 s& M# G0 A2 U; M 下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:* M- V4 b+ T: |- q* P/ E! L" m
-----------------------------------------------------------------------------------1 S# ~; Z2 }0 z4 `4 i" O+ Y
| 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |" J2 q3 ~( ? u; n+ l
|----------------------------------------------------------------------------------|5 d, ^0 i6 H. G- R" @ Z, t. z% r
| RTL8703AS | rtl8703a_config | mp_rtl8703as_config |" s9 a3 ]5 K( Z
| RTL8703BS | rtl8703b_config | mp_rtl8703bs_config |
6 B5 N3 J; z T3 M6 v+ ~ | RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
1 u r U" `5 l( Q7 w b& B1 [3 I | RTL8723AS | rtl8723a_config | mp_rtl8723as_config |
7 l% A; v2 A P | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |
3 I# V" h( f/ \ | RTL8723BE | rtl8723b_config | mp_rtl8723b_config |4 j8 M4 \" Q" K* F4 R1 I
| RTL8723BS | rtl8723b_config | mp_rtl8723bs_config |
% j) d: ^, ^4 @- ?. c/ d9 [* @ | RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
6 x' p; n% Y+ c. F$ U* \ | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |
( j, N+ h9 e- |1 q1 b | | RTL8723DS | rtl8723d_config | mp_rtl8723ds_config |* U7 j& |4 e1 X8 O i) a' u
| RTL8723DU | rtl8723du_config | mp_rtl8723d_config |4 X8 @4 u0 U5 a3 |7 U3 `: e
| RTL8761AT | rtl8761at_config | mp_rtl8761at_config |
& z7 v! S4 v y! g. o | RTL8761ATV | rtl8761a_config | mp_rtl8761at_config |
; _5 l: [+ _( M. P5 ]8 }. k0 ` | RTL8761AU | rtl8761a_config | mp_rtl8761a_config |
6 q% ]6 D4 D* I | RTL8761AW + 8192EU | rtl8761aw_config | mp_tl8761aw8192eu_config |/ m: j; ^. g) L, T9 [$ m" d$ I$ N
| RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |! s* {. ]! s7 ]( I2 s* H
| RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |" Y/ R7 \4 [* t+ \9 ~% a
| RTL8821AE | rtl8821a_config | mp_rtl8821a_config |
7 H% @9 v3 G, |) v | RTL8821AS | rtl8821a_config | mp_rtl8821a_config |
+ h* U* J6 j6 E3 O | RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
6 j' J! u/ i7 }- b | RTL8821CS | rtl8821c_config | mp_rtl8821c_config |
" E) d$ S# D- t" I X | RTL8821CU | rtl8821cu_config | mp_rtl8821c_config |
7 Y. w; N5 }/ ` | RTL8822BS | rtl8822b_config | mp_rtl8822b_config |
1 c o. k6 I, H6 u0 a | RTL8822BU | rtl8822bu_config | mp_rtl8822b_config |
4 x, N& Z0 [! Z3 Q6 m( X | RTL8761BU | rtl8761b_config | mp_rtl8761b_config |7 ~/ }2 o1 o% w9 }
| RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |
, U8 H% S ]* Z1 O( c+ E | RTL8822CU | rtl8822c_config | mp_rtl8822c_config |- l$ Z( ^3 W8 V! ^- Y
| RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |$ U- ?4 _) u7 i, S6 l9 e+ n
-----------------------------------------------------------------------------------
5 H5 c: `+ U" C7 F
( B3 |$ O# j' _! i2.运行环境搭建3 g2 t1 `2 Y2 m9 M- b) C; h; Q. N
Android OS 环境
6 _( Q q. m" f$ o8 Y将 tool 所需文件放到系统里 x! S% g9 ?8 \6 C1 c' H
将 rtlbtmp 文件放到 /system/bin/目录,并修改权限为 777;
: H$ C' n/ ]" T& iadb push rtlbtmp /system/bin/
5 J; I' F! u) xadb chmod 777 /system/bin/rtlbtmp6 R n: }1 Q/ I o, e9 @
将 btmp.default.so 文件放到 /system/lib/hw/目录,并修改权限为 644;2 c' g8 W0 n! C; f
adb push btmp.default.so /system/lib/hw/% t# c$ r6 k+ D
adb chmod 644 /system/lib/hw/btmp.default.so
5 I; b8 ]& ]8 y$ L+ D, ~将 mp_rtlxxxx_config 文件放到 /system/etc/firmware/目录,并修改权限为 644;; J- o' Z/ t0 i
adb push mp_rtlxxxx_config /system/etc/firmware/' U$ C5 u: D/ V- F1 ?: Q1 v0 ?2 v
adb chmod 644 /system/etc/firmware/mp_rtlxxxx_config4 @$ g! {* U& e+ ~, {8 ?8 v
将 mp_rtlxxxx_fw 文件放到 /system/etc/firmware/目录,并修改权限为 644;
) {. Y- n: {! I [9 S# uadb push mp_rtlxxxx_fw /system/etc/firmware/7 l! r3 e! _- y2 M6 |% k* ~4 L
adb chmod 644 /system/etc/firmware/mp_rtlxxxx_fw
' c* ` n% K0 ^; l4 e7 B% `1 Q4 ~: c2 z) j
/ X6 F$ U7 b, I% T- M- D3 p
#Note: 从Android 8.0及以后的系统开始,以上文件都将放到/vendor/目录下面2 |, g: m* Z3 ~! i6 }# N* E8 X
将 rtlbtmp 文件放到 /vendor/bin/目录,并修改权限为 777;
5 Y9 d' U0 J0 @: a/ Ncp rtlbtmp /vendor/bin/
* J/ X1 C8 a& \: G; J% K, nchmod 777 /vendor/bin/rtlbtmp
! [0 w' c8 n" `2 @. Q0 Z0 T" o3 ^将 btmp.default.so 文件放到/vendor/lib/hw/目录,并修改权限为 644;
4 d* [; V2 v: |' {2 @cp btmp.default.so /vendor/lib/hw/
: h5 Z2 c# P# t# ^" d; |: |; V- h% Gchmod 644 /vendor/lib/hw/btmp.default.so
. x, v, n9 r9 r将 mp_rtlxxxx_config 文件放到 /vendor/firmware/目录,并修改权限为 644;
7 _- ?2 C5 K) _3 _$ ^cp mp_rtlxxxx_config /vendor/firmware/
$ u5 w/ W1 f7 X7 I: K; P+ i) u' T6 o- ~chmod 644 /system/vendor/firmware/mp_rtlxxxx_config" W7 W( J# s+ v7 U" G7 v
将 mp_rtlxxxx_fw 文件放到 /vendor/firmware/目录,并修改权限为 644;
. k" ^% y$ C5 V3 \, l2 [! w) t' Ocp mp_rtlxxxx_fw /vendor/firmware/$ d$ ~( m4 {7 I M, B* t
chmod 644 /vendor/firmware/mp_rtlxxxx_fw7 E( R( }- V$ W- m; I* Z
以上文件建议放到 SDK 里,不会影响正常的蓝牙使用;3 i! t, u4 W) f ]7 b2 k# y/ R
关闭 normal BT
! ~" U+ P. Q3 \) Artlbtmp 使用的时候都需要先关闭 normal 的蓝牙,如果 UI 上不能关闭蓝牙,可以使用如下的方案:
2 u! X# Y% V& f. dservice call bluetooth_manager 8(关) /6(开)
: M' @) R) s- S0 u4 ~3 Y或者
' H4 {9 H# b! t2 bcd /system/lib/hw( O8 _" H. F1 d. ^' z7 G
mv bluetooth.default.so bluetooth.default.so_ORG$ T& D' G: `$ p6 S3 L
(for android P 之后:是在 /system/lib/目录,mv libbluetooth.so libbluetooth.so_ORG)/ q% u/ B6 n3 g0 V2 U; Z I
reboot
6 g) b' c$ x* c U2 g. ^0 [' o2 E0 K0 Q, x0 @. p7 U
Linux OS 环境
: f# f* r$ h# H 将 tool 所需文件放到系统里
# J& j% H" y9 X8 O7 D8 Acp rtlbtmp /usr/sbin/
; a% y: u Q) Z3 q+ z4 }chmod 777 /usr/sbin/rtlbtmp
9 I q$ f# E" F4 ^* }cp mp_rtlxxxx_config /lib/firmware/( b% y% ?7 G% k+ ~8 d
chmod 644 /lib/firmware/mp_rtlxxxx_config5 V) z: ?; p9 Y" e
cp mp_rtlxxxx_fw /lib/firmware/ p. C# \& Q3 i6 ~$ n- s
chmod 644 /lib/firmware/mp_rtlxxxx_fw
* w& s* M+ F2 k3 d, W6 P$ r UART 接口芯片准备2 d! F4 I- `/ ~: l/ n7 m
请关闭 normal 蓝牙,即开机后默认不加载 rtk_hciattach 等流程;3 o) {2 `# ]: I
USB 接口芯片准备
& F2 W9 E% [" g* w; j* N先打开 normal 蓝牙,再 hciconfig hci0 up
1 w( p% i, r ]" W& O( E, J5 ^; z7 w9 N# z6 h2 \8 m: j
8 D! G, {: b9 z/ k5 ^6 l+ p- G
3.BT RF Performance Test & TX Power Calibration' U" `) [! L" \- N
参考User Guide
+ w8 S: @+ e4 e' z% ^' e#Note:8761B & 8822C 相比之前的IC比较特殊,参考单独的User Guide
" Z4 ~& q9 ~, S( k' C( w" S- G0 K5 P3 ~+ K
) D- a3 w1 n/ D; ^) p' `
一般就是要细化linux还是Android,对应其中kernle版本有对应的config、fw、btmp.default.so、rtlbtmt、rtlbtmt_clt、rtlbtmt_skt,一些疑问可沟通!
& x5 U/ a1 s7 e9 J( G
* S2 }5 R3 s+ R7 _: s" H5 S: T2 o# c4 Q- `: q6 | P- N* M, f) a4 B& b
|
|