Since few days I encountered same problem with wifi connection.
Can search and connect to my wireless network.
All works fine but for short time.Sometimes more or less.In few minutes, Wifi bars are still present,in setting wi-fi seems to be connected,I have ip assigned,all looks ok but can't use wifi.
No Safari,no winscp.All appear to be ok but don;t work.
All I can do is forget network or turn on-off wifi,after that for a period all work fine but only for few minutes.
Tryied already by dhcp or by static address but same result.
Reset network settings,same result.
Restore,same result.
My wifi work fine with laptop.
Any sugestions?

Iphone 2G ver2.1