Return to site

How to improve Miracast compatibility and stability

This article describes the common Miracast issues and causes, and gives some solutions to these problems.

What is Miracast

    Miracast is a standard for wireless connections from devices (such as laptops, tablets, or smartphones) to displays (such as TVs, monitors or projectors), introduced in 2012. It can roughly be described as "HDMI over Wi-Fi", replacing the cable from the device to the display.

  The Wi-Fi Alliance launched the Miracast certification program at the end of 2012. Devices that are Miracast-certified can communicate with each other, regardless of manufacturer. Adapters became available that plug into HDMI or USB ports, allowing devices without built-in Miracast support to connect via Miracast.

   Miracast employs the peer-to-peer Wi-Fi Direct standard. It allows sending up to 1080p HD video (H.264 codec) and 5.1 surround sound (AAC and AC3 are optional codecs, mandated codec is linear pulse-code modulation – 16 bits 48 kHz 2 channels). The connection is created via WPS and therefore is secured with WPA2. IPv4 is used on the Internet layer. On the transport layer, TCP or UDP are used. On the application layer, the stream is initiated and controlled via RTSP, RTP for the data transfer.

Miracast Usage Status

Because the WIFI-P2P protocol used by Miracast is used, it is not necessary to switch the existing WIFI usage mode of the device. It is convenient to use. So the current Android phones basically support Miracast Source. There are also many TV Box and TV. Already supported by Miracast Sink.

But there are still the following problems:
1. The Android phone manufacturer's naming of Miracast Source is not standardized. When users use it, they don't know where to find this function.http://www.wirelessdisplay.cn/blog/how-to-use-miracast
2. When using Miracast SINK, TV Box and TV basically need to switch WIFI mode, such as need to cut off WIFI link or hotspot mode, which improves the user's learning and use cost.
3. The current existence of Miracast SINK is relatively poor, which is reflected in: the phone can not connect / the phone connection time is very long, etc.

4. The stability of the currently existing Miracast SINK is relatively poor, which is reflected in: after several uses, it will not be connected again / it will be broken after a long time connection, etc.
5. The current existence of Miracast SINK is relatively poor, reflected in: audio and video will be stuck or mosaic / picture is not clear / picture delay is relatively large

Why are These Problems Caused?

As shown in the figure, Miracast from the bottom to the top, mainly has the following parts: WIFI-P2P/RTSP/RTP/HDCP/VIDEO-AUDIO, Miracast SINK, the above problems are basically caused by improper handling of these parts.

1. WIFI-P2P involves wireless network card driver and WIFI-P2P protocol stack processing. If not handled properly, it will affect Miracast compatibility.
2. RTSP involves signaling negotiation. The clarity of the picture is negotiated in this part. If it is not handled properly, it will affect the audio and video effects of Miracast.
3. RTP involves network transmission. If it is not handled properly, it will cause picture jam and mosaic.
4. HDCP is an encryption protocol and also involves the purchase of keys. If this part is not processed, the audio and video streams of some mobile phones cannot be parsed, such as SONY.
5. VIDEO-AUDIO processing is mainly decoding, if not handled properly, it will affect the CPU usage is too high, mosaic, etc.

How to Solve These Problems

1. Solve the problem of WIFI-P2P
When we developed the BJ60/BJ62/BJ4000, we tested about 40 wireless network cards. The test standards include WIFI Princess mode support/compatibility with mainstream mobile phones/network conditions of each working mode (bandwidth/loss rate/jitter/ Delay, etc.), finally selected 5 network cards. We further improved the driving algorithm to enable it to coexist in STA/AP/P2P mode supporting WIFI.

2. Solve the RTSP problem
During the development process, we found that the signaling parameters brought by each mobile phone are inconsistent. We must adapt the parameters of different mobile phones. Otherwise, there is no way to make all mobile phones work well, so we will automatically target different mobile phones. Negotiate the best performance parameters for that phone


3. Solve the RTP problem
We solve the problem as much as possible from the network transmission level by means of out-of-order reordering/drop packet retransmission/jitter buffering.


4. Solve the HDCP problem
We purchased the HDCP key and developed the HDCP decoding program, so we can support HDCP phones.


5. Solve the VIDEO-AUDIO problem
According to the hardware situation, we try to use hardware decoding, which has saved CPU work. In addition, some H264 streams sent by mobile phones are not standard. We need to do some correction process before sending them to the decoder. In addition, some mobile phones may be sent. The code stream parameters will change, and some decoders do not support automatic changes, so you need to do some processing before sending them to the decoder.

The Effect

Through some of the above methods, we have solved most of the problems, making the quality of our Miracast Sink products more than most of our peers.

The effect of our Miracast is basically comparable to that of Airplay, and it can be connected very stably with mainstream mobile phones on the market.

Welcome everyone to use our products, and welcome everyone to comment on our products.

If you have any questions, please contact me at marketing@bijienetworks.com

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK