What do I need to do to unlock the phone? Should I upgrade to a certain firmware first than unlock it?

thank you for any help I appreciate it.

So the 3GS, as it turns out, was originally released with iOS 3.0. So you probably have a 3G in your hands there, which actually may make things easier in some aspects.

I'd suggest doing a DFU restore to iOS 3.1.3 (download IPSW file here) and then jailbreaking with redsn0w (I /think/ the current version 0.9.15b3 available here should work with iOS 3.1.3, but if not, use an earlier version) or Spirit. Unlock with ultrasn0w after jailbreaking.

You can also use iOS 4.2.1 (the latest iteration of iOS available for that device) if you want (marginally) more app compatibility, but you'll need to make a custom IPSW with the correct baseband, or use the iPad baseband and downgrade trick (but I wouldn't recommend this route unless you have apps that need iOS 4.2.1).

The Following User Says Thank You to Orby For This Useful Post:

Orby I unlockd 2 phones before but i completely forgot how to do it..can u remind me how
do i restore the phone to that new firmware? i remember how to jailbreak, i think u just open the program and it explains to u...also how do unlock with ultrasnow?

Only baseband up to 05.13 can be unlocked by Ultrasn0w. If you are already at iOS 4.2.1 and your bb has gone past 05.13, then what u need to do is to run redsn0w and install ipad bb( 6.15) n install ultrasn0w to unlock.
Using ipad bb is unstable but you can downgrade your bb to 05.13 using redsn0w. Red snow can only downgrade ipad bb n not from any other bb.

Only baseband up to 05.13 can be unlocked by Ultrasn0w. If you are already at iOS 4.2.1 and your bb has gone past 05.13, then what u need to do is to run redsn0w and install ipad bb( 6.15) n install ultrasn0w to unlock.
Using ipad bb is unstable but you can downgrade your bb to 05.13 using redsn0w. Red snow can only downgrade ipad bb n not from any other bb.

WHAT- THE- HELL- ARE- YOU- TALKING- ABOUT ?

I appreciate the help but I really dont understand anything you said. I am just dumb when it comes to unlocking/jailbreaking these fricking iphones

Orby I unlockd 2 phones before but i completely forgot how to do it..can u remind me how
do i restore the phone to that new firmware? i remember how to jailbreak, i think u just open the program and it explains to u...also how do unlock with ultrasnow?

sorry for all the questions i completely forgot how to do this stuff

Okay, the play-by-play:

1) Plug your iPhone into your computer. Hold the power button down to bring up the "Slide to Power Off" slider, then go ahead and slide to turn the phone off.
2) Hold down the iPhone's power and home buttons for ten seconds. Then let go of the power button but continue holding the power button for approximately ten more seconds. If done correctly, iTunes should open up and give a message about "an iPhone was discovered in Recovery Mode."
3) iTunes should now open to a screen where you have a nice big button that says "restore iPhone." Hold down Shift (if on Windows) or Option (if on OS X) and click the button.
4) A dialog box should now open asking what IPSW you want to use to restore with. Select the 3.1.3 file you downloaded above (or 4.2.1 if you really want to go that way, but I would NOT advise that unless absolutely necessary for apps you use).
5) iTunes will now handle the restore process on your phone. When it completes and activates your iPhone, just run redsn0w, hit the "Jailbreak" button, and follow the directions. Same process if you decide to use Spirit instead--plug and play.

Now the unlock process is just dead simple, I swear.

1) Once jailbroken, open Cydia on your phone.
2) Search for the free package "ultrasn0w."
3) Install the package, respring or reboot your iPhone as determined by Cydia (it'll make this determination automatically, all you have to do is push the button).