I have also been having the same issue with my 2wire wireless router / dsl modem.
I have been following all the support threads about this issue, and I kept trying and trying and trying different things, and here is what finally worked for me with the 2wire.
2wire base station is set to WEP Open for the WEP setting.
With the iPhone, I clicked on the network and picked FORGET NETWORK.
Then I logged back in.
When it asked for the password, I clicked on the setting where it says ASCI/hex instead of password.
Then I entered the default password printed on the bottom of the modem, with a $ in front of it.
So I entered: $6135675446 as an example, although that isn't my actual password and it won't be your actual password.
You have to look on the bottom of your modem to see what your password will be.
I tried all of the different things that everyone has been suggesting with WEP problems, and this is what ended up working with my 2WIRE.
Also, I did turn the phone on and off several times between attempts. And I turned on Airport Mode to turn off the radio several times.
But now it is working like a charm, so it
does work with 2wire. It's just a matter of trying out all those different things people are suggesting until you hit the one that magically works with your WEP router or settings.
Good luck!