this paper introduces the common miracast problems and causes, and gives some solutions to these problems.
• what is miracast
miracast is a wireless connection standard launched in 2012 from devices (such as laptops, tablets or smartphones) to displays (such as TVs, monitors or projectors). It can be roughly described as “HDMI over Wi Fi”, replacing the cable from the device to the display.
Wi Fi Alliance launched the miracast certification program at the end of 2012. Regardless of the equipment manufacturer, miracast certified devices can communicate with each other. The adapter can be used to plug into HDMI or USB ports, allowing devices without built-in miracast support to connect through miracast.
miracast adopts the point-to-point Wi Fi direct standard. It allows transmission of up to 1080p HD video (H.264 codec) and 5.1 surround sound (AAC and AC3 are optional codecs, and the mandatory codec is linear pulse code modulation – 16 bit 48 kHz 2-channel). Connections are created through WPS, so WPA2 is used for protection. IPv4 is used for the Internet layer. On the transport layer, TCP or UDP is used. In the application layer, RTSP starts and controls the flow for data transmission.
• usage status of miracast
because the wifi-p2p protocol used by miracast is used, there is no need to switch the existing WiFi usage mode of the device, which is convenient to use. Therefore, the current Android phones basically support miracast source, and many TV set-top boxes and smart TVs also support miracast sink.
but the following problems still exist: 1 The naming of miracast source by Android phone manufacturers is not standardized. When users use it, they don’t know where to find it. //www.wirelessdisplay.cn/blog/how-to-use-miracast 2. When using miracast sink, TV set-top box and smart TV basically need to switch WiFi mode, such as cutting off WiFi link or hotspot mode, so as to improve users’ learning and use costs. 3. At present, the access compatibility of miracast sink is relatively poor, which is reflected in: the mobile phone cannot be connected / the mobile phone connection time is very long, etc. 4. The stability of the existing miracast sink is relatively poor, which is reflected in: after repeated use, the screen projection equipment is no longer connected / will be disconnected after a long time of connection, etc. 5. The current experience of miracast sink needs to be optimized, which is reflected in: audio and video will get stuck or mosaic / unclear picture / large picture delay.
• why do these problems occur in miracast?
as shown in the figure, miracast mainly includes the following parts from bottom to top: 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, the compatibility of miracast will be affected. 2. RTSP involves signaling negotiation. The clarity of the image is negotiated in this part. If not handled properly, the audio and video effects of miracast will be affected. 3. RTP involves network transmission. If not handled properly, it will cause picture card screen and mosaic. 4. HDCP is an encryption protocol, which also involves the purchase of keys. If this part is not processed, the audio and video streams of some mobile terminals, such as Sony, cannot be parsed. 5. Video-audio processing is mainly decoding. If it is not handled properly, it will affect the high CPU utilization, mosaic, etc.
• how to solve these problems of miracast
1 Solve the problem of wifi-p2p
when we developed bj60 / bj62 / bj4000, we tested about 40 wireless network cards. The test criteria include WiFi Princess mode support / compatibility with mainstream mobile phones / network conditions of each working mode (bandwidth / loss rate / jitter / delay, etc.), and finally select 5 network cards. We further improve 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 were inconsistent. We have to adjust the parameters of different mobile phones. Otherwise, there is no way to make all mobile phones work normally, so we will automatically locate different mobile phones. Negotiate the best performance parameters of the mobile phone 3 Solve the RTP problem
we solve the problem as much as possible from the network transmission level by disorderly reordering / discarding packet retransmission / jitter buffer. 4. Solve the HDCP problem
we have 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 saves CPU work. In addition, some H264 streams sent by mobile phones are not standard. We need to do some correction before sending them to the decoder. In addition, some mobile phones may be sent. Code flow parameters will change, and some decoders do not support automatic changes, so you need to do some processing before sending them to the decoder.
through the above methods, we have solved most problems and made the quality of our miracast sink products exceed that of most peers.
the effect of our miracast is basically the same as that of airplay. It can be very stably connected with mainstream mobile phones in the market.
welcome to use our products and comment on our products.
if you have any questions, please contact firstname.lastname@example.org Contact us