Believe it or not, for the Galaxy Note II it took banging the back of the device. I check several forums for a couple of hours and this was the solution. Factory resets will not fix it.
try using WPS push button. go to settings, got to wifi, go to more, and select WPS push button. it lets you connect to the wifi by pressing a button on your router.