My router is not netgear...I don't have a smart TV, so I'm using a "Netgear Push2TV" device which just plugs into the HDMI port of any TV and is made specifically for WiDi / Miracast (you can google it if interested - it's actually been out for several years now).
Yes, I'm using Xposed. I'm rooted with several root apps, but using the Stock ROM / kernel.
When I first connect my phone to the "Push2TV", the Push2TV displays a 4 (or 6?) digit code on the screen and asks me to enter it on my device. The phone pops up a number pad and I enter the code. A few seconds later, screen mirroring is ON.
I also want to add that though I've seen some reports of the "Chromecast" method resulting in choppy video and/or no sound, the built-in mirroring has worked flawlessly for me. Sometimes I use the "Xfinity TV-Go" app to stream television episodes to the TV. You can't tell that it's not being played directly from the TV. Picture and sound have both been excellent.
I get that four digit code thingy, I did that when I had the S4 and it used to connect successfully.