I upgraded my previously-unlocked iPhone 3GS to iOS 5.1 today, from iOS 4. I hadn't upgraded the OS in awhile (since the phone was unlocked before a trip overseas). iTunes says: "There is no SIM card installed in the iPhone you are attempting to activate. Please disconnect and insert a SIM card in the iPhone." I tried taking out and reinserting the SIM card, but that didn't help. It seems that I cannot restore to factory settings now, since iTunes doesn't think my phone has a SIM card and so won't connect to my phone at all. I realize now that I should have restored to factory settings before upgrading, but given that I did not, how can I fix this retroactively? Help?! Thanks!