I'm Not Blaming D-Link
I am having the same problem, D-Link DIR 655 vA4 Firmware 1.34NA.
Wifi works when I cycle power on Sammy, but only for a matter of seconds. Speedtest.net was never even able to finish a test.
I have tried ALL the solutions in this post. NONE of them works really at all for me, except one. The other solutions only work for a minute...that doesn't count, that's what the S4 was doing before.
I REFUSE to blame D-Link. I've run this router for over 4 years in a small office. I typically have servers, security cameras, numerous in house and staff tablets and phones (like 25) and about 12 of gigabit ethernet PCs. Over the years, the router seems to be able to serve them all, all brands, it passes terabytes of data, provides port forwarding, and offers wifi n. The only device that seems to have problems is the G4! Why on earth would we blame D-Link when the common denominator is Samsung. Other routers than D-Link are mentioned in this thread and have similar problems. Of course, it's ultimately a conflict between the G4 and some router chipset or software.
The solution that "worked" for me was ONLY setting max speed to 54Mbps (I did not turn off n, just limited the speed, nothing else). This is not a "fix", as dropping back to 2004 g technology speeds is a long effin way from OK.
We still need a real fix.