AVDTP(AUDIO/VIDEODISTRIBUTION TRANSPORT PROTOCOL)是用来描述音频/视频在蓝牙设备间的传输的协议,是A2DP协议的基础协议,其在协议栈中的位置如下:
AVDTP协议建立在connection-oriented L2CAP channel上,只能支持point-to-pointsignaling。
一个典型的Stream End-pointDiscovery to Stream Release过程:State Machine如下共有5个状态:
一些主要的procedure如下:
Stream End Point Discovery:远端设备提供支持的SEP列表和mediaType。
Get All Capabilities:Using the SEID as a reference, the local device can querythe service capabilities of the remote SEP。
Stream Configuration:By referencing both the local and the remote SEID, thelocal device (the INT) configures the SEP of the remote device (the ACP)。
Stream Get Configuration:etrieve the last capabilities settingsperformed by the remote device on the SEP。
Stream Establishment:The opening of a transport session, while referencingthe remote SEID, includes, if necessary, the establishment of a new TransportChannel。
Stream Start:After the Stream Establishment is complete, the Start Streamingprocedure 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 sentindicating
thata stream end-point be closed.
Stream Suspend:挂起。
Stream Reconfigure:对Stream进行配置。
StreamReconfigure:再次配置。
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 synchronizedaudio/video playback。
参数定义如下:
Reporting packet格式如下:
注意:如果不使用multiplexing mode ,一个PDU包含一个meida或者reporting或者recovery packet
每个transport session 使用不同的L2CAPChannel。如果使用MultiplexingService,则一个transport channel上可能有好几种transport transport,需要AL header 来进行区分。
4.signaling message
一个SignalFragmentation的实例:
Signal command and response headers:
参数Packet Type:
参数Message Type:
原文;https://mp.weixin.qq.com/s/-7i-Feo7tpjbgCdiqPzo7Q