Disable PIN code using Gsm modem AT commands

If you have a PIN code enabled SIM card and want to remove /disable PIN code using AT commands follow these commands,
suppose 9546 is the current PIN code , Replace 9546 with your PIN code, >>> shows the response from modem.

AT+CPIN?
>>> +CPIN: SIM PIN // pin codes need to be entered
>>> OK

AT+CPIN="9546"
>>>; OK

AT+CLCK="SC",0,"9546" // disable pin code
>>> OK

AT+CPIN?
>>> +CPIN: READY

 

RECOMMENDED READ  writing and reading from AVR EEPROM in Block.
 

Dost Muhammad Shah

Dost Muhammad specializing in Embedded Design, Firmware development, PCB designing , testing and prototyping. He enjoys sharing his experience with others .Get in touch with Dost on Twitter or via Contact form

 

11 thoughts on “Disable PIN code using Gsm modem AT commands

  1. Hi,
    Thanks for the tip; i’m getting an error, could you please help? The AT+CPIN? gives the expected feedback, but when i type AT+CPIN=”MY PIN” it returns Error. This is a new SIM, any guess?
    Kindest regards from Portugal,
    Pedro

    1. I hope you have already solved your problem. In case still not solved can you provide your terminal output?

  2. My sim doesn’t have a pin but I keep getting error message like this +CME 58 and error 5.am using gsm A6.. Please assist

    1. AT+CPWD=”SC”,”1234″,”4321″ where 1234 is current pin and 4321 is the new pin code.

      Have a look at this post for more info

  3. hi sir, how can i stop getting URC using AT command in between my parsing ?
    Is there any AT command to stop all URC ?

    1. There are several AT commands to enable or disable different URCs. Search the AT-command manual for URC and you will get to know the exact AT-commands to use

      1. Enter the wrong pin three times, your sim would get blocked, Now get the PUK code from operator and create a new pin

Leave a Reply to Abdelah Younessesoft Younesse Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.