|
1.文件说明: H: K. O# l* s0 A- z( T
Android OS系统. h6 S* T; c5 I" Z7 x
文件说明:
# Y8 E1 g0 f6 U* q$ w& E6 I O Android_tool/rtlbtmp: 应用程序
% x9 U9 l' ~% l Android_tool/btmp.default.so: 应用程序/ |- }! P: |6 v0 X8 ~5 g* [
BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware
) o& [6 B4 T. ]( M+ D; w+ G. y' d% v BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config / c# d9 Q2 G$ J2 ^4 s% |
Readme/Readmexxxx.txt: 本说明文档1 y3 B3 W0 k2 S- w
User Guide/MP tool User guide for androidxxx.pdf:mp tool 的命令集
4 Y& o, G! q. Q p( ]$ Z
+ _: r8 K5 w8 N/ k, Y" w4 w( i9 s 下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:# d& K! f# j2 b+ k2 w- _
---------------------------------------------------------------------------------
" q( ~# ]$ H& |- n | 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |
& w3 c' O! M( O' r2 H+ F2 z |---------------------------------------------------------------------------------|
0 Z$ B l2 Z1 L- V: N | RTL8703AS | rtl8703as_config | mp_rtl8703as_config |
' M/ M: X1 J4 G | RTL8703BS | rtl8703bs_config | mp_rtl8703bs_config |% P6 `/ a$ F) b1 A% m2 E: h G
| RTL8723AS | rtl8723as_config | mp_rtl8723as_config |
& N( u. O! P5 }+ [ | RTL8723A | rtl8723a_config | mp_rtl8723a_config |) ]+ E/ \) d1 b; A$ a# m2 I
| RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
3 w \8 e: G% J+ q" [* ?: f0 l | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |# c0 w/ |4 Z4 [( V- n3 l# b
| RTL8723BS | rtl8723bs_config | mp_rtl8723bs_config |, s" B+ ?/ V" S+ c! V
| RTL8723BE | rtl8723b_config | mp_rtl8723b_config |& f. r- A' J' I, x& M) k0 S
| RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
/ V. G/ L- T' k: e9 n | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |
- Z0 a" t, X: A | RTL8723CU | rtl8723c_config | mp_rtl8723c_config |9 o* G0 K9 l9 N
| RTL8723DS | rtl8723ds_config | mp_rtl8723ds_config |
9 g" ~: v+ u$ f/ u( Z6 ~( a5 m) B+ ? | RTL8723DE | rtl8723d_config | mp_rtl8723d_config |# b" y) r( N" Y: Q1 y0 E
| RTL8723DU | rtl8723d_config | mp_rtl8723d_config |
! Y/ l6 N% r; s | RTL8761AT | rtl8761at_config | mp_rtl8761at_config | d! {; B) J% d. X
| RTL8761AU | rtl8761a_config | mp_rtl8761a_config | r* q; S' t; k H3 ^
| RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |
& w: r6 _5 s: n3 D6 G | RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |
/ o* W% S7 U9 V# F9 s4 e& e* C8 b | RTL8761AUV | rtl8761a_config | mp_rtl8761a_config |
8 J& `, Z* B* J: | | RTL8761AW + 8192EU | rtl8761aw8192eu_config | mp_tl8761aw8192eu_config |& |0 y( S- R: N2 \
| RTL8821AS | rtl8821as_config | mp_rtl8821as_config |( ^1 w1 M0 G. W" ^) H! z- r6 j
| RTL8821AE | rtl8821a_config | mp_rtl8821a_config |
5 O4 l' v/ t/ Q/ R$ e0 |- J. C | RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
+ J1 J! P+ z% J$ @4 B0 i" } s | RTL8821CE | rtl8821c_config | mp_rtl8821c_config |
, `: E- A( l4 B1 Z3 J( T: e- N | RTL8821CS | rtl8821cs_config | mp_rtl8821cs_config |1 L& r+ e0 B* T
| RTL8821CU | rtl8821c_config | mp_rtl8821c_config |
; j: D4 A; D! s" a/ E4 J | RTL8822BS | rtl8822bs_config | mp_rtl8822bs_config |9 x4 V# V# E3 F; ~
| RTL8822BE | rtl8822b_config | mp_rtl8822b_config |
6 z" \: [$ f y% r; o' d& A | RTL8822BEH | rtl8822bs_config | mp_rtl8822bs_config |
% C# H3 q* h- Q# C: C" w | RTL8822BU | rtl8822b_config | mp_rtl8822b_config |
& Y+ P2 L$ r) v Y+ O; ?- h$ b | RTL8761BU | rtl8761b_config | mp_rtl8761b_config |4 t0 q# E% Q3 ?6 ?5 g* H
| RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |
' P# L- u+ R7 u) S1 B | RTL8822CU | rtl8822c_config | mp_rtl8822c_config |: L" b; k# A5 [* ^8 g. f
| RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |- L. R6 x9 m4 V
---------------------------------------------------------------------------------
" I+ [( G+ x. u" P, m/ V! @Linux OS 系统
/ I4 x7 G3 y* X% g( y8 B* C/ G 文件说明:- k. ^+ K* s$ ^& q3 s7 S6 `0 D
Linux_tool/rtlbtmp: 应用程序,需客户提供平台的交叉编译工具链来生成
# X1 E. Y/ g9 |' S4 P BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware c$ \& i* l, q: [
BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config
( t) n6 p- o1 e' J1 q, E Readme/Readmexxxx.txt: 本说明文档4 W7 m# D( B; C
User Guide/MP tool User guide for linuxxxx.pdf:mp tool 的命令集1 C$ ]# }# x# f3 g% {0 M. F7 N
下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:4 ]3 G! t7 H2 B7 A
-----------------------------------------------------------------------------------
; H; [, c6 E4 s" [2 C- { | 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |6 G% v' h, _' e$ D0 }2 e% A
|----------------------------------------------------------------------------------|
, r% u. Q$ H2 p | RTL8703AS | rtl8703a_config | mp_rtl8703as_config |
& z8 O p1 G& z3 t5 L | RTL8703BS | rtl8703b_config | mp_rtl8703bs_config |; d( F5 t+ U! X
| RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
/ J$ Y1 Q: a5 ~; ?% h. f2 ~ | RTL8723AS | rtl8723a_config | mp_rtl8723as_config |
+ }( m* v# D8 n4 I" s | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |) A% N. r, z' [+ [1 V' y' G" R
| RTL8723BE | rtl8723b_config | mp_rtl8723b_config |# p; F: n: R H
| RTL8723BS | rtl8723b_config | mp_rtl8723bs_config |' P" V/ N; ~: \1 g: \) B
| RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
$ |$ U5 ]3 e5 W2 a2 p7 n | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config | d7 l. h6 B. V7 |+ m$ ?' H$ R
| RTL8723DS | rtl8723d_config | mp_rtl8723ds_config |
) x5 B P4 `, u/ h | RTL8723DU | rtl8723du_config | mp_rtl8723d_config |
: h# a4 M' F+ J# D3 `: }8 k5 b | RTL8761AT | rtl8761at_config | mp_rtl8761at_config |
$ U& C1 @ I* H3 m) _1 j | RTL8761ATV | rtl8761a_config | mp_rtl8761at_config |
7 b4 F( k1 t4 N2 x6 o! s | RTL8761AU | rtl8761a_config | mp_rtl8761a_config |% ~/ F D. [6 X A6 Q
| RTL8761AW + 8192EU | rtl8761aw_config | mp_tl8761aw8192eu_config |
1 ?, t. l: B* m% e7 x; x. E' W | RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |8 _" F, e$ z( h% p, V
| RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |
1 A8 }, B" F% N# P! {! d | RTL8821AE | rtl8821a_config | mp_rtl8821a_config |
) c" B5 W1 @ \) D | RTL8821AS | rtl8821a_config | mp_rtl8821a_config |- N, V# O* A* K9 E
| RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
9 m/ S! P( l' N l& y1 _ | RTL8821CS | rtl8821c_config | mp_rtl8821c_config |
' X2 d3 m2 E5 V8 I) e | RTL8821CU | rtl8821cu_config | mp_rtl8821c_config |
# H9 r9 H# J" u6 f% _1 @" q) x | RTL8822BS | rtl8822b_config | mp_rtl8822b_config |
5 D( e0 N6 T$ q; Y1 c* `/ x8 X# o! b | RTL8822BU | rtl8822bu_config | mp_rtl8822b_config |
$ q& f7 t: W# B Z8 d | RTL8761BU | rtl8761b_config | mp_rtl8761b_config |' h7 S& V/ B7 A& _
| RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |
0 Y, t/ _) O. t4 ^ | RTL8822CU | rtl8822c_config | mp_rtl8822c_config |
' p/ K! O, P5 f- u# h6 b5 P( j | RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |
& `/ c t b. ]6 L) h6 {# ^' v -----------------------------------------------------------------------------------! U8 H/ d1 R+ b. B6 q
: |3 K( j2 v% W2.运行环境搭建2 J$ f0 \7 F1 {& u# ~$ O
Android OS 环境2 V) l: F' N3 g) d" r* U* a
将 tool 所需文件放到系统里
- A7 ?0 }5 B. K7 ]7 x1 u' T+ l将 rtlbtmp 文件放到 /system/bin/目录,并修改权限为 777;
8 f: }) l& h7 yadb push rtlbtmp /system/bin/. I0 U2 W6 s" o8 R8 n
adb chmod 777 /system/bin/rtlbtmp
/ G& A4 E, a! V* f将 btmp.default.so 文件放到 /system/lib/hw/目录,并修改权限为 644;
, B5 G0 t8 ^, [: M, o4 madb push btmp.default.so /system/lib/hw/- Q5 F: j0 x9 j6 J
adb chmod 644 /system/lib/hw/btmp.default.so
7 Q% L* J' a( ]# z9 H* M' ]' N5 M( |将 mp_rtlxxxx_config 文件放到 /system/etc/firmware/目录,并修改权限为 644;
' N- _( x, H* V+ oadb push mp_rtlxxxx_config /system/etc/firmware/
1 ]$ _) \/ k) o( i+ `2 z0 jadb chmod 644 /system/etc/firmware/mp_rtlxxxx_config
\9 o+ M1 ?% R% Q) R* t' ^1 B1 v将 mp_rtlxxxx_fw 文件放到 /system/etc/firmware/目录,并修改权限为 644;, [) v. }' R$ t* v
adb push mp_rtlxxxx_fw /system/etc/firmware/
# m" H; R0 a/ F* Q% h/ m) eadb chmod 644 /system/etc/firmware/mp_rtlxxxx_fw. Q2 Y0 b' d6 ^% S- ^: q4 }! }9 B
6 ?% v5 S$ n. B3 P1 A" D- |% N5 C3 I' o! z& h
#Note: 从Android 8.0及以后的系统开始,以上文件都将放到/vendor/目录下面
6 L, ]0 P: G, C: n将 rtlbtmp 文件放到 /vendor/bin/目录,并修改权限为 777;4 z7 X* M9 Q$ S3 ]4 Y
cp rtlbtmp /vendor/bin/
% j) V1 q0 Y* ^- s8 O) e1 ychmod 777 /vendor/bin/rtlbtmp
1 d: P7 O b& m1 k6 M9 P将 btmp.default.so 文件放到/vendor/lib/hw/目录,并修改权限为 644;9 }2 R# h4 x7 U! s% s, p
cp btmp.default.so /vendor/lib/hw/0 L# @5 m8 t. P6 C9 `8 w
chmod 644 /vendor/lib/hw/btmp.default.so
1 }: h- Q. z7 N* R. i" X将 mp_rtlxxxx_config 文件放到 /vendor/firmware/目录,并修改权限为 644;: Z4 _5 a: P! k; p; g2 K
cp mp_rtlxxxx_config /vendor/firmware/
. J* p) N" s1 `) S$ ychmod 644 /system/vendor/firmware/mp_rtlxxxx_config; }, M6 l3 r$ \
将 mp_rtlxxxx_fw 文件放到 /vendor/firmware/目录,并修改权限为 644;( A% S' k6 s" k5 F( ~# y
cp mp_rtlxxxx_fw /vendor/firmware/* V% P+ A7 d; C/ w1 V
chmod 644 /vendor/firmware/mp_rtlxxxx_fw! R2 T, B" P4 _
以上文件建议放到 SDK 里,不会影响正常的蓝牙使用;
# n+ n1 Q2 Q5 o 关闭 normal BT1 E; ~! L4 L7 z- |
rtlbtmp 使用的时候都需要先关闭 normal 的蓝牙,如果 UI 上不能关闭蓝牙,可以使用如下的方案:
# M0 M6 V" p% J l$ o0 X1 d6 P" S* Aservice call bluetooth_manager 8(关) /6(开)- u6 x- C0 V% ^* q- O# D* ?: _9 c% Q
或者! E |- K& C; D' e" A8 p
cd /system/lib/hw
m3 h+ J& Y& o' f4 A$ k* N! ~mv bluetooth.default.so bluetooth.default.so_ORG+ |! x |7 c# p2 L
(for android P 之后:是在 /system/lib/目录,mv libbluetooth.so libbluetooth.so_ORG)6 F* ~% g- f' `5 v
reboot9 z! W2 j* F& L
|. e. ^/ P. I- J% o& z( h
Linux OS 环境
8 Z8 Z( J$ C& h- Q3 B8 j 将 tool 所需文件放到系统里
0 J# V! ^# L0 f% \cp rtlbtmp /usr/sbin/
1 ~# ?* n- ^& @( S$ n- A4 Ychmod 777 /usr/sbin/rtlbtmp8 S- W2 Q" V* z5 Q" n0 f6 V4 K
cp mp_rtlxxxx_config /lib/firmware/
4 W* m$ x. V2 Nchmod 644 /lib/firmware/mp_rtlxxxx_config% n; d& I4 g( A
cp mp_rtlxxxx_fw /lib/firmware/
- ^% ?( u# c" t/ ichmod 644 /lib/firmware/mp_rtlxxxx_fw
2 E* h: A3 O6 h+ O% y9 h UART 接口芯片准备
5 G( b% a2 V4 z% g+ Z请关闭 normal 蓝牙,即开机后默认不加载 rtk_hciattach 等流程;* D! j& d8 U& A
USB 接口芯片准备
/ B9 V' L' u% R! ^2 E先打开 normal 蓝牙,再 hciconfig hci0 up
* e' c R) D4 E! s5 R. O4 E1 c' S5 F0 M8 Q7 m
9 l& {* l' A+ q: p3.BT RF Performance Test & TX Power Calibration9 x& C- R7 ]( p+ |$ U( l
参考User Guide
7 Y: i# S ]4 W; @+ _7 l4 c) n2 o m#Note:8761B & 8822C 相比之前的IC比较特殊,参考单独的User Guide8 c) `0 m4 U# ~) ?! j
; Q" x0 @1 Y+ c& y$ x
9 P" t0 I( Y: D# V) a
一般就是要细化linux还是Android,对应其中kernle版本有对应的config、fw、btmp.default.so、rtlbtmt、rtlbtmt_clt、rtlbtmt_skt,一些疑问可沟通!
# L' n' ^; K1 E; ]5 L) _: ~3 _, H% _' }
7 S1 W! S- X# @3 o; L) \7 D9 g! e4 E9 t |
|