I know this is an old thread but I just discovered I am having the same problem. Scanning...connecting....disconnecting. I didn't realize that my wifi was not connecting because I have a widget that is supposed to indicate whether things are on or off... and the wifi shows green even when it's not connected. I guess it is always on and scanning but doesn't actually connect. So, I really don't know how long this has been going on for, although I know it was definitely working when I first set up my phone.
My wireless router is Netgear. I have a DroidX, Froyo, recently rooted. I have not flashed a custom ROM.
I've been trying to follow some of the recent suggestions in this thread, but admit I have a hard time understanding some of them. I tried setting the IP manually... that didn't make any difference. There were some suggestions that I think referred to messing with the router but I don't know. Like, broadcasting SSID -- where is that done?
I got the router several years ago and set it up on a different computer from the one I have now. I thought I was reasonably technically savvy but configuring the router was the most technically challenging thing I'd ever had to deal with. After a number of conversations with nice representatives with very thick accents, I finally got it going. That computer crashed completely several months ago, and when I got my new computer I didn't have any of the programs, including my Netgear configuration. So now I have no idea how to go back and mess with anything. All I know is that I can hook my computers into the wifi, but apparently not my phone.
I have the Netgear disk. Should I reinstall the software?