首页 > 其他 > 详细

ZT 蓝牙的AVDTP协议笔记

时间:2014-01-28 21:06:34      阅读:575      评论:0      收藏:0      [点我收藏+]
个人资料
bubuko.com,布布扣bubuko.com,布布扣
Tifnan

加好友 发纸条

写留言 加关注

  • 博客等级:bubuko.com,布布扣bubuko.com,布布扣
  • 博客积分:1267
正文 字体大小:

蓝牙的AVDTP协议笔记

bubuko.com,布布扣 (2013-07-30 17:28:00)
标签:

avdtp

bluetooth

command

stream

sep

分类: Bluetooth
1.概述
   AVDTP(AUDIO/VIDEO DISTRIBUTION TRANSPORT PROTOCOL)是用来描述音频/视频在蓝牙设备间的传输的协议,是A2DP协议的基础协议,其在协议栈中的位置如下:
bubuko.com,布布扣
AVDTP协议建立在connection-oriented L2CAP channel上,只能支持point-to-point signaling。
 
2.一些术语
Stream:represents the logical end-to-end connection of streaming media data (audio or video) between two A/V devices.
Media Packets, Recovery Packets, and Reporting Packets:根据三种不同的数据类型,有这三种数据包。其中,Basic Service会用到Basic service,Report service会用到Reporting Packets,Recovery service会用到Recovery Packets,此外Multiplexing service会用到Media Packets和其余一种或两种Packet。
Stream End Point (SEP):应用程序通过这个接口提供Transport Services and AV capabilities来建立Stream。【是否可以参考网络编程中的端口号??】
Stream Context (SC):两端设备都有的关于Stream的信息。
Stream Handle (SH):主要是暴露给用于程序使用的。【可理解为文件操作的handle吧??】
Stream End Point Identifier (SEID):标识Stream End Point的。
Transport Session:一条stream可以分解为多个transport sessions,每个transport session对应一个AVDTP的packet category ,which means Media, Recovery, or Reporting packets。 
Transport Session Identifier (TSID):标识Transport Session。
Transport Channel:通常和一个L2CAP Channel对应。不用AVDTP Multiplexing Mode时,一条Transport  Channel只传输一个transport session;用transport session的情况下,一条Transport  Channel可以传输多个transport session(media,report或者recovery)。
Transport Channel Identifier (TCID):标识Transport Channel,唯一关联一条L2CAP channel。
 
3.Signaling Procedures
    一个典型的Stream End-point Discovery to Stream Release过程:
bubuko.com,布布扣
State Machine如下,共有5个状态:
bubuko.com,布布扣
一些主要的procedure如下:
Stream End Point Discovery:远端设备提供支持的SEP列表和media Type。
Get All Capabilities:Using the SEID as a reference, the local device can query the service capabilities of the remote SEP。
Stream Configuration:By referencing both the local and the remote SEID, the local device (the INT) configures the SEP of the remote device (the ACP)。
Stream Get Configuration:etrieve the last capabilities settings performed by the remote device on the SEP。
Stream Establishment:The opening of a transport session, while referencing the remote SEID, includes, if necessary, the establishment of a new Transport Channel。
Stream Start:After the Stream Establishment is complete, the Start Streaming procedure causes the streaming to start; i.e., Media (Reporting, Recovery) packets can be exchanged。
Stream Release:initiated by the upper layer within a device; a signal is sent indicating
that a stream end-point be closed.
Stream Suspend:挂起。
Stream Reconfigure:对Stream进行配置。
Stream Reconfigure:再次配置。
Security Control:对AV data transmitted over a Bluetooth 提供protection。
Abort:用于两个设备的同步。
General Reject:对包含invalid Signal Identifier的Command进行的response。
Delay Reporting:provide an initial delay report required for synchronized audio/video playback。
 
4.Transport Procedures
    分为三种Service:Basic Service,Reporting Service,Recovery Service和Multiplexing Service。
Basic Service只提供signaling 和media streaming。Media Packet Format如下图:
bubuko.com,布布扣
参数定义如下:
bubuko.com,布布扣

bubuko.com,布布扣
Reporting packet格式如下:
bubuko.com,布布扣

注意:如果不使用multiplexing mode ,一个PDU包含一个meida或者reporting或者recovery packet
每个transport session 使用不同的L2CAP Channel。如果使用Multiplexing Service,则一个transport channel上可能有好几种transport transport,需要AL header 来进行区分。
bubuko.com,布布扣
4.signaling message
一个Signal Fragmentation的实例:
bubuko.com,布布扣
Signal command and response headers:
bubuko.com,布布扣
参数Packet Type:
bubuko.com,布布扣
参数Message Type:
bubuko.com,布布扣
 
 

0

阅读(325) 评论 (0) 收藏(0) 转载(0) 喜欢 打印举报
已投稿到:

ZT 蓝牙的AVDTP协议笔记

原文:http://www.cnblogs.com/jeanschen/p/3535671.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!