Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
You can either:

1) Upgrade to 3.1.2 official, then jailbreak with blackra1n and unlock with blacksn0w, or

2) Upgrade to a pre-jailbroken custom 3.1.2 made with PwnageTool, preserving your baseband, and then unlock using ultrasn0w.

I would recommend the latter if possible. Many people (~ 10-20%) have had problems with WiFi connectivity after using blacksn0w. Since it's possible to preserve your baseband, why risk it?
 
thanks for the reply, where can get the pre-jailbroken custom 3.1.2 from?

We are not supposed to share links to the custom files on here. They are technically copyrighted materials. Search Google for custom iPhone firmware. Make sure that you get one that is hacktivated and that you get the one for the correct phone:

Original iPhone = iPhone1,1
iPhone 3G = iPhone1,2
iPhone 3GS = iPhone2,1

There was a thread on here a while ago. I don't know if the links are still good. https://forums.macrumors.com/threads/803052/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.