您的位置:首页 > 产品设计 > UI/UE

蓝牙驱动及Bluez使用流程分析

2010-02-05 14:52 162 查看
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"/@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
line-height:12.0pt;
mso-pagination:none;
text-autospace:none;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
mso-fareast-language:EN-US;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->

蓝牙驱动及Bluez使用流程分析

<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"/@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
line-height:12.0pt;
mso-pagination:none;
text-autospace:none;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
mso-fareast-language:EN-US;}
p.MsoToc1, li.MsoToc1, div.MsoToc1
{mso-style-update:auto;
mso-style-noshow:yes;
mso-style-next:正文;
margin-top:6.0pt;
margin-right:0cm;
margin-bottom:6.0pt;
margin-left:0cm;
line-height:12.0pt;
mso-pagination:none;
text-autospace:none;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
text-transform:uppercase;
mso-fareast-language:EN-US;
font-weight:bold;}
p.MsoToc2, li.MsoToc2, div.MsoToc2
{mso-style-update:auto;
mso-style-noshow:yes;
mso-style-next:正文;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:10.0pt;
margin-bottom:.0001pt;
line-height:12.0pt;
mso-pagination:none;
text-autospace:none;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
font-variant:small-caps;
mso-fareast-language:EN-US;}
p.MsoToc3, li.MsoToc3, div.MsoToc3
{mso-style-update:auto;
mso-style-noshow:yes;
mso-style-next:正文;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:20.0pt;
margin-bottom:.0001pt;
line-height:12.0pt;
mso-pagination:none;
text-autospace:none;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
mso-fareast-language:EN-US;
font-style:italic;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
{mso-style-next:正文;
margin:0cm;
margin-bottom:.0001pt;
text-align:center;
mso-pagination:none;
text-autospace:none;
font-size:18.0pt;
font-family:Arial;
mso-fareast-font-family:宋体;
mso-bidi-font-family:"Times New Roman";
mso-fareast-language:EN-US;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->

目录

1.

Abstract
..

4

2.

Introduction
..

4

3.

蓝牙驱动介绍

....

4

3.1

串口驱动介绍

...

5

3.2

初始化

...

5

3.2.1

模块上电

...

5

3.2.2

PSKEY
的设置

...

6

3.3

Hciattach
的工作原理

...

7

3.3.1

Hci_uar


bcsp
层的加入

...

9

3.3.2

hci
层的加入

...

10

3.3.3

hci_attach
的内核处理

...

11

4.

数据在驱动的传递流程

....

13

4.1

Uart
层的数据接收

...

13

4.2

Hci_uart
的数据接收

...

14

4.3

Bcsp
层的处理

...

15

4.4

Hci
层及以上的处理

...

15

4.5

数据流程的总结

...

17

5.

扫描过程的分析

....

18

5.1

用户使用例子

...

18

5.2



hcitool
扫描时的逻辑

...

18

5.2.1

上层逻辑

...

18

5.2.2

内核层逻辑

...

19

5.3

通过

dbus
触发的逻辑

...

21

5.3.1

上层逻辑之

adapter
dbus
方法的建立

...

21

5.3.2

上层扫描方法的调用

...

22

5.3.3

Dbus
触发的扫描对应于内核层的处理

...

25

5.3.4

上层的扫描数据收集

...

26

5.3.5

Hci_send_frame
的讨论

...

28

6.

A2DP
的使用过程

....

28

6.1

如何使用

...

28

6.2

服务的激活

...

29

6.3

设备的创建

...

30

6.3.1
.

33

6.3.2
.

33

6.3.3
.

33

6.3.4
.

33

6.4

设备的连接

...

33

6.4.1

L2cap
的连接

...

34

6.4.2

AVDTP_DISCOVER
的发送逻辑

...

35

6.4.3

AVDTP_GET_CAPABILITIES
命令的发送

...

36

6.4.4

AVDTP_SET_CONFIGURATION
的逻辑

...

37

6.4.5

AVDTP_OPEN
函数逻辑

...

38

6.4.6

AVDTP_START
的逻辑

...

40

7.

handsfree
的使用过程

....

42

7.1

使用流程

...

42

7.2

Headset
的连接

...

42

7.3

Sco
的打开

...

45

7.4

数据的流动

...

46

8.

总结

....

46

9.

未讨论

....

46

主要分成几个部分
:

Bluez
驱动整体框架,

数据在驱动的传递流程,

A2dp
的上层逻辑,

Handsfree
的上层逻辑

主要软硬件配置如下:

内核:
2.6.21

硬件:
pxa310

蓝牙芯片:
CSR BC4

BlueZ:3.22

文档实在是太长,而且图很多,不想一个个上传,
请去http://download.csdn.net/source/2049340下载
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: