The phone works normally except for the SIM. I can unlock it, then open apps, preferences etc. I've made a backup in iTunes, then reset the phone to factory settings, then restored the backup. This didn't fix the problem.
When I enter the SIM PIN code, the screen is fixed at "unlocking", while showing the number pad. I can't go back to the home screen. I can shut down the phone, restart it, everything is back to normal except for the SIM. I see that I still have three tries for the SIM. I've tried to enter a false PIN to see what happens, but then it's the same.
Is this a problem with the SIM or with the phone? Any ideas how I can fix this problem?