Hey guys just to let you know, now I jailbroke my iDevice 3G with 4.0.2, and also I unlocked it.
Just opened redsn0w 0.9.5.b5-5 and selected this fw iPhone1,2_4.0_8A293_Restore.ipsw and everything went ok ! then I tried the ultrasn0w and it did the work.