I had an issue with my n4 only connecting to my router when it wants. But I found a weird way to make it connect every time, I have to open up
Display in settings and go to the bottom to wireless display then I turn it on and search for display then I turn it off and go to Wi-Fi settings and it...