|
|
1.文件说明
q p4 i: s& \/ U+ F) gAndroid OS系统
6 q E# ~1 g, ^% i- ` 文件说明:5 Q% `9 x' b- r6 [$ `
Android_tool/rtlbtmp: 应用程序
% G: z8 O( y' j- U5 o" h' U Android_tool/btmp.default.so: 应用程序' J7 X5 O% l; t- f! B/ I L- u
BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware
& Q. }$ G* p" M% A5 z BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config
6 t6 e8 r2 V3 x' i Readme/Readmexxxx.txt: 本说明文档, }9 i! ^ n/ `% }
User Guide/MP tool User guide for androidxxx.pdf:mp tool 的命令集
& o' B+ E; n+ h" ~. E* U6 J: Z$ e 5 q1 u+ u9 |" b
下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:
! ` o m1 {" L6 ` ---------------------------------------------------------------------------------7 A F P5 b( Z2 M7 g. V
| 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |, R) d. j" Q8 j( B0 a, ~; Q
|---------------------------------------------------------------------------------|
1 B' H( v" \* P" u2 t3 ~% [- b; v | RTL8703AS | rtl8703as_config | mp_rtl8703as_config |% u7 F0 S5 j' v- T( q; |
| RTL8703BS | rtl8703bs_config | mp_rtl8703bs_config |1 O) ^* n, H3 d$ t
| RTL8723AS | rtl8723as_config | mp_rtl8723as_config |4 j! ^% z& P( J6 P" x
| RTL8723A | rtl8723a_config | mp_rtl8723a_config |8 {2 a9 t) [; x3 \) A$ ?
| RTL8723AE | rtl8723a_config | mp_rtl8723a_config |# v' F' h% w% T6 m
| RTL8723AU | rtl8723a_config | mp_rtl8723a_config |
3 M( y, H7 O7 L- a2 ]; I+ g/ Y0 }+ ` | RTL8723BS | rtl8723bs_config | mp_rtl8723bs_config |+ n( l. t5 \4 d% ?
| RTL8723BE | rtl8723b_config | mp_rtl8723b_config |$ x' _3 ^; o# A7 q1 [( w* a7 e% ]: W
| RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
. t+ u+ |- f2 n6 x$ d | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |
1 Z8 K6 Q" D; t# A4 J | RTL8723CU | rtl8723c_config | mp_rtl8723c_config |
a2 A9 Z$ E( E [1 W; C | RTL8723DS | rtl8723ds_config | mp_rtl8723ds_config |4 `2 p- U P+ [: q
| RTL8723DE | rtl8723d_config | mp_rtl8723d_config |
$ c6 B G/ L# ]. A$ g6 C: r | RTL8723DU | rtl8723d_config | mp_rtl8723d_config |$ N! j+ c7 U2 m. w) V: L
| RTL8761AT | rtl8761at_config | mp_rtl8761at_config |
) d9 J, N9 T' B( F; Z7 Y | RTL8761AU | rtl8761a_config | mp_rtl8761a_config |
, h5 \4 y+ t \! U8 g | RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |1 |5 W$ A: c( P3 c8 R
| RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |7 ?" w. V" [2 j5 }$ H! i
| RTL8761AUV | rtl8761a_config | mp_rtl8761a_config |
* g7 Y6 K8 b$ D f) [ | RTL8761AW + 8192EU | rtl8761aw8192eu_config | mp_tl8761aw8192eu_config |
9 q, }9 C! S3 _, L4 a, b/ b | RTL8821AS | rtl8821as_config | mp_rtl8821as_config |
8 }4 o2 z Y) i: g& c | RTL8821AE | rtl8821a_config | mp_rtl8821a_config |
" A: [/ |. x9 O( h! f4 [& b | RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
& p; H9 R% O5 p. l | RTL8821CE | rtl8821c_config | mp_rtl8821c_config |- |+ V" D$ @' g' G
| RTL8821CS | rtl8821cs_config | mp_rtl8821cs_config |
% q* T8 D! y$ H* }# _ | RTL8821CU | rtl8821c_config | mp_rtl8821c_config |
, Y$ x% l5 I+ l+ D | RTL8822BS | rtl8822bs_config | mp_rtl8822bs_config |
" N+ {8 K7 K: P, R8 E | RTL8822BE | rtl8822b_config | mp_rtl8822b_config |1 H$ C9 D4 u" Z8 L
| RTL8822BEH | rtl8822bs_config | mp_rtl8822bs_config |
/ P$ }/ Q2 C$ ^7 ?1 t7 N | RTL8822BU | rtl8822b_config | mp_rtl8822b_config |
% t1 e0 p# u* a' I) k# ` | RTL8761BU | rtl8761b_config | mp_rtl8761b_config |- Y1 F2 F+ |$ N% L# J! [
| RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |
2 Q0 y2 P: t; u0 g | RTL8822CU | rtl8822c_config | mp_rtl8822c_config |6 F2 y8 \# w' D$ v1 v9 ?
| RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |3 W; |: [% D u$ G' [3 h. m
---------------------------------------------------------------------------------1 n( m4 M7 ?( A8 }
Linux OS 系统; ?- s% K, F9 h- F, B
文件说明:
) b- P/ ]! O7 K) t! l6 L Linux_tool/rtlbtmp: 应用程序,需客户提供平台的交叉编译工具链来生成
' \) |2 e, J5 W0 H7 j! `+ K, q BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware3 g3 K2 p; E" J9 \/ R# B
BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config - {1 v2 @ r7 L' B7 }* o3 G
Readme/Readmexxxx.txt: 本说明文档
; Z2 L/ @5 ]2 b7 W6 Q9 F5 X) ^ User Guide/MP tool User guide for linuxxxx.pdf:mp tool 的命令集
8 S- D' d$ W* B* k+ Y 下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:
# C5 @+ c" C+ H7 C7 x+ Y, B -----------------------------------------------------------------------------------( R/ N! S, }7 ?, l
| 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |
' i- E, K- S* z% v |----------------------------------------------------------------------------------|: x: E' v4 W( c9 m
| RTL8703AS | rtl8703a_config | mp_rtl8703as_config |2 s0 a+ P' h. X3 q9 e
| RTL8703BS | rtl8703b_config | mp_rtl8703bs_config |
' V6 M2 f: a& c6 p5 @; } | RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
. J8 b R$ G, V% y% m3 v | RTL8723AS | rtl8723a_config | mp_rtl8723as_config |
; t2 z. ?6 Q: R0 { | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |: Y; p; p# E8 C+ L
| RTL8723BE | rtl8723b_config | mp_rtl8723b_config |+ x0 w `/ l' s5 {+ | x
| RTL8723BS | rtl8723b_config | mp_rtl8723bs_config |
* g! w' X0 e/ S5 [ | RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
( p8 a' Z) _- @/ i) ~3 M | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |
; |; E; m" Z( V1 C | RTL8723DS | rtl8723d_config | mp_rtl8723ds_config |6 w5 z& N" B1 a
| RTL8723DU | rtl8723du_config | mp_rtl8723d_config |; w- F' m/ n) b+ h! w1 A: P
| RTL8761AT | rtl8761at_config | mp_rtl8761at_config |
5 {( Y# U: Z& ]) ]/ K6 }# s( N | RTL8761ATV | rtl8761a_config | mp_rtl8761at_config |
# \& Q5 v e+ C% _- B | RTL8761AU | rtl8761a_config | mp_rtl8761a_config |) ~0 T* V" ~; [' H% ]
| RTL8761AW + 8192EU | rtl8761aw_config | mp_tl8761aw8192eu_config |; l% v) _6 F+ l2 Z8 p' O& E% V
| RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |
6 J! G9 s; n0 S& o3 Y5 m | RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |4 V% s2 ^! g! @; \4 A. u' C9 t1 _; k" E
| RTL8821AE | rtl8821a_config | mp_rtl8821a_config |
* w8 ^) }: H# }6 s$ H! K& b | RTL8821AS | rtl8821a_config | mp_rtl8821a_config |
* g2 r" _( M- {0 j' y" C | RTL8821AU | rtl8821a_config | mp_rtl8821a_config |* @ K: q5 a# D* a/ Y4 _
| RTL8821CS | rtl8821c_config | mp_rtl8821c_config |. Y" V% j2 t4 h" f% Y
| RTL8821CU | rtl8821cu_config | mp_rtl8821c_config |0 X1 i0 A1 Q ~5 ?. @# Q8 h0 x
| RTL8822BS | rtl8822b_config | mp_rtl8822b_config |6 y1 C7 A0 B# t2 X! d
| RTL8822BU | rtl8822bu_config | mp_rtl8822b_config |
. ~; b7 |, a8 E# D" J/ ~3 @: ^ | RTL8761BU | rtl8761b_config | mp_rtl8761b_config |+ W3 H9 ?# K: b2 G* }0 e; P
| RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |- P. w1 @- g& |# @# {6 ?$ s: U$ s
| RTL8822CU | rtl8822c_config | mp_rtl8822c_config |
4 R) l# T/ v* e. A( Y | RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |
$ w, l' Z4 T7 i$ L" P" A6 D6 s -----------------------------------------------------------------------------------
: ]3 q+ w) X' w$ t; M4 \! Y+ n9 B
2.运行环境搭建
* }7 _" p" u0 E9 V3 N1 L) cAndroid OS 环境
) E% b/ a) V% Q将 tool 所需文件放到系统里
$ ?! _' v. y7 b) [" n+ ^$ |5 }将 rtlbtmp 文件放到 /system/bin/目录,并修改权限为 777;3 r9 G0 |( ~* o' I, K
adb push rtlbtmp /system/bin/& m; I. o# j6 y0 t2 s9 {* q! H
adb chmod 777 /system/bin/rtlbtmp
. ?4 F+ e0 K5 T7 u: w; M将 btmp.default.so 文件放到 /system/lib/hw/目录,并修改权限为 644;! m5 W* H Z% b, W4 ~
adb push btmp.default.so /system/lib/hw/
; O* V' _: n2 o# f6 [( [, iadb chmod 644 /system/lib/hw/btmp.default.so2 l( r. J3 A! F2 b4 T* a5 E9 o6 {+ u
将 mp_rtlxxxx_config 文件放到 /system/etc/firmware/目录,并修改权限为 644;3 \& Y" k- N7 s4 r' ?8 H
adb push mp_rtlxxxx_config /system/etc/firmware/- O. }! ?$ w6 {( h* \: P
adb chmod 644 /system/etc/firmware/mp_rtlxxxx_config
- q) r, Z# u3 s将 mp_rtlxxxx_fw 文件放到 /system/etc/firmware/目录,并修改权限为 644;. F5 D' t1 @" p
adb push mp_rtlxxxx_fw /system/etc/firmware/
b' h: q+ @1 o4 a( I' h/ fadb chmod 644 /system/etc/firmware/mp_rtlxxxx_fw
' Q9 C5 f$ i4 K; a: q; v% ~+ E( A4 S9 R4 E4 j
3 d! G& i" r8 h# f. a#Note: 从Android 8.0及以后的系统开始,以上文件都将放到/vendor/目录下面( b$ m+ m( I) S* Y
将 rtlbtmp 文件放到 /vendor/bin/目录,并修改权限为 777;
, O t* R% o0 f3 S+ Ecp rtlbtmp /vendor/bin/
' ^# V! f ]6 F& g- b+ @chmod 777 /vendor/bin/rtlbtmp
5 w( Y, W" `! P" U& @9 ]5 P2 D将 btmp.default.so 文件放到/vendor/lib/hw/目录,并修改权限为 644;- X+ m1 E' j6 x; |8 a
cp btmp.default.so /vendor/lib/hw/' t4 }. ^- u* U l! ^0 F
chmod 644 /vendor/lib/hw/btmp.default.so
- _9 e, A$ C, f将 mp_rtlxxxx_config 文件放到 /vendor/firmware/目录,并修改权限为 644;5 O" x1 Q0 L# [0 ] H- N1 ^
cp mp_rtlxxxx_config /vendor/firmware/
8 z( L* q- V9 t, `/ p' W" i' Mchmod 644 /system/vendor/firmware/mp_rtlxxxx_config/ `1 s* D) D) x5 K; Y
将 mp_rtlxxxx_fw 文件放到 /vendor/firmware/目录,并修改权限为 644;
: I7 b1 O/ Q/ c, Jcp mp_rtlxxxx_fw /vendor/firmware/
" _2 ^. }% z. e3 A$ r: e# _chmod 644 /vendor/firmware/mp_rtlxxxx_fw
9 U8 b: e7 y0 @7 {以上文件建议放到 SDK 里,不会影响正常的蓝牙使用;
% c3 L% s8 l. b. ] 关闭 normal BT$ M& ^' }5 b" x: _
rtlbtmp 使用的时候都需要先关闭 normal 的蓝牙,如果 UI 上不能关闭蓝牙,可以使用如下的方案:
3 \/ @' J& M& p6 Oservice call bluetooth_manager 8(关) /6(开)
" F) b) ?7 d, ]/ `0 v2 u或者
# u7 a7 u8 y. V) U7 X0 bcd /system/lib/hw4 D2 l, z# t' A7 H' c ^
mv bluetooth.default.so bluetooth.default.so_ORG4 V6 `7 T+ }+ c. c
(for android P 之后:是在 /system/lib/目录,mv libbluetooth.so libbluetooth.so_ORG)
" V, n6 I( }3 f2 ^% W2 [ D, L2 Ureboot
) G2 D* C# }0 L- E: }, {! k$ z( x: S. g" t# P5 u
Linux OS 环境
0 W% M; t; H8 o7 { S) `0 u, t" G% | 将 tool 所需文件放到系统里6 M& D. x$ w/ e! P
cp rtlbtmp /usr/sbin/6 t0 K8 F4 [) ?3 H9 T8 K' r
chmod 777 /usr/sbin/rtlbtmp& B& `8 Y7 }+ D6 Z" R
cp mp_rtlxxxx_config /lib/firmware/' d \3 t' t, G) L
chmod 644 /lib/firmware/mp_rtlxxxx_config( {% ?7 q2 J& x, w5 V. M1 [$ a
cp mp_rtlxxxx_fw /lib/firmware/' L) U2 w3 a' W
chmod 644 /lib/firmware/mp_rtlxxxx_fw! Q# o4 G! F- U- P+ q
UART 接口芯片准备
/ c4 A' F1 i; y请关闭 normal 蓝牙,即开机后默认不加载 rtk_hciattach 等流程;* D6 ^0 |; A$ M' `4 @7 |
USB 接口芯片准备8 M3 N: V, h r+ x1 M8 v% H
先打开 normal 蓝牙,再 hciconfig hci0 up- U E5 m5 G" j0 Q5 }' y, z& m5 b
" V! u( L5 ?: l& t5 q. t3 n
d- B# e' e7 }0 j3.BT RF Performance Test & TX Power Calibration1 v, ^0 K/ P3 a* U* u5 ]$ E
参考User Guide3 I, D1 ]3 Q7 [ d5 T
#Note:8761B & 8822C 相比之前的IC比较特殊,参考单独的User Guide% {/ R7 z5 y0 f: v- k; Z' w
+ D7 I- c3 I& I& H
: a' Y" y% E( f |- Q5 P4 J# g一般就是要细化linux还是Android,对应其中kernle版本有对应的config、fw、btmp.default.so、rtlbtmt、rtlbtmt_clt、rtlbtmt_skt,一些疑问可沟通!/ s% x! F0 X0 ?7 z, i% h
" T+ X# }# z8 W; {+ y# t& { ?
6 L5 S0 v7 B4 h% c y8 \
|
|