Changes

18,017 bytes removed ,  13:29, 23 July 2021
no edit summary
Line 1: Line 1: −
==Introduction==
+
{{Template: Gsmctl_commands
 
+
<!------------------------DEVICE----------------------->
'''''gsmctl''''' is an SSH command used to communicate with a RUTxxx router's modem. In other words, ''gsmctl'' relays '''AT''' commands (a set of instructions used to control a modem) to the router's modem; thus, providing the user with a way to control and obtain information from the modem via SSH. This can be used to either obtain certain modem related variables (signal strength, operator, connection state, etc.) or to execute certain actions (sending SMS messages, changing the frequency band, etc.).
+
| series = RUT9XX
 
+
| fw_version = R_00.06.08.3 and below
This article provides a complete overview on ''gsmctl'' commands available in RUTxxx routers.
+
| name = RUT
 
+
}}
==Prerequisites==
  −
 
  −
''gsmctl'' commands can be used on all RUTxxx routers via any type of command line interface (CLI) supported by the router. So all you need is:
  −
* a RUTxxx router
  −
* knowledge on how to login via a '''[[Command line interfaces|command line interface]]'''
  −
 
  −
==gsmctl options==
  −
 
  −
''gsmctl'' commands are used in tandem with various options that specify what type of action should be executed.
  −
----
  −
'''Example structure'''
  −
 
  −
Individual options are described in separate subsections of this article. To find the information you are looking for faster, refer to the table of contents at the top of the page or use your browser's "Find in page" feature ('''Control + F''').
  −
 
  −
Each option is presented with its usage syntax and an example command. For easier differentiation of the different elements that make up the examples, different colors are used:
  −
* <span style="color:blue;">options</span> are highlighted in blue
  −
* <span style="color:red;">responses</span> are highlighted in red
  −
* <span style="color:purple;">additional parameters</span> are highlighted in purple
  −
----
  −
'''Two execution methods'''
  −
 
  −
Each option can be executed in two distinct ways. One is shorter, the other is longer and more descriptive. For example, to obtain the modem's IMEI you can either use:
  −
* short version: '''''gsmctl -i'''''
  −
* long version: '''''gsmctl --imei'''''
  −
 
  −
In both cases, enter the desired command and press the "Enter" key on your keyboard to execute that command. The response will be printed out as a '''standard output''' ('''stdout''') string in your terminal.
  −
----
  −
'''Combined options'''
  −
 
  −
Multiple options can be combined together to obtain more than one parameter at a time. For example, to obtain the name of the operator used, signal strength and connection type with one command you can use one of the following:
  −
* short version: '''''gsmctl -oqt'''''
  −
* long version: '''''gsmctl --operator --signal --conntype'''''
  −
 
  −
Note that in the shorter version multiple options can be used together with one hyphen (-) symbol with no spacing, while in the longer version different options must be separated by spaces and before each option a double hyphen (--) is required.
  −
 
  −
==Basic options==
  −
 
  −
This subsection overviews basic ''gsmctl'' options, usually related to obtaining certain modem related information.
  −
 
  −
===Get IP address of logical interface===
  −
----
  −
To obtain the IP address of a network interface, use '''''-p''''' or '''''--ip''''' options.
  −
  −
'''Usage syntax''':
  −
  −
gsmctl <span style="color:blue;">-p</span>, <span style="color:blue;">--ip</span> <span style="color:purple;"><INTERFACE></span>
  −
 
  −
Where ''<INTERFACE>'' is the name of a network interface.
  −
 
  −
'''Example''': obtaining the IP address of the mobile connection interface:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-p</span> <span style="color:purple;">wwan0</span>
  −
<span style="color:red;">10.139.75.221</span>
  −
 
  −
Where '''''wwan0''''' is the name of the mobile interface when the connection type is set to QMI (default). You can use the '''''ifconfig''''' command to check the names of existing network interfaces.
  −
 
  −
'''Possible responses''':
  −
* IP address (32-bit numeric address written as four numbers separated by periods)
  −
 
  −
 
  −
===Get number of bytes sent===
  −
----
  −
To obtain the number of bytes sent (TX bytes) by a network interface, use '''''-e''''' or '''''--bsent''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-i</span>, <span style="color:blue;">--bsent</span> <span style="color:purple;"><INTERFACE></span>
  −
 
  −
Where ''<INTERFACE>'' is the name of a network interface.
  −
 
  −
'''Example''': obtaining the number of bytes sent (TX bytes) by the mobile connection interface:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-e</span> <span style="color:purple;">wwan0</span>
  −
<span style="color:red;">36335</span>
  −
 
  −
Where '''''wwan0''''' is the name of the mobile interface when the connection type is set to QMI (default). You can use the '''''ifconfig''''' command to check the names of existing network interfaces.
  −
 
  −
'''Possible responses''':
  −
* An integer number representing '''bytes''' (not bits) sent
  −
 
  −
 
  −
===Get number of bytes received===
  −
----
  −
To obtain the number of bytes received (RX bytes) by a network interface, use '''''-r''''' or '''''--brecv''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-b</span>, <span style="color:blue;">--brecv</span> <span style="color:purple;"><INTERFACE></span>
  −
 
  −
Where ''<INTERFACE>'' is the name of a network interface.
  −
 
  −
'''Example''': obtaining the number of bytes received (RX bytes) by the mobile connection interface:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-r</span> <span style="color:purple;">wwan0</span>
  −
<span style="color:red;">92551</span>
  −
 
  −
Where '''''wwan0''''' is the name of the mobile interface when the connection type is set to QMI (default). You can use the '''''ifconfig''''' command to check the names of existing network interfaces.
  −
 
  −
'''Possible responses''':
  −
* An integer number representing '''bytes''' (not bits) received
  −
 
  −
 
  −
===Get network connection state===
  −
----
  −
To obtain the network connection state, use '''''-j''''' or '''''--connstate''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-j</span>, <span style="color:blue;">--connstate</span>
  −
 
  −
'''Example''': obtaining the current network connection state:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-j</span>
  −
  <span style="color:red;">connected</span>
  −
 
  −
'''Possible responses''':
  −
* connected
  −
* disconnected
  −
 
  −
 
  −
===Get network link state===
  −
----
  −
To obtain the registration state of the mobile network, use '''''-g''''' or '''''--netstate''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-g</span>, <span style="color:blue;">--netstate</span>
  −
 
  −
'''Example''': obtaining the registration state of the mobile network:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-g</span>
  −
<span style="color:red;">registered (home)</span>
  −
 
  −
'''Possible responses''':
  −
* registered (home)
  −
* registered (roaming)
  −
* unregistered
  −
* searching
  −
* unknown
  −
 
  −
 
  −
===Get device IMEI===
  −
----
  −
To obtain the modem's International Mobile Equipment Identity (IMEI), use '''''-i''''' or '''''--imei''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-i</span>, <span style="color:blue;">--imei</span>
  −
 
  −
'''Example''': obtaining the modem's IMEI:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-i</span>
  −
<span style="color:red;">990000862471854</span>
  −
 
  −
'''Possible responses''':
  −
* a 15 digit sequence of decimal numbers
  −
 
  −
 
  −
===Get SIM ICCID===
  −
----
  −
To obtain the Integrated Circuit Card Identifier (ICCID) of the SIM card that is currently in use, use '''''-J''''' or '''''--iccid''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-J</span>, <span style="color:blue;">--iccid</span>
  −
 
  −
'''Example''': obtaining the ICCID of the SIM card in use:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-J</span>
  −
<span style="color:red;">89310410106543789301</span>
  −
 
  −
'''Possible responses''':
  −
* a 19 or 20 digit sequence of decimal numbers
  −
 
  −
 
  −
===Get device model===
  −
----
  −
To obtain the modem's model name, use '''''-m''''' or '''''--model''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-m</span>, <span style="color:blue;">--model</span>
  −
 
  −
'''Example''': obtaining the modem's model name
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-m</span>
  −
<span style="color:red;">model_name</span>
  −
 
  −
'''Possible responses''':
  −
* a string of letters and digits representing the model name
  −
 
  −
 
  −
===Get device manufacturer===
  −
----
  −
To obtain the modem's manufacturer's name, use '''''-w''''' or '''''--manuf''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-w</span>, <span style="color:blue;">--manuf</span>
  −
 
  −
'''Example''': obtaining the modem's manufacturer's name:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-w</span>
  −
<span style="color:red;">manufacturers_name</span>
  −
 
  −
'''Possible responses''':
  −
* a string of letters and digits representing the manufacturer's name
  −
 
  −
 
  −
===Get device serial number===
  −
----
  −
To obtain the modem's serial number, use '''''-a''''' or '''''--serial''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-a</span>, <span style="color:blue;">--serial</span>
  −
 
  −
'''Example''': obtaining the modem's serial number:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-a</span>
  −
<span style="color:red;">990000862471854</span>
  −
 
  −
'''Possible responses''':
  −
* a 15 digit sequence of decimal numbers
  −
 
  −
 
  −
===Get device revision number===
  −
----
  −
To obtain the modem's revision number (firmware version), use '''''-y''''' or '''''--revision''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-y</span>, <span style="color:blue;">--revision</span>
  −
 
  −
'''Example''': obtaining the modem's revision number:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-i</span>
  −
<span style="color:red;">EC25EFAR02A08M4G</span>
  −
 
  −
'''Possible responses''':
  −
* a string of letters and digits representing the revision number (firmware version)
  −
 
  −
 
  −
===Get IMSI===
  −
----
  −
To obtain the International Mobile Subscriber Identity (IMSI), use '''''-x''''' or '''''--imsi''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-x</span>, <span style="color:blue;">--imsi</span>
  −
 
  −
'''Example''': obtaining IMSI:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-x</span>
  −
<span style="color:red;">246029999999999</span>
  −
 
  −
'''Possible responses''':
  −
* a 15 digit (or less) sequence of decimal numbers
  −
 
  −
 
  −
===Get SIM card state===
  −
----
  −
To obtain the state of the SIM card currently in use, use '''''-z''''' or '''''--simstate''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-z</span>, <span style="color:blue;">--simstate</span>
  −
 
  −
'''Example''': obtaining the current SIM state:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-z</span>
  −
<span style="color:red;">inserted</span>
  −
 
  −
'''Possible responses''':
  −
* inserted
  −
* not inserted
  −
 
  −
===Get GSM signal (RSSI) level===
  −
----
  −
To obtain the router's current signal strength ([[RSSI]]) value, use '''''-q''''' or '''''--signal''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-q</span>, <span style="color:blue;">--signal</span>
  −
 
  −
'''Example''': obtaining the router's current signal strength:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-q</span>
  −
<span style="color:red;">-55</span>
  −
 
  −
'''Possible responses''':
  −
* an integer number ranging from -113 to -51 (in dBm)
  −
 
  −
===Get WCDMA RSCP level===
  −
----
  −
To obtain the router's current WCDMA [[RSCP]] level, use '''''-X''''' or '''''--rscp''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-X</span>, <span style="color:blue;">--rscp</span>
  −
 
  −
'''Example''': obtaining the RSCP level:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-X</span>
  −
<span style="color:red;">-77</span>
  −
 
  −
'''Possible responses''':
  −
* an integer number ranging from -124 to 0
  −
* service mode not supported (this response is returned when the router's current service mode is not WCDMA)
  −
 
  −
 
  −
===Get WCDMA EC/IO level===
  −
----
  −
To obtain the router's current WCDMA [[EC/IO]] level, use '''''-E''''' or '''''--ecio''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-E</span>, <span style="color:blue;">--ecio</span>
  −
 
  −
'''Example''': obtaining the EC/IO level:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-E</span>
  −
<span style="color:red;">-4.000000</span>
  −
 
  −
'''Possible responses''':
  −
* an integer number ranging from -20 to 0
  −
* service mode not supported (this response is returned when the router's current service mode is not WCDMA)
  −
 
  −
===Get LTE RSRP level===
  −
----
  −
To obtain the router's current LTE [[RSRP_and_RSRQ|RSRP]] level, use '''''-W''''' or '''''--rsrp''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-W</span>, <span style="color:blue;">--rsrp</span>
  −
 
  −
'''Example''': obtaining the RSRP level:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-W</span>
  −
<span style="color:red;">-103</span>
  −
 
  −
'''Possible responses''':
  −
* an integer number ranging from >= -80 dBm to <= -100 (dBm)
  −
* service mode not supported (this response is returned when the router's current service mode is not LTE)
  −
 
  −
===Get LTE SINR level===
  −
----
  −
To obtain the router's current SINR level, use '''''-Z''''' or '''''--sinr''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-Z</span>, <span style="color:blue;">--sinr</span>
  −
 
  −
'''Example''': obtaining the SINR level:
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-Z</span>
  −
<span style="color:red;">16.9</span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
===Get LTE RSRQ level===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get cell ID parameter===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get name of operator used===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get operator number===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get data carrier type===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get module temperature===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get PIN/PUK count===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get network information===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get serving cell information===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Get neighbour cell information===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Shutdown the modem===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===List available options===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
 
  −
===Print gsmctl version===
  −
----
  −
To obtain the , use '''''-''''' or '''''--''''' options.
  −
 
  −
'''Usage syntax''':
  −
 
  −
gsmctl <span style="color:blue;">-</span>, <span style="color:blue;">--</span>
  −
 
  −
'''Example''': obtaining the
  −
 
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-</span>
  −
<span style="color:red;"></span>
  −
 
  −
'''Possible responses''':
  −
*
  −
 
  −
==SMS management options==
  −
 
  −
 
  −
 
  −
===Read SMS by index===
  −
----
  −
 
  −
 
  −
===List SMS by type===
  −
----
  −
 
  −
 
  −
===Print SMS memory usage===
  −
----
  −
 
  −
 
  −
===Delete SMS by index===
  −
----
  −
 
  −
 
  −
===Send SMS===
  −
----
  −
 
  −
 
  −
===Send SMS encoded in base64===
  −
----
  −
 
  −
==Auxiliary options==
  −
 
  −
 
  −
===Send AT command to device===
  −
----
  −
 
  −
===Enter shell mode===
  −
----
  −
 
  −
===Enable debug information===
  −
----
  −
 
  −
===Do not log the command===
  −
----
  −
 
  −
==See also==
  −
 
  −
* [[AT Commands]]