How change/create SIM PIN using AT commands when the SIM card has no PIN

I’m using a SIM868 module and I was using my usual SIM card with no problem, but now I have bought a new SIM card and has no pin. I need to add a pin code to has more security.

I have checked that has no pin using this command: AT+CPIN?

and the answer was: +CPIN: READY.

I have searched how to change it in the SIMCOM’s AT commands manual and I have found 2 options:

1) AT+CPIN=<pin>[,<new pin>] 
2) AT+CPWD=<fac>,<oldpwd>,<newpwd>

I have tried both of them but in the first one I can’t insert the actual pin, because there is no actual pin. And in the second one I have tried different commands due, in the description of the at command, sais “If an old password has not yet been set, oldpwd is not to enter”. None of this ones has worked (guess that 1234 is the new pin that I want to use)

1) AT+CLCK=“SC”,"1234"
2) AT+CLCK=“SC”,,"1234" 
3) AT+CLCK=“SC”,“”,"1234" 

The answer to that 3 cases was the same: ERROR

(If someone is going to suggest that I can change or try the SIM card with a mobile phone I can’t do it because this new SIM card is a miniSIM card and all my phones use nanoSIM or microSIM)

Any suggestions? Thank you!

I’ve found the problem.
I was making a mistake in the AT command, the command to do that is:
the correct syntax is



  • <fac> (string) is the facility to be locked/unlocked ("SC" in case of “SIM (PIN request)”).
  • <mode> (integer) is the operation to be done on the facility. This parameter was missing in my attempts.
  • 0 to unlock
  • 1 to lock
  • 2 to query lock status
  • <passwd> is the password set with +CPWD (in your case it should be the PIN code but it is probably not required since it is not set).
    So the command is:
    AT+CLCK=“SC”,1,“1234” (where 1234 is the SIM pin that you want)