Nexus5 not connecting to only my wifi network I have a very peculiar problem with connecting my new nexus5 to my wifi router @ home.

Here is the background: 
I recently bought Nexus 5 and a new wireless modem/router(D-Link2750u)...The first day as soon as I got the router, I did the set up and both wired connection to my pc and wireless connection(WPA2-PSK) to my phone worked fine.

Now the problem is

Since the next day my phone does not enable me to connect to my home network. It always shows my SSID as 'Not In range' even though my phone is right next to the router.

My approach to the problem: 

I thought since there are 2 devices involved... it can either be the phone's fault or the routers fault.

So, First I choose my phone, I went to my friends place my phone had no problem what so ever to connect to the wifi @ my friend's(Same ISP, same encryption different router) and I try to connect to 2 other different networks and it worked fine.

Now, the only other culprit possible: My router

My friend was able to connect to this network through his Samsung phone and he dint have any problem doing it so.

Now the question that boggles my mind... 

who is the culprit in here? My Phone or the router?

I am not able to figure out what might be the problem, Any kind of help is greatly appreciated...

PS: I also tried doing a factory reset of the phone and also reset the router and then set it up, none of them solved the problem.
This question thread has been very helpful -- I too developed the same problem, which started after 2 events:  being away from my home for 2 months, and also receiving the latest Android 4 updates (over-the-air) -- across 3 Android devices: my HTC one, my Nexus 7, and an Alcatel Fierce. All have Android 4+

After hours inside the router's setup panel, testing, I solved it with your help, Izzy. But it wasn't the channel... It was the GHz setting!

The home router was set for 5ghz. everything always worked fine, until the latest Android updates. Now, none will work; all give the same famous message: Not in Range. This is absolutely erroneous, since all PCs/Macs in the house could use the Wifi network just fine. (I won't even mention the brand of router since it doesn't matter.)

To solve the problem, I tried eliminating most variables, in both the router and the android devices:


SSID on/off -- didn't matter; not in range;
Channel changing -- no effect; still not in range;
restarting router and phones and tablets -- no luck;
toggling WIFI optimizations/power saving/dhcp-vs-static -- no luck


What DID work was changing the broadcast channel from 5ghz back to the more crowded 2.4 GHz.  Success.
And rats, I'd rather be using the 5GHz.

So I conclude that this is an Android 4+ software bug. (Phone hardware, you think? How could all three devices have a problem with 5ghz, when they ALL worked fine before on this same network, before joining other networks fine?) There's something wrong with the software such that once they join a 5GHz wifi network, then connect later to another network (cafe hotspot, other network, etc.), they lose the ability to "see" the network they first connected to.