Buildingbest-in-classMiracast solutions with Windows 10
Version 1.1
April2017
Abstract
Miracast is a wireless display standard designed for mirroring screen content to an array of devices that collectively provide a great user experience. Quality Wi-Fi, graphics, composition, media encoders/decoders, and third party components are fundamental to this experience.
This document is intended to provide Wi-Fi IHVs, graphics IHVs, PC OEMs, and Miracast receiver manufacturers guidance to help ensure products designed for Miracast, deliver a best-in-class Windows10 experience.
Revision History
Revision 1.0
- Creation of document
Revision 1.1
- Addition of “Miracast over Infrastructure” guidance
Copyright
This document is provided "as-is." Information and views expressed in this document, including URL and other Internet Web site references, may change without notice.
Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.
This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.
© 2016 Microsoft. All rights reserved.
Please refer to Microsoft Trademarks for a list of trademarked products.
Intel is a registered trademark of Intel Corporation.
All other trademarks are property of their respective owners.
Table of Contents
Abstract
Revision History
Revision 1.0
Revision 1.1
Overview
Miracast in Windows 10
Understanding Windows Miracast functionality
Miracast receiver Connect app
PC manufacturers designing for Miracast
Wi-Fi devices
Graphics devices
Audio devices:
Hardware manufacturers (IHVs) designing for Miracast
Wi-Fi device features for Miracast
WDI driver testing for Miracast:
Supporting Miracast features:
Extended channel switch announcement (eCSA)
For IHVs creating Miracast Receivers
Miracast-specific features to support
Wi-Fi features
IP address allocation in EAPOL-key frames
Extended channel switch announcement (eCSA)
Updates to WPS information elements (IEs) for telemetry
Miracast over Infrastructure
Graphic features
Support for the hardware cursor
Media features
Diagnostic capabilities
Support for Intel friendly name
Support for Intel’s receiver device URL
Support for Intel’s receiver manufacturer logo
Support for Intel’s receiver manufacturer name
Support for Intel’s receiver model name
Support for Intel’s receiver version
Support for enhanced diagnostics
Support for source receiver version
Support IDR requests
Support for additional video formats.
Performance enhancements
End of frame marker
Adjusting the latency to provide a better experience in each scenario
Stream enhancements
Support for CABAC
Dynamically switch the resolution and frame rate
Extended functionality
UIBC support
Microsoft real time bitrate modulation
Technical details and validation
How to verify that you are running a WDI driver
IP address allocation in EAPOL-key frames technical details:
Extended channel switch announcement (eCSA) technical details
Updates to WPS Information Elements (IEs) for Telemetry Technical Details
Support for H/W Cursor Technical Details
Validating Window 10 Miracast Extensions
How to verify that a Miracast connection was established over Wi-Fi Direct vs. Infrastructure
References
Overview
Miracast is a wireless display standard designed for mirroring your screen to an array of devices. Quality Wi-Fi, Graphics, Composition, Media encoders/decoders and third party components are fundamental to this experience.
This document provides Wi-Fi IHVs, Graphics IHVs, PC OEMs and Miracast receiver manufacturers guidance to help ensure products designed for Miracast, deliver a ‘Best-in-Class’ Windows 10 experience.
Figure 1: Miracast Components
Miracast in Windows 10
Support for Miracast began in Windows 8.1, and since that time Windows investments in Miracast as a projection experience has increased. Windows 10 delivers the most notable features to date,including:
- A native connection experience that allows a user to find and connect to Miracast receivers.
- Implementation of the Miracast standard to interoperate with the broadest set of hardware.
- A native Miracast RTSP stack fine-tuned to work for Miracast, which means no additional software is required outside the Windows 10 OS.
- Support for UIBC (User Input Back Channel), so that a Miracast receiver can be used to control the Miracast source.
- Support for Miracast extensions that enable additional capabilities that dramatically improve the Miracast experience.
- High quality interaction with industry leading Microsoft Miracast receivers as well as leading 3rd party Miracast receivers.
- A soft receiver - Miracast receiver app (Connect) ships inbox in the Windows 10 Anniversary update on compatible devices.
- Support for the projection of Protected Content.
- The ability to remember a profile for reconnecting to Miracast receivers that are frequently used which reduces subsequent connection times.
Understanding Windows Miracastfunctionality
Windows 10 provides native functionality that fades into the background to provide a seamless Miracast experience.As you are building your solution it is important to understand what that functionality is.
First and foremost, Windows provides a native connection experience that allows a user to connect to a Miracast receiver. Once that connection is made the UI fades into the background.A Miracast connection can be made in several ways:
- Action Center.In the Action Center (Figure 2),click Connect.
- Connect UI.Select Windowslogo key+K(Figure 3).
- Device Picker UI. WindowsApps that support casting contain a device picker UI, such as the Cast to device feature inthe WindowsMovie & TVApp (Figure 4).
Figure 2: Connect Quick Action Figure 3: Connect UI Figure 4: Device Picker UI
And if there is a need to remove a previously paired deviceMiracast device:
- Removing Previously Paired Devices in Miracast: Go to Settings,click Devices,click Connected Devices, select the device to remove, and then click Remove device (Figure 5).
Figure 5: Removing a Miracast Sink from a Win10 Miracast source device
In addition to an integrated user experience Windows also provides the following Miracast functionality:
- A single extensible RTSP stack across all Windows devices.Smooth functionality with any Win10 device brings interoperability with hundreds of millions of Windows 10 Miracast senders and receivers.
- The ability to stream both clear and protected content (HDCP) if HDCP keys are present.
- UIBC (User Input Back Channel),which allows inputs from the Miracast receiver (touch, stylus, mouse, keyboard and gamepad) to control the Miracast sender, if—and only if—the user explicitly allows this.
- Several extensions from Intel and MSFT (4k AVC (H264), latency management, bitrate modulation, 3:2 support, and more). Miracast extensions allow additional functionality not otherwise found in the Miracast specification to be supported.
- Push button pairing, auto push button, and PIN based paring, the most common methods for pairing with a Miracast receiver.
- Persistent profiles, which remembers if you have connected to a given Miracast receiver in the past.This gives faster reconnections to the same Miracastreceiver.And if persistent profiles are not supported on the receiver,then Windows 10 adjusts to that situation as well.
- Automatically adjusts to its role during connection negotiation.Because Miracast uses a Wi-Fi Direct connection, Windows clients have the ability to assume one of several Wi-Fi Direct roles dynamically. It is important to note that while the Windows client will prefer to act as the Wi-Fi Direct GO (Intent 14) it is fully capable of acting as a GC or and Auto-GO as well.
- IP address assignment during the connection sequence,reducing the time to connect.
- Windows will reconnect quickly to previously pairedMiracast receivers. Reconnection time to well-designed Miracast sinks can take less than three seconds.
Miracast receiver Connect app
In the Windows 10 Anniversary Update, Microsoft released an app-based Miracast receiver feature. This ‘Connect app’ feature givesany Miracast Sender the abilityto connect and project to a device that is running Windows 10 Anniversary Update and which is capable of using Miracast.
To start the Connect app,select the Windows Logo key . Onthe application list,select the Connectapp. Windowsvalidates the ‘Sink’ devicesupports receiving a Miracast request. Once validated, Windows displays a Connection UIdialog similar to that of Figure 6.
Figure 6: Connect App
You can configure the Connect app to:
- Run on a lock screen.
- Require a PIN to allowpairing.
- Require a user to grant access prior to asource connection.
These settings are located in Projecting to this PC, found by selecting Settings, and then System.
Fig 7: Projecting to this PC settings
For more info about the Windows 10 Connect App guidelines, seethe Continuum for phones: FAQ.
Miracast over Infrastructure
In the Windows 10 Creators Update, Microsoft has extended the ability to send a Miracast stream over a local network rather than over a direct wireless link.
This offers a number of benefits:
- Windows automatically detects when sending the video stream over this path is applicable.
- Windows will only choose this route if the connection is over Ethernet or a secure Wi-Fi network.
- The user does not have to change how they connect to a Miracast receiver, they use the same UX as is shown in Figures 2-4.
- This requires no changes to current wireless drivers or hardware.
- This also works well with older wireless hardware that is not optimized for Miracast over Wi-Fi Direct.
- This solution leverages an existing connection which both reduces the time to connect and provides a very stable stream.
PC manufacturers designingfor Miracast
To design a best-in-class Microsoft Windows 10 Miracast experiencePC Manufacturers of desktops, laptops, tablets,and other form factorsthoughtfully selectWi-Fi and Graphics Devices. Consider the following when approving components:
Wi-Fidevices
Windows 10 can perform Miracast over both the 2.4Ghz and 5Ghz bands and works well with an 802.11n or 802.11ac capable Wi-Fi adapter.
Miracast streams data in real-time. Thoughtfully selecting a radio and antenna configuration vastly improvesthe performance of the Miracast experience.Typically, an 802.11ac radio usingthe 5Ghz band and a 2x2antennae configuration producesa higher quality Miracast experience than any 802.11n or 1x1 combination.
Ensurethat Wi-Fi adapter manufacturers provide drivers specifically designed for the Windows 10Wireless Driver Interface (WDI). Wireless drivers developed to the WDI framework are preciselydesigned for Miracast usage. These driversdemonstrate successfully higher connection rates and yield quality Miracast sessions.
Lastly, verify Wi-Fi manufacturerssuccessfully validated the following Windows Hardware Lab Kit (HLK) tests:
•Microsoft.Test.Networking.Wireless.WiFiDirect.BasicDiscoveryTests.*
•Microsoft.Test.Networking.Wireless.WiFiDirect.BasicPairingTests.*
•Microsoft.Test.Networking.Wireless.WiFiDirect.BasicReconnectTests.*
Details on the Microsoft Hardware Lab Kit (HLK) can be found on thedownload page for the HLK.
Graphicsdevices
The Microsoft Miracast stack functions upon WDDM 2.0 (Window’s Display Driver Model) and greater.WDDM 2.0 was introducedwith Windows 10.
Miracast Senders: A Miracast sender’s graphics device/driver must support a hardware accelerated AVC (H264) Encoder. Note:HDCP 2.0 or greater is required to project protected content from most major video streaming content providers.
Miracast Receivers: A Miracast receiver’sgraphic device/driver must support a hardware accelerated AVC (H264) Decoder. Note:HDCP 2.0 or greater is required to receive protected contentfrom most major video streaming content providers.
To design a best-in-class Microsoft Windows 10 Miracast sender/receiver the graphics device/driver should support hardware accelerated HEV encode and decode. This enables higher resolutions,for instance 4K, at higher bitratesusing less bandwidth than AVC.
Required
- WDDM 2.0
- Hardware accelerated AVC (H264) encoder (Miracast sender)
- Hardware accelerated AVC (H264) decoder (Miracast receiver)
Optional:
- HDCP 2.x transmit key (Miracast sender)
- HDCP 2.x Receive key (Miracast receiver)
- Hardware accelerated HEVC (H265) encoder (Miracast sender)
- Hardware accelerated HEVC (H265) decoder (Miracast receiver)
Audio devices:
At minimum, an audio device/driver should support LPCM. The Miracast specification lists optional audio codecs, AAC DD+. To maintain lower latency,Windows 10 only supports LPCM.
Note:Microsoft is evaluating additional audio codec support in future releases of Windows.
Hardwaremanufacturers (IHVs) designing for Miracast
To design a best-in-class Microsoft Windows 10 Miracast experience requires Device Manufacturers (IHVs) to adhere to high quality design and driver development standards.
Wi-Fi device features for Miracast
Guidance for Wi-FiDevice Manufacturers (IHVs) developing a Miracast solutionare listed as follows:
Declare capability support for each of these functions through WDI.
Wi-Fi Direct Device: Supported
Wi-Fi Direct GO : Supported
Wi-Fi Direct Client: Supported
P2P Device Discovery: Supported
Extended Channel Switch Announcement: Supported
Miracast Sink: Supported
P2P GO ports count: 1
P2P Clients Port Count: 1
WDI drivertesting for Miracast:
Wi-Fi Device Manufacturers should successfully validate the following Windows Hardware Lab Kit (HLK) tests:
•Microsoft.Test.Networking.Wireless.WiFiDirect.BasicDiscoveryTests.*
•Microsoft.Test.Networking.Wireless.WiFiDirect.BasicPairingTests.*
•Microsoft.Test.Networking.Wireless.WiFiDirect.BasicReconnectTests.*
Supporting Miracast features:
There are specific Miracast features that Wi-Fi Device Manufacturers should support to achieve a best-in-class Microsoft Windows 10 Miracast experience.
Extendedchannel switch announcement (eCSA)
In almost all cases where a Windows 10 device connects to a Miracast receiver it is also simultaneously connected to a Wi-Fi access point for Internet connectivity. In many cases like this the receiver and the Wi-Fi access point will be on different wireless channels.This type of multi-channel mode typically causes video quality to degrade,because the wireless device must continually switch between channels to maintain simultaneous connectivity to both endpoints.
In several cases like this, a Windows client can determine a multi-channel condition and can use eCSA to transform from Multi-Channel to Single Channel conditions.
For IHVs creating Miracast Receivers
There are a number of items that any Miracast receiver maker should take into consideration:
•Support persistent profiles:Windows supports and prefers Invitation on any subsequent reconnections to a Miracast receiver. If, however, the receiver does not support Invitation and returns a proper status(8 - Fail; Unknown P2P Group) then Windows10 will retry with a new pairing on each connection attempt.
•If you plan to implement UIBC on a Miracast receiver, disable theNagle algorithm, as it queues frames before sending.Queueing cursor and keyboard frames results in a poor experience.These type of packets should be sent as quickly as possible without queueing.
•During the establishment of the RTSP session,keep TCP retry intervals very low.Performing exponential back off early in the cycle results in long connect times if a single message has to be retransmitted.
•If the Miracast receiver is acting as a GO, a peer may attempt to reconnect to you.In this case you will receive an association request directly from that peer.If you no longer have a profile for that peer, fail the association with an association response frame which includes a P2P IE with status (8 - Fail; Unknown P2P Group).Windows 10 will retry the connection with a new pairing attempt.
Miracast-specific features to support
As part of controlling the Miracast source implementation, we’ve added support for several extensions that improve the overall experience. IHV and OEMs building a Miracast receiver should consider supporting the follow features and extensions for the best Miracast experience.
Wi-Fi features
IP addressallocation inEAPOL-keyframes
Implementing IP addressing allocation in EAPOL-key reduces the amount of time taken to connect by including the IP address that the remote client should use in the Wi-Fi Direct exchange itself.The client connects more quickly by skipping the need to perform DHCP address assignment after the connection is established.
Extendedchannel switch announcement (eCSA)
In almost all cases where a Windows 10 device connects to a Miracast receiver it is also simultaneously connected to a Wi-Fi access point for Internet connectivity. In many cases like this the receiver and the Wi-Fi access point are on different wireless channels.This type of multi-channel mode typically causes video quality to degrade since the wireless device must continually switch between channels to maintain simultaneous connectivity to both endpoints.
Windows client can sometimes determine a multi-channel condition and can use eCSA to transform from Multi-Channel to Single Channel conditions.
Updates to WPS information elements (IEs) for telemetry
Windows captures the success of Miracast connections across the hundreds of Miracast receivers that are in the market.By setting a few simple fields Windows can identify the type of device Windows clients are connecting to.This allows us to reach out to you as a hardware partner if we notice that there is an incompatibility or sudden loss of quality.
Miracast over Infrastructure
With the Creators Update Windows has updated to support Miracast over Infrastructure on Windows devices running the Creators Update including Windows, Surface Hub and Xbox. We recommend that Miracast sink manufacturers follow the guidelines that are defined in the MS-MICE document to implement similar sink side functionality.
Graphic features
Support for the hardwarecursor
Movement of the mouse cursor significantly impacts the perceived end to end (E2E) latency of the Miracast session. E2E latency is how long it takes a user to move the mouse until that movement is rendered on the Miracast display. Before hardware cursor, the mouse was a part of the encoded video stream, meaning it has the same E2E latency as the Miracast stream. Typically, this was over 100ms. Hardware cursor adds the ability to send the mouse image as well as the coordinates to the sink, where the receiver can render them over the Miracast stream. Sending the mouse data out of band from the Miracast streams allows the mouse latency to drop to sub 30ms.
Media features
Microsoft’s Miracast RTSP stack is extended to provide useful information while diagnosing Miracast failures, extended functionality, and better stream quality & E2E latency.