AVCTP Audio Video Control Transport Protocol
AVCTP Audio Video Control Transport Protocol
AUDIO/VIDEO CONTROL
TRANSPORT PROTOCOL SPECIFICATION
Abstract
This specification describes the Audio/Video Control Transport
Protocol (AVCTP), which is used to transport command and response
messages for controlling Audio Video features in conformant devices.
This protocol enables a device to support more than one control
profile at the same time; each supported profile shall define its own
message formatting and/or usage rules.
BLUETOOTH SPECIFICATION Page 7 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)
1 Introduction
1.1 Purpose
The Bluetooth® Audio/Video Control Transport Protocol specification, hereafter referred
to as AVCTP, describes the transport mechanisms used to exchange messages for
controlling Audio and/or Video devices. The actual message contents are defined in the
applicable A/V control profiles.
1.2 Scope
AVCTP is used to transport the command/response messages exchanged for the
control of distant A/V devices over point-to-point connections. AVCTP does not describe
the format and coding of the command and/or response frames used to control an A/V
device; command and/or response format and coding rules are specified by the related
control profiles.
The AVCTP transaction model is defined in Section 3, AVCTP Generic Transaction
Model.
1.3 Definitions
1.3.1 Forbidden
This bit field combination is not allowed in the specification. The receiver shall check
that this bit field combination is not used.
1.3.2 RFA
Reserved for Future Additions. Bits with this designation shall be set to zero. Receivers
shall ignore these bits.
1.3.3 RFD
Reserved for Future Definition. These bit value combinations or bit values are not
allowed in the current specification but may be used in future versions. The receiver
shall check that unsupported bit value combination is not used.
2 Overview
This section describes operations between devices and operations between layers.
Audio/Video Application
A/V Protocols
S
D AVCTP
P
CO CL
LMP
L2CAP
ACL
Baseband
Controller Target
Command
Response
7 6 5 4 3 2 1 0
Transaction label Packet_type (00) C/R IPID Octet 0
Octet 1
Profile Identifier (PID)
Octet 2
Octet 3
AVCTP Command/Response Message Information :
Octet n+3
Table 6.1: Not-Fragmented AVCTP Packet Format
The Transaction label field (octet 0, bits 7-4) value is provided by the application.
The Packet_type field (octet 0, bits 3 and 2) is set to zero (00) to indicate that the
command/response message is transmitted in a single L2CAP packet.
C/R (octet 0, bit 1) indicates whether the message conveys a command frame (0) or a
response frame (1). It is provided by the application.
The IPID bit (octet 0, bit 0) is set in a response message to indicate an invalid profile
identifier received in the command message of the same transaction; otherwise this bit
is set to zero. In command messages this bit is set to zero.
The Profile Identifier (PID) field indicates that the command/response frame is coded
according to the rules defined by the identified profile. The value shall be identical to the
16-bits UUID of the service class defined for this profile in the Bluetooth Assigned
Numbers document [2].
Figure 6.1 depicts the encapsulation process for Command/Response messages that fit
the MTU requirements for transport in a single L2CAP packet.
BLUETOOTH SPECIFICATION Page 16 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)
Invalid
Profile
Identifier Profile
Transaction
(response Identifier AVCTP Message Information
label
only)
C/R
(single packet=00)
TL PT PID
3 <= MTU - 3
The continue packet type is used for all subsequent packets that are not the last
packet in the sequence.
The end packet type qualifies the last packet in the sequence.
At the receiving side the AVCTP entity reassembles the complete message by
identifying packets that belong to the same transaction and by inspecting the type of
each packet.
The L2CAP channel guarantees individual AVCTP packet integrity and delivery in the
right order, not the integrity of the entire message. As the channel can be unreliable,
some AVCTP packets in the sequence can be lost. As the start packet provides the
number of AVCTP packets needed to reassemble the complete message, the AVCTP
receiving entities shall implement a consistency check and discard any incomplete
message.
When an application has a packet to send on a certain AVCTP connection, AVCTP
must not begin sending it before it has finished processing a message it is in the middle
of sending on that AVCTP connection whether or not it is on a different PID or
transaction label. The interleaving of different packet fragments on the same AVCTP
connection is not allowed.
The receiver of a fragmented message may allocate the resources for message
reassembly based on the start packet length and the number of packets information
elements provided by the first packet. For this reason:
The payload of the L2CAP packets that encapsulate the start and continue packets
of a fragmented AVCTP message shall have the same length.
The payload of the L2CAP packet that encapsulates the end packet of an AVCTP
message shall not be larger than the start and continue packets belonging to the
same message.
The following tables describe the detailed format for each AVCTP packet type used in
fragmented messages.
7 6 5 4 3 2 1 0
Transaction label Packet_type (01) C/R IPID Octet 0
7 6 5 4 3 2 1 0
Transaction label Packet_type (10) C/R RFA Octet 0
Octet 1
AVCTP Command/Response Message Information
:
(AVCTP continue packet)
Octet n+1
Table 6.3: Fragmented AVCTP Message Packet: Continue Packet
7 6 5 4 3 2 1 0
Transaction label Packet_type (11) C/R RFA Octet 0
Octet 1
AVCTP Command/Response Message Information
:
(AVCTP end packet)
Octet n+1
Table 6.4: Fragmented AVCTP Message Packet: End Packet
The Transaction label field (octet 0, bits 7-4) value is provided by the application and is
replicated by the sender of the message in each packet of the sequence. It is used at
the receiver side to identify packets that belong to the same message.
The Packet_ type (octet 0, bits 3 and 2) field qualifies the AVCTP packet as a start
(01), continue (10), or end (11) packet.
C/R (octet 0, bit 1) indicates whether the message conveys a command frame (0) or a
response frame (1). This field is provided by the application and is present in each
packet of the message.
The IPID bit (octet 0, bit 0) is set in a response message to indicate an invalid Profile
Identifier received in the command message of the same transaction; otherwise this bit
is set to zero. In command messages this bit is set to zero. This field is only present in
the start packet of the message.
The Number of AVCTP Packets is present in every start packet (octet 2) to indicate
the total number of AVCTP packets that belong to the same message. As the start
packet is also counted, this value is always greater than 1.
The RFA field (octet 0, bit 0) replaces the IPID field in continue or end packets. It is
reserved for future additions and shall be set to zero (0).
The Profile Identifier (PID) field indicates that the message information part is coded
according to the rules defined by the identified profile. The value shall be identical to the
16-bits UUID of the service class defined for this profile in the Bluetooth Assigned
Numbers document [2]. This field is only present in the start packet of the message.
The next figure depicts the encapsulation process for Command/Response messages
that do not fit within the MTU requirements for transport in a single L2CAP packet.
BLUETOOTH SPECIFICATION Page 19 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)
Invalid
Profile
C/R Identifier
(response
Transaction only)
label AVCTP Message Information
Profile
Identifier
(start packet=01)
TL PT NoP PID
4 <= MTU-4
TL PT
1 <= MTU-1
TL PT
8 References
[1] Bluetooth SIG, Specification of the Bluetooth System, Core, Version 2.0 or later
[2] Bluetooth Assigned Numbers, Bluetooth SIG member web site
BLUETOOTH SPECIFICATION Page 25 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)
Input Parameters:
Event Type: uint Size: 2 octets
Value Description
0x0000 Forbidden
0x0001 AVCT_Connect_Ind
0x0002 AVCT_Connect_Cfm
0x0003 AVCT_Disconnect_Ind
0x0004 AVCT_Disconnect_Cfm
0x0005 AVCT_MessageRec_Ind
Other RFD (Reserved for Future Definition)
Event definitions:
AVCT_Connect_Ind: This event is sent by an AVCTP entity to the local application
when a L2CAP connection (re)attempt is made by a remote device and no channel
connection exists between both entities.
AVCT_Connect_Cfm: This event is sent by an AVCTP entity to the local application
when the requested channel connection is made available for the application.
AVCT_Disconnect_Ind: This event is sent by an AVCTP entity to the local
application when the signaling channel between peer AVCTP entities becomes
unavailable on request of the remote side.
AVCT_Disconnect_Cfm: This event is sent by an AVCTP entity to the local
application when the when the requested channel disconnection procedure is
complete.
AVCT_MessageRec_Ind: This event is sent by an AVCTP entity to the local
application to signal a received message from a distant device. At registration time
an application indicates the profile ID to be considered by AVCTP to identify the
message handler to be called back. An AVCTP implementation shall support
registration of at least one profile ID; only one registration is allowed per profile ID.
Output Parameters:
Result Type: uint Size: 2 octets
Value Description
0x0000 Event successfully registered
0x0001 Event registration failed
Other RFD (Reserved for Future Definition)
Callback Input Parameters:
BD_ADDR Type: uint Size: 6 octets
Value Description
0xXXXXXXXXXXXX Unique Bluetooth address of the signaling remote device
Output Parameters:
RSP Type: uint Size: 2 octets
Value Description
0x0000 Request accepted
0x0001-0xFFFF Request rejected (value is implementation dependent)
Description:
This AVCTP primitive is used to acknowledge an AVCT_Connect_Ind event received
from the AVCTP local entity.
Input Parameters:
BD_ADDR Type: uint Size: 6 octets
Value Description
0xXXXXXXXXXXXX Unique Bluetooth address of the distant device
BLUETOOTH SPECIFICATION Page 30 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)
Output Parameters:
Config Result Type: uint Size: 2 octets
Value Description
0xXXXX L2CAP ConfigureResponse Result (See [1])
Description:
This AVCTP primitive is used to request the disconnection of an existing channel
between the local entity and a peer device. The profile of the calling application is de-
registered locally. If there is no more registered profile locally AVCTP shall release the
L2CAP channel connection.
Input Parameters:
BD_ADDR Type: uint Size: 6 octets
Value Description
0xXXXXXXXXXXXX Unique Bluetooth address of the distant device
Output Parameters:
RSP Type: uint Size: 2 octets
Value Description
0x0000 Request accepted
0x0001-0xFFFF Request rejected (value is implementation dependent)
11.2.4 SEND_MESSAGE
Service Input Parameters Output Parameters
BLUETOOTH SPECIFICATION Page 31 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)
Description:
This AVCTP primitive is used by the local application to a send a next message to a
peer entity. Only valid messages are transferred by the service to the peer entity.
Input Parameters:
BD_ADDR Type: uint Size: 6 octets
Value Description
0xXXXXXXXXXXXX Unique Bluetooth address of the distant device
Output Parameters:
Result Type: uint Size: 2 octets
Value Description
0x0000 Request accepted
0x0001-0xFFFF Request rejected (value is implementation dependent)
BLUETOOTH SPECIFICATION Page 32 of 33
Audio/Video Control Transport Protocol Specification (AVCTP)