Wifi fails? Battery fails? Unlock fails? You need purplesn0w, the geohot 3GS unlock solution. Now I know you here a lot about different colors of sn0w, but I'm here to tell you why purplesn0w is the best. First off, what is purplesn0w? It's a soft unlock for your 3GS that I'd actually use day to day. It's not a daemon that takes any resources, and it doesn't add a task to your baseband. It's very close to a true unlock. All it does is patch three files, CommCenter, lockdownd, and your wildcard activation plist(which you need, activate w at&t sim first, no hacktivation support yet). That's it, no other files are installed. Props to Oranav for the at+xlog exploit!
A full explanation is coming soon, but I think you clever reversers out there will see what it does, and see why it's so pristine :-) The payload is radically different from other varieties of sn0w. beta as usual, back up first.
Be sure to have legit activated 3GS
Disable 3G if you don't have it(like T-Mobile).
Add apt.geohot.com to Cydia
Watch for success output in Cydia
Reboot, and enjoy your unlocked iPhone
You can find instructions on how to use PurpleSn0w here.