Reset PIN Code Value


I want to reset the PIN (i entered before to log in), so that i can get to the PIN input prompt (without the need to perform a complete restart) and log in with a different Sim Card.
I tried “AT+COPS=2” but it only logged me out of the telephone network and didn’t reset the PIN.

Does anyone know how to do this?

Which “PIN” are you talking about?

The AT commands available for controlling the SIM PIN are described in the AT Commands manual…

Could you be more precise about what are you looking for ?

  • Do you intend to connect 2 SIM card, then switch from one to another ?
  • Do you just want to disable the SIM, then reconnect with it ?

I mean the PIN value which is saved/cached by the adl_simSubscribe(adl_simHdlr_f SimHandler,ascii * PinCode) function.
My Firmware version is 663c00 and the OS is 4.23.02, but I don’t find a command to log off the SIM (the saved/cached PIN value) and to relog with:

if(adl_simGetState() == ADL_SIM_STATE_PIN_WAIT)

(I don’t want to perform a system restart)

In the moment i have only one SIM slot and want to log off and close the connection to the SIM, put another SIM inside and log in again with the new SIM and login PIN.

The adl_simSubscribe function does not save or cache any PIN value!

When you call the adl_simSubscribe function, you have to supply the appropriate PIN value in that call!

If your application is not supporting your requirement, then you need to fix the application.

OK, so may i’m stupid but why not doing this:

  • Don’t try to close the connection to the SIM.
  • Simply remove current SIM (SIM card slot accept hot plug from my mind)
  • This will automatically close the SIM connection
  • Then, insert your new SIM
  • Then, enter new PIN code

By proceeding like this, i feel that you will not perform any complete restart. “Log off” and “close”, as you say, are automatic when you remove the SIM.

It doens’t work with adl_simSubscribe(…) because it re-login automatically, even if i remove and insert the same SIM Card. I can’t retype the Login-PIN with this function (don’t get PIN_OK and SIM_FULL_INIT). I’ve tested it whit a new Project and got the same effect, but if i use “AT+CPIN” it work. This instruction doesn’t store the session/PIN/whatever and i can change the SIM Card and retype the Login-PIN.

The problem is solved now.
Thanks for your effort!