|
|
1.文件说明
* {0 ^1 i; m) r! L" k' `! ^Android OS系统1 i h- }: f* L5 F* E
文件说明:
4 P" |7 S9 [5 K: [4 \, ~ Android_tool/rtlbtmp: 应用程序: D) V+ w$ d7 s! x
Android_tool/btmp.default.so: 应用程序9 y' z7 L& F' ^9 O# ]8 [7 B
BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware
- h5 O4 T8 U# [* ]* D BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config
2 G- R+ i; \" H. v4 V y Y Readme/Readmexxxx.txt: 本说明文档
9 R! R _, k2 N9 z3 Y$ z2 _) H7 V User Guide/MP tool User guide for androidxxx.pdf:mp tool 的命令集3 B1 U6 | k$ T3 C& \! i
4 X- o* B2 H' \ ?/ D
下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:4 B( x R' l; H6 o( q" h
---------------------------------------------------------------------------------
+ X) p5 C2 v- z$ o. ]' S, ]- y | 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |
! ]& m* ^+ r( y* Q y2 W5 ~7 ` |---------------------------------------------------------------------------------|4 k# b7 s# p' N# P# C# I
| RTL8703AS | rtl8703as_config | mp_rtl8703as_config |
% {* t! c; D1 |" V+ U$ k | RTL8703BS | rtl8703bs_config | mp_rtl8703bs_config |: \4 O4 Q/ K# Q3 b" @
| RTL8723AS | rtl8723as_config | mp_rtl8723as_config |& p& n; L/ V, N! h; ~% x
| RTL8723A | rtl8723a_config | mp_rtl8723a_config |$ x; v* E- U) ?4 e
| RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
: G5 [ ~; l3 `3 L! N: s' x+ o | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |
' V0 P' W8 h( N) r+ t; Y | RTL8723BS | rtl8723bs_config | mp_rtl8723bs_config |
8 x7 d$ A% c0 K( Q | RTL8723BE | rtl8723b_config | mp_rtl8723b_config | p# Y: _/ v/ E/ l2 R
| RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
: L% b7 |5 U4 G* r | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |
& g1 I) o& z2 L9 `( T | RTL8723CU | rtl8723c_config | mp_rtl8723c_config |
t5 j: _: w+ B0 K. c | RTL8723DS | rtl8723ds_config | mp_rtl8723ds_config |) ~& Z* f/ g5 `; f( f; \
| RTL8723DE | rtl8723d_config | mp_rtl8723d_config |: `( t. D' m( x# c& {, @$ Q- q
| RTL8723DU | rtl8723d_config | mp_rtl8723d_config |8 ~% d% L8 j) m( u% D8 ~. g
| RTL8761AT | rtl8761at_config | mp_rtl8761at_config |: F0 N" t/ m7 ~) h! z/ _
| RTL8761AU | rtl8761a_config | mp_rtl8761a_config |/ N$ h! T: Z5 X* u
| RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |, s+ E, L2 R2 `2 J) R
| RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |
% {0 c0 Q% c, _& Q( G$ u$ ` | RTL8761AUV | rtl8761a_config | mp_rtl8761a_config |
0 }) `, s% a5 z. W: l) C | RTL8761AW + 8192EU | rtl8761aw8192eu_config | mp_tl8761aw8192eu_config |; K# E1 r' Q. p4 G* _3 y7 [
| RTL8821AS | rtl8821as_config | mp_rtl8821as_config |
3 O0 s. [7 ~* q* ]. r1 n6 T& u3 p | RTL8821AE | rtl8821a_config | mp_rtl8821a_config |* i5 D8 m- E1 E/ j5 u! m- P: o7 K
| RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
. O* z: F# P/ K& [# u+ J" q+ d | RTL8821CE | rtl8821c_config | mp_rtl8821c_config |
& c8 O9 p, [9 s- v c | RTL8821CS | rtl8821cs_config | mp_rtl8821cs_config |
4 m4 w0 U1 [1 N3 c3 a# \ | RTL8821CU | rtl8821c_config | mp_rtl8821c_config |" D S* W. A+ j/ u4 X
| RTL8822BS | rtl8822bs_config | mp_rtl8822bs_config |: A) z) v# w |1 e7 o* {) u
| RTL8822BE | rtl8822b_config | mp_rtl8822b_config |
4 d9 L) I7 H9 d | RTL8822BEH | rtl8822bs_config | mp_rtl8822bs_config |
6 E H$ g: {& _6 j2 T | RTL8822BU | rtl8822b_config | mp_rtl8822b_config |
1 v% P" ], f/ z7 D1 V | RTL8761BU | rtl8761b_config | mp_rtl8761b_config | \3 b0 B0 X. b9 t( Z
| RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |7 C9 O* f( K# s, \% ?
| RTL8822CU | rtl8822c_config | mp_rtl8822c_config |7 P) r7 Z5 \0 g) n2 x
| RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |7 P1 k$ j0 Z& Q% O
---------------------------------------------------------------------------------
& a, \- _% o' W2 _* z% ULinux OS 系统
/ h( `9 ]- q9 D; u1 ~0 p 文件说明:
2 C& w2 T- r* W) T' x5 Z Linux_tool/rtlbtmp: 应用程序,需客户提供平台的交叉编译工具链来生成# m7 B/ {% q E7 n6 ^& r( {
BT_Firmware/mp_rtlxxx_fw: 蓝牙芯片专用的 firmware
9 c9 ]" w; Q: @! H5 V% V8 a BT_Config/mp_rtlxxx_config 蓝牙芯片专用的 config
/ \" `/ ~1 g* ~* c. \: a Readme/Readmexxxx.txt: 本说明文档
% Y E3 l! G, [) X& Q User Guide/MP tool User guide for linuxxxx.pdf:mp tool 的命令集
4 U% ^/ a7 ~' `; b 下面是蓝牙芯片名称、rtlxxx_config、mp_rtlxxx_config 的名称表:& h, o2 p2 }- E4 v* L
-----------------------------------------------------------------------------------' ] Q6 t. C6 @: l/ X [3 x) ?
| 蓝牙芯片名称 | rtlxxx_config名称 | mp_rtlxxx_config名称 |7 g. j) e8 I7 a! n3 j! k i
|----------------------------------------------------------------------------------|
6 w4 J& y) H. \" s1 Q: F | RTL8703AS | rtl8703a_config | mp_rtl8703as_config |- O5 H b( z- @. H
| RTL8703BS | rtl8703b_config | mp_rtl8703bs_config |5 v' Y/ e9 @2 ^ b! X/ G! ] Y
| RTL8723AE | rtl8723a_config | mp_rtl8723a_config |
2 k( P) @, H# k+ d& p" \ | RTL8723AS | rtl8723a_config | mp_rtl8723as_config |
4 r! ^2 Z! J: a8 h4 P | RTL8723AU | rtl8723a_config | mp_rtl8723a_config |
! S+ a; K: |2 W% [- _0 P o | RTL8723BE | rtl8723b_config | mp_rtl8723b_config |
& h3 n9 J9 U6 G* ~( s | RTL8723BS | rtl8723b_config | mp_rtl8723bs_config |
$ W* r, G0 C8 [ m | RTL8723BU | rtl8723bu_config | mp_rtl8723bu_config |
. ^/ H6 X- {- }. o0 a- k/ \: x | RTL8723CS | rtl8723cs_xx_config | mp_rtl8703bs_config |" Q0 }8 R) x5 t
| RTL8723DS | rtl8723d_config | mp_rtl8723ds_config |# `+ }; `7 Y! w- ?. q
| RTL8723DU | rtl8723du_config | mp_rtl8723d_config |
5 r! o2 U! W- o; G. |& K3 a; ^/ B | RTL8761AT | rtl8761at_config | mp_rtl8761at_config |% Y; I" W2 U4 p: a8 I
| RTL8761ATV | rtl8761a_config | mp_rtl8761at_config |& u+ O/ P# ]2 Q1 a, R" m
| RTL8761AU | rtl8761a_config | mp_rtl8761a_config |
F) |( d0 V5 W% c: q$ o- C | RTL8761AW + 8192EU | rtl8761aw_config | mp_tl8761aw8192eu_config |; A$ Q7 @6 _6 Y- F! u
| RTL8761AU + 8192EE | rtl8761a_config | mp_rtl8761a_config |/ H) `* U' O+ o' _0 y4 O
| RTL8761AU + 8812AE | rtl8761a_config | mp_rtl8761a_config |
5 F$ B4 e. P% w8 Y8 y1 ~ | RTL8821AE | rtl8821a_config | mp_rtl8821a_config |4 f2 p, [ k% p0 ]/ s
| RTL8821AS | rtl8821a_config | mp_rtl8821a_config |4 L( j" A G n% U' P$ W$ m1 a
| RTL8821AU | rtl8821a_config | mp_rtl8821a_config |
, [% f3 r! r& d: ~' H | RTL8821CS | rtl8821c_config | mp_rtl8821c_config |' O. @! Y0 Y9 l- U- H" |- z/ M
| RTL8821CU | rtl8821cu_config | mp_rtl8821c_config |
: b! Q9 ~- |; y; r K | RTL8822BS | rtl8822b_config | mp_rtl8822b_config |* S( Y& t8 K( ~, ^: V
| RTL8822BU | rtl8822bu_config | mp_rtl8822b_config |
* n: y; q$ D$ Y5 m | RTL8761BU | rtl8761b_config | mp_rtl8761b_config |
: s) s3 ~: N8 D | RTL8761BT | rtl8761bt_config | mp_rtl8761bt_config |' \5 ^) D% {$ m
| RTL8822CU | rtl8822c_config | mp_rtl8822c_config |- P2 ?3 Y2 A- `
| RTL8822CS | rtl8822cs_config | mp_rtl8822cs_config |
( S$ d9 A4 f! s0 j9 \ -----------------------------------------------------------------------------------, M. ~# u2 i8 S$ Z2 w7 I
: D" E5 B3 _5 R
2.运行环境搭建1 v- n/ P2 D' n2 w0 R- m4 }3 x8 D8 l
Android OS 环境
! V! h5 r, m }" E' u将 tool 所需文件放到系统里) ~8 A1 M% e: _$ H3 ^5 l
将 rtlbtmp 文件放到 /system/bin/目录,并修改权限为 777;( S% S4 Q+ I3 k# X# G$ ]
adb push rtlbtmp /system/bin/
: K; ~# @4 K, v0 c3 D9 F: Uadb chmod 777 /system/bin/rtlbtmp
6 [) A$ R# u, k4 V2 p& H3 A将 btmp.default.so 文件放到 /system/lib/hw/目录,并修改权限为 644;1 `' f: t2 m' l8 ?
adb push btmp.default.so /system/lib/hw/
+ t" `5 X+ B- x6 |1 wadb chmod 644 /system/lib/hw/btmp.default.so
9 {" ?* q( P9 J% @6 L( e将 mp_rtlxxxx_config 文件放到 /system/etc/firmware/目录,并修改权限为 644;7 P! K$ ]0 U1 @& c* Y; V& ~4 O
adb push mp_rtlxxxx_config /system/etc/firmware/
: S* }3 z$ _' h$ \adb chmod 644 /system/etc/firmware/mp_rtlxxxx_config2 T/ b- }9 ^# w$ |: b5 ]3 g
将 mp_rtlxxxx_fw 文件放到 /system/etc/firmware/目录,并修改权限为 644;" R8 J) ~& X/ D5 n8 C
adb push mp_rtlxxxx_fw /system/etc/firmware/; Z7 i" |2 g3 e. @8 W. c; h( w
adb chmod 644 /system/etc/firmware/mp_rtlxxxx_fw
j r r# u! n0 n) P& x% Z! J: x3 l/ b4 |( _5 }2 @
7 F3 D# s! x1 C F7 q: w7 D" |
#Note: 从Android 8.0及以后的系统开始,以上文件都将放到/vendor/目录下面
0 O4 H/ Z' {" M将 rtlbtmp 文件放到 /vendor/bin/目录,并修改权限为 777;- D. e6 l, t1 V: L
cp rtlbtmp /vendor/bin/
, q9 u! o7 A- A6 a! zchmod 777 /vendor/bin/rtlbtmp8 N0 ~% y1 x6 } D- @/ k" p; k
将 btmp.default.so 文件放到/vendor/lib/hw/目录,并修改权限为 644;
& z$ E4 Z, R- c# ?$ d! s3 q+ ~7 l+ j$ m* kcp btmp.default.so /vendor/lib/hw/4 Q" u3 ~- `1 J) n/ n6 I
chmod 644 /vendor/lib/hw/btmp.default.so
; o" b' n, S# j5 A' q将 mp_rtlxxxx_config 文件放到 /vendor/firmware/目录,并修改权限为 644;
; C* o. g" F8 B4 gcp mp_rtlxxxx_config /vendor/firmware/
" R/ u. ~( W( B: ]3 A. {chmod 644 /system/vendor/firmware/mp_rtlxxxx_config
3 `8 b9 K) w; j; B' a4 ?3 F将 mp_rtlxxxx_fw 文件放到 /vendor/firmware/目录,并修改权限为 644;/ P2 K" m- m! } U2 D O) S0 s
cp mp_rtlxxxx_fw /vendor/firmware/8 ] Q1 N# i' |2 K$ j: ^' ~" q
chmod 644 /vendor/firmware/mp_rtlxxxx_fw0 p# f( f6 {6 I8 n& i7 B
以上文件建议放到 SDK 里,不会影响正常的蓝牙使用;
J" y$ r. A/ ?5 y1 X) B1 C" e# i 关闭 normal BT
; R1 x# s2 u" Q( z* W: Artlbtmp 使用的时候都需要先关闭 normal 的蓝牙,如果 UI 上不能关闭蓝牙,可以使用如下的方案:
/ m" F4 V0 o0 q2 e: sservice call bluetooth_manager 8(关) /6(开), i' ~+ O* E5 _5 a: Z
或者- m; [+ n: S( n/ v9 W* L
cd /system/lib/hw5 e/ b8 o4 m# d2 l" h; j
mv bluetooth.default.so bluetooth.default.so_ORG
( F, `. O6 t8 n(for android P 之后:是在 /system/lib/目录,mv libbluetooth.so libbluetooth.so_ORG)& ~5 e# a* L8 @) {4 r1 X; }
reboot
; g( i* q: w8 A1 R6 i$ E, j% c( ~ c5 M3 J& G
Linux OS 环境$ l$ n$ {# P/ L" |
将 tool 所需文件放到系统里/ [) Z. x9 q# K5 E
cp rtlbtmp /usr/sbin/
. S. ^* j0 ]& Y6 F' p. H6 ichmod 777 /usr/sbin/rtlbtmp
1 C W8 t) c( S! U3 jcp mp_rtlxxxx_config /lib/firmware/: y/ S2 o- l- T. g9 g" G
chmod 644 /lib/firmware/mp_rtlxxxx_config5 O; u7 N/ _( u3 p! F. ~
cp mp_rtlxxxx_fw /lib/firmware/
, I6 l' E) s! P# O5 bchmod 644 /lib/firmware/mp_rtlxxxx_fw
/ |9 a' u8 J; _$ ~% |5 U UART 接口芯片准备6 J% N; G8 b( o8 o; i$ ~+ [
请关闭 normal 蓝牙,即开机后默认不加载 rtk_hciattach 等流程; T' X2 B; x4 D/ W$ J0 i
USB 接口芯片准备
, R) |* Z8 A4 y1 }先打开 normal 蓝牙,再 hciconfig hci0 up$ B& c( |2 e6 P/ m. l( a
8 L9 G3 |* W E) Z3 C: b% _
8 N; ~& P% ^' w3.BT RF Performance Test & TX Power Calibration
% u# i4 R9 s& b' R" C参考User Guide, P8 D+ Q; ^2 L5 I9 `, F
#Note:8761B & 8822C 相比之前的IC比较特殊,参考单独的User Guide. q5 ]4 H# @3 ^' n
" M# z$ r. F/ A) D2 V; C$ w6 y& Z# c) w. D# |
一般就是要细化linux还是Android,对应其中kernle版本有对应的config、fw、btmp.default.so、rtlbtmt、rtlbtmt_clt、rtlbtmt_skt,一些疑问可沟通!6 w* t; m* ~4 H4 e; S
' b3 _8 `) U& F2 y2 N' u: i% U
S ^ J* l1 C) \9 c4 g/ E" h |
|