Miracast Connections Drop Out Constantly

Recently, during a projector upgrade project, we decided to try and make things a little bit easier on the end users and provide nice HD TVs and Miracast technology so they could connect without having to fuss with VGA and HDMI cables. (It gave us a great reason to push upgrades to Windows 10, too!)

We went with decent TV makes and the Microsoft Wireless Display Adapter v2 for the Miracast dongle. (Only to find out that all of the TVs we purchased actually have a builtin Miracast function, but we stuck with the Microsoft brand as the "official" connection point.)

This project went very well for some time, but then we began having these connections drop out constantly. It got to the point that we  truly regretted ever having purchased the TVs in  the first place. But, as things stood, he we were, with great looking TVs, but not viable way of connecting and, more importantly, staying connected.

At first, we thought that it possibly could be something with one of the 2.4GHz channels that the Miracast was talking on was simply overloaded. We decided to actually go ahead and purchase a metageek Wi-Spy DBx and Chanalyzer license to help us try and figure this out. [Not sponsored by metageek for this at all - it's just the tool we went with.]

At first, we were seeing the DIRECT-* SSIDs that are created during an active Miracast session running on Channel 6 of the 2.4GHz spectrum. Sadly, this was along with what appeared to be most of  the other APs in our office. We decided to take our APs, and completely disable Channel 6 on the 2.4GHz radio.

[TIP: If you're trying to diagnose this issue, in our experience, you can not view a DIRECT-* connection in Chanalyzer, if that same computer is the one hosting the Miracast connection. 2 PCs required, folks.]

The problem persisted.

Well, let's check and make sure that the Miracast was still trying to connect on Channel 6. Granted this is the next day, but here we are, sitting on Channel 11. We still seemed to have a bunch  of interference and overlap on all of our SSIDs. We turned our Tx limits lower. We started with Tx minimum  level of 10 and a maximum of 17. All of our APs were transmitting on Tx 10, and still interfering with each other. We changed this to Tx minimum 5, Tx maximum 10. All of the APs immediately dropped to Tx 5. We still had some interference, but the dB levels were much more acceptable.

The Miracast issue persisted.

We disabled the 2.4GHz band entirely.

This seemed to work out quite well, but is really not a viable solution in the long term. We re-enabled the 2.4GHz band and decided to leave it be and see if we could capture anything funky going on with Chanalyzer.

It turns out, every 30 minutes, with an active Miracast session going on, you could put money on the connection dropping. However, we didn't see anything too horribly awry on Chanalyzer. Let's dig into the FortiGate logs.


Ah-ha! Every 30 minutes, you'd see this in our WiFi events. (APs and Channels generalized for example.)
darrp-optimization-start DARRP optimization start
darrp-channel AP 1 radio 1 channel 11 ==> 1.
darrp-channel AP 2 radio 1 channel 1 ==> 11.
darrp-channel AP 1 radio 2 channel 165 ==> 157.
darrp-channel AP 2 radio 2 channel 157 ==> 165.

Interesting. What is this DARRP optimization, anyways? [ REF: FortiOS™ Handbook - Deploying Wireless Networks VERSION 5.4.0 ]

Automatic Radio Resource Provisioning 
To prevent interference between APs, the FortiOS WiFi Controller includes the Distributed Automatic Radio Resource Provisioning (DARRP) feature. Through DARRP, each FortiAP unit autonomously and periodically determines the channel that is best suited for wireless communications. FortiAP units to select their channel so that they do not interfere with each other in large-scale deployments where multiple access points have overlapping radio ranges.

Better yet:
By default, ARRP optimization occurs at a fixed interval of 1800 seconds (30 minutes). 

Well there, we have it! We simply need to go in, and modify the ARRP optimization schedule to occur off hours. Simply SSH into the FortiGate and:

     config wireless-controller timers                                                                             
          set darrp-optimize 0                                                                                           
          set darrp-day sunday monday tuesday wednesday thursday friday saturday
          set darrp-time "04:00" "22:00"                                                                            
     end                                                                                                                          

I know that this solution is specific to FortiGates/FortiAPs, but there is likely something similar going on with your wireless network as this feature is something most vendors will have (if named differently). Check out the optimization schedule and see if it coincides with your Miracast connections getting dropped!


Hope this helps someone out! This was a true pain for a long time until we decided to really dig in. Miracast connections dropping out is a very common complaint on the web, but we were unable to find really any helpful information on an actual resolution.

Comments

Popular Posts