Bluetooth A2DP HCI 封包分析之channel 的建立

抓取Android TV 与蓝牙音箱之间重连过程中的HCI 封包,分析连接建立阶段所需要的重要channel:

1.    ACL DATA channel creation:

(1) Create a ACL data channel with remote peer device, creation request packet as below, sent via HCICOMMAND packet.

Bluetooth A2DP HCI 封包分析之channel 的建立

(2) Creation success with a HANDLE ID (0x004b), which represents the ACL connection for data channel.

Bluetooth A2DP HCI 封包分析之channel 的建立

2.    AVDTPSIGNAL channel creation:

(1)  Upper layer request to create an AVDTP signal channel via L2CAP signaling channel, CID: 0x0001, Which is also a ACL data packet for HCI, using the Connection Handle: 0x004b. This signal channel is used to send and receive AVDTP signal (Discover, GetAllCapabilities,SetConfiguration, Open, Start, Suspend, Reconfiguration, Close). Also with the PSM: AVDTP and Service: Audio Sink, to indicate the channel usage.

Bluetooth A2DP HCI 封包分析之channel 的建立

(2)   Received the Connection success packet, with the Channel ID: 0x005a. So now a signal channel is created between peered two devices, and each device bounded a Channel ID(CID),Source side:  0x0043 <-> Sink side: 0x005a.

Bluetooth A2DP HCI 封包分析之channel 的建立

(3) A Discover command is sent via the signal channel which is created on above step, thedestination CID is 0x5a, which represents the Sink side.

 Bluetooth A2DP HCI 封包分析之channel 的建立

3.    AVDTP DATA channel creation:

(1) Upper layer request to create an AVDTP data channel via L2CAP signaling channel, CID:0x0001, Which is also a ACL data packet for HCI, using the Connection Handle:0x004b. This data channel is used to send and receive AVDTP media data packet.Also with the PSM: AVDTP and Service: Audio Sink to indicate the usage.

Bluetooth A2DP HCI 封包分析之channel 的建立

(2) Received the Connection success packet, with the Channel ID: 0x005b. So now a media data channel is created between peered two devices, and each device bounded a Channel ID(CID), Source side: 0x0044 <-> Sink side: 0x005b.

Bluetooth A2DP HCI 封包分析之channel 的建立

(3) A typical media data packet is sent via the data channel which is created on above step. The destination CID is 0x005b.

Bluetooth A2DP HCI 封包分析之channel 的建立

4.    AVRCP channel creation:

(1) Remote device send request to create an AVRCP channel via L2CAP signaling channel,CID: 0x0001, Which is also an ACL data packet for HCI, using the Connection Handle: 0x004b. This channel is used to send and receive remote control packet.Also with the PSM: AVCTP-Control and Service: Audio Sink to indicate the usage.

Bluetooth A2DP HCI 封包分析之channel 的建立

(2) Received the Connection success packet, with the Channel ID: 0x005c. So now a remote control data channel is created between peered two devices, and each device bounded a Channel ID(CID),

Source side:  0x0045 <-> Sink side: 0x005c.

Bluetooth A2DP HCI 封包分析之channel 的建立

 

(3) A typical remote control data packet is send via AVRCP channel which is created on above step,The destination CID is 0x0045, which is the Audio Source side

Bluetooth A2DP HCI 封包分析之channel 的建立