2.2 Message Syntax
In the structures defined in this section, multi-byte field values are ordered in big-endian format, unless specified otherwise, and string values do not include NUL terminators.
This section defines the messages used for starting and stopping Miracast over Infrastructure sessions. This is the general format for Miracast messages.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Size |
Version |
Command |
|||||||||||||||||||||||||||||
TLVArray (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
Size (2 bytes): The size of the message, in bytes.
Version (1 byte): The version of this protocol, which is 0x01.
Command (1 byte): The type of message, which determines the TLVs passed in the TLVArray field. The following messages are defined in the sections listed.
-
Message type
Section
Description
SOURCE_READY
0x01
Indicates the Miracast Source is ready to accept a connection on the RTSP port.
STOP_PROJECTION
0x02
Indicates the end of the projection.
SECURITY_HANDSHAKE
0x03
Used to exchange DTLS handshake messages to initiate a connection with encryption of the multimedia stream.
SESSION_REQUEST
0x04
Indicates the Miracast Source intends to connect to the Sink using the specified options.
PIN_CHALLENGE
0x05
Sent by the Miracast Source to initiate the session using the PIN displayed by the Miracast Sink.
PIN_RESPONSE
0x06
Sent by the Miracast Sink in response to a PIN_CHALLENGE received from the Miracast Source.
TLVArray (variable): An array of one or more Miracast TLVs (section 2.2.7), which specify information for the message.