How to enter PUK on MikroTik LTE router

On MikroTik routers with an LTE modem, you can enter the PUK code by using the terminal’s at-chat feature

Login to the terminal using a browser or SSH. Now you can enter the chat using /interface/lte/at-chat lte1.

How to check if the SIM card requires a PUK input

First, verify if a PUK is needed using AT+CPIN?:

[admin@MikroTik] > /interface/lte/at-chat lte1 
input: AT+CPIN?
  output: +CPIN: SIM PUK
          OK

It should say output: +CPIN: SIM PUK if the SIM card expects a PUK.

Enter the PUK and set a new PIN

If your PUK is 1112233 and the new PIN is 1234,

Double-check that the PUK is correct, as entering it wrong too many times will lock the SIM card permanently!

In /interface/lte/at-chat lte1, enter:

AT+CPIN="11122233","1234"

Example output:

[admin@MikroTik] > /interface/lte/at-chat lte1 
input: AT+CPIN="11122233","1234"
  output: OK