FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
3,045 views 8 comments
by
I have RUT240. How can I disable the PIN code for my SIM cards? I want to use CLI and gsmctl AT commands.
by

I have been trying the following commands. Any idea what is wrong with the commands or way to get some further error information?

root@Teltonika-RUT240:~# gsmctl -A AT+CPIN?
+CPIN: READY
root@Teltonika-RUT240:~# gsmctl -A AT+CLCK="SC",O,"1275"
ERROR


 

by
I did try to restart the gsmd-deamon with debug parameters "-D 1"/"-D 5". Unfortunately, I was unable to get some additional information what exactly the “ERROR” is.

Are these AT commands a hardware limitation?
by anonymous
Hello,

the correct AT command format must be:

gsmctl -A 'AT+CLCK="SC",0,"pin code"'
by
I still get message "ERROR" when executing that command with single quotes.
by anonymous
Hello,

What error code are you getting?
by
The response is only "ERROR". As I wrote before (May 14), I haven't been able to figure out how to get some more specific error message.

4 Answers

0 votes
by anonymous
Hello,

our router WebUI does not have the ability to disable the PIN. You can only enter a PIN using the CLI.
by
I have three SIM cards and don't want to access the WebUI after every change.
0 votes
by anonymous
Any answer on how to properly remove pin codes (through CLI)?
0 votes
by anonymous
Some command may have worked anyway. One of my SIM cards had no PIN, when I visited a mobileoperatorshop.
0 votes
by anonymous

Try these commands

  • gsmctl -A AT+CPIN?
  • gsmctl -A 'AT+CLCK="SC",0,"PIN CODE",1'
It worked for me.
by anonymous

As you said, that works, also for me too.

The trick is having into account that the full AT command string is passed to gsmctl as a parameter, so any "special" character (spaces, double quotes, etc) must be escaped in order to avoid CLI splitting AT string into several parameters (in the case of spaces), or misinterpreting other special characters.

Two ways of carry out this exist:

  • Single quotation of full parameter string;
  • Escaping each special character.

Hence, the next command

  • gsmctl -A AT+CPIN?    #CORRECT, no spaces or special chars in AT command string
  • gsmctl -A AT+CLCK="SC",0,"PIN CODE"   #INCORRECT, doubles quotes are misinterpreted by shell environment
  • gsmctl -A 'AT+CLCK="SC",0,"PIN CODE"'  #CORRECT, full AT command string is single quoted
  • gsmctl -A AT+CLCK=\"SC\",0,\"PIN CODE\"  #CORRECT, each special char in AT command string is escaped

https://www.gnu.org/software/bash/manual/html_node/Escape-Character.html

https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html