Okay... I've done this a few times and I have come up with a 100% way to downgrade from any 3.0/3.0.1/3.1/3.1.2 firmware back to 2.2.1 without hassles.
1. Download
PwnageTool 2.2.5 for Mac
2. Follow the on-screen instructions to pwn your iPhone (make sure not to check "Activate iPhone")
3. Use PwnageTool to help you get in DFU mode and restore to your custom firmware.
4. Your iPhone should downgrade to 2.2.1 really easily with iTunes 9.0.2
You can either leave it at that (if you want to be jailbroken). Simply jailbreaking without installing Cydia or Installer would probably be fine for most people.
For those who wish not to be jailbroken, you still have to do the steps above in order to downgrade to a non-jailbroken iPhone.
Now we'll need to re-restore your iPhone to the official 2.2.1 firmware. Follow the next instructions:
5. Option-Click Restore and choose the *official* 2.2.1 firmware
6. It will look like it's installing 2.2.1, but it will finish with an error (Only if you have an iPhone 3G). 2.2.1 has been successfully installed, but to kick it out of recovery mode, do the following:
7. Download a command-line tool called "
iRecovery" and install it.
Then open Utilities>Terminal.app
Then enter these commands (Note: Hit return after every line):
Code:
iRecovery -s
setenv auto-boot true
saveenv
fsboot
Then you should be all set.
I hope this is helpful.