Changes

5,296 bytes added ,  10:22, 22 November 2023
no edit summary
Line 18: Line 18:  
''gsmctl'' commands are used in tandem with various options that specify what type of action should be executed.
 
''gsmctl'' commands are used in tandem with various options that specify what type of action should be executed.
 
----
 
----
 +
 
'''Example structure'''
 
'''Example structure'''
   Line 51: Line 52:  
This section overviews basic ''gsmctl'' options, usually related to obtaining certain modem related information.
 
This section overviews basic ''gsmctl'' options, usually related to obtaining certain modem related information.
    +
{{#ifeq:{{{series}}}|RUTOS| |
 
===Get IP address of logical interface===
 
===Get IP address of logical interface===
 
----
 
----
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this option is deprecated. IP addresses can be called with `ubus call network.interface.<interface> status`.
 +
 
To obtain the IP address of a network interface, use '''''-p''''' or '''''--ip''''' options.
 
To obtain the IP address of a network interface, use '''''-p''''' or '''''--ip''''' options.
 
   
 
   
Line 63: Line 68:  
'''Example''': obtaining the IP address of the mobile connection interface:
 
'''Example''': obtaining the IP address of the mobile connection interface:
   −
  root@Teltonika:~# gsmctl <span style="color:blue;">-p</span> <span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>
+
  root@Teltonika:~# gsmctl <span style="color:blue;">-p</span> <span style="color:purple;">wwan0</span>
 
  <span style="color:red;">10.139.75.221</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.  
Where '''''mob1s1a1''''' is the name of the mobile interface when the connection type is set to QMI (default). You can get names of existing interfaces from '''''/etc/config/network''''' file.
+
}}
 
  −
'''Example''':
  −
root@Teltonika:~# cat /etc/config/network
  −
config interface '<span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>'
  −
      option proto '{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}'
  −
      option modem '1-1.4'
  −
      option metric '1'
  −
      option sim '1'
  −
      option pdp '1'
  −
      option auth 'none'
  −
  −
config interface '<span style="color:purple;">{{#ifeq:{{{series}}}|RUTOS|mob1s2a1|wwan}}</span>'
  −
      option proto '{{#ifeq:{{{series}}}|RUTOS|mob1s2a1|wwan0}}'
  −
      option modem '1-1.4'
  −
      option metric '1'
  −
      option sim '2'
  −
      option pdp '1'
  −
 
  −
'''Possible responses''':
  −
 
  −
*IP address (32-bit numeric address written as four numbers separated by periods)
  −
 
      
===Get number of bytes sent===
 
===Get number of bytes sent===
Line 103: Line 86:  
'''Example''': obtaining the number of bytes sent (TX bytes) by the mobile connection 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;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>
+
  root@Teltonika:~# gsmctl <span style="color:blue;">-e</span> <span style="color:purple;">wwan0</span>
 
  <span style="color:red;">36335</span>
 
  <span style="color:red;">36335</span>
   Line 125: Line 108:  
'''Example''': obtaining the number of bytes received (RX bytes) by the mobile connection 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;">{{#ifeq:{{{series}}}|RUTOS|mob1s1a1|wwan0}}</span>
+
  root@Teltonika:~# gsmctl <span style="color:blue;">-r</span> <span style="color:purple;">wwan0</span>
 
  <span style="color:red;">92551</span>
 
  <span style="color:red;">92551</span>
   Line 263: Line 246:  
'''Possible responses''':
 
'''Possible responses''':
   −
*a 15 digit sequence of decimal numbers
+
*a 15 digit sequence.
       
===Get device revision number===
 
===Get device revision number===
 
----
 
----
To obtain the modem's revision number (firmware version), use '''''-y''''' or '''''--revision''''' options.
+
To obtain the modem's revision number (firmware version), use '''''-y''''' or {{#ifeq:{{{series}}}|RUTOS|'''''--firmware'''''|'''''--revision''''' }} options.
    
'''Usage syntax''':
 
'''Usage syntax''':
   −
  gsmctl <span style="color:blue;">-y</span>, <span style="color:blue;">--revision</span>
+
  gsmctl <span style="color:blue;">-y</span>, <span style="color:blue;">{{#ifeq:{{{series}}}|RUTOS|'''''--firmware'''''|'''''--revision''''' }}</span>
    
'''Example''': obtaining the modem's revision number:
 
'''Example''': obtaining the modem's revision number:
Line 321: Line 304:       −
===Get GSM signal (RSSI) level===
+
===Get PIN state===
 +
----
 +
To obtain the PIN state of the SIM card currently in use, use '''''-u''''' or '''''--pinstate''''' options.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-u</span>, <span style="color:blue;">--pinstate</span>
 +
 
 +
'''Example''': obtaining the PIN state:
 +
 
 +
root@Teltonika:~# gsmctl <span style="color:blue;">-u</span>
 +
<span style="color:red;">OK</span>
 +
 
 +
'''Possible responses''':
 +
 
 +
*OK
 +
*SIM not inserted.
 +
 
 +
 
 +
{{#ifeq:{{{series}}}|RUTOS
 +
|===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 for <b>3G</b> network type:
 +
 
 +
root@Teltonika:~# gsmctl -q
 +
RSSI: -67
 +
RSCP: -68
 +
ECIO: -5
 +
 
 +
*Example for <b>4G</b> network type:
 +
root@Teltonika:~# gsmctl -q
 +
RSSI: -60
 +
RSRP: -103
 +
SINR: 2
 +
RSRQ: -16
 +
 
 +
'''Possible responses''':
 +
 
 +
*an integer number ranging from -113 to -51 (in dBm)
 +
 
 +
|===Get GSM signal (RSSI) level===
 
----
 
----
 
To obtain the router's current signal strength ([[RSSI]]) value, use '''''-q''''' or '''''--signal''''' options.
 
To obtain the router's current signal strength ([[RSSI]]) value, use '''''-q''''' or '''''--signal''''' options.
Line 333: Line 362:  
  root@Teltonika:~# gsmctl <span style="color:blue;">-q</span>
 
  root@Teltonika:~# gsmctl <span style="color:blue;">-q</span>
 
  <span style="color:red;">-55</span>
 
  <span style="color:red;">-55</span>
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this argument returns all signal related values.
 +
*Example for <b>3G</b> network type:
 +
 +
root@Teltonika:~# gsmctl -q
 +
RSSI: -67
 +
RSCP: -68
 +
ECIO: -5
 +
 +
*Example for <b>4G</b> network type:
 +
root@Teltonika:~# gsmctl -q
 +
RSSI: -60
 +
RSRP: -103
 +
SINR: 2
 +
RSRQ: -16
    
'''Possible responses''':
 
'''Possible responses''':
   −
*an integer number ranging from -113 to -51 (in dBm)
+
*an integer number ranging from -113 to -51 (in dBm)}}
      Line 342: Line 386:  
----
 
----
 
To obtain the router's current WCDMA [[RSCP]] level, use '''''-X''''' or '''''--rscp''''' options.  
 
To obtain the router's current WCDMA [[RSCP]] level, use '''''-X''''' or '''''--rscp''''' options.  
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this value has been moved under <span style="color:blue;">-q</span> argument.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 361: Line 407:  
----
 
----
 
To obtain the router's current WCDMA [[EC/IO]] level, use '''''-E''''' or '''''--ecio''''' options.
 
To obtain the router's current WCDMA [[EC/IO]] level, use '''''-E''''' or '''''--ecio''''' options.
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this value has been moved under <span style="color:blue;">-q</span> argument.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 380: Line 428:  
----
 
----
 
To obtain the router's current LTE [[RSRP_and_RSRQ|RSRP]] level, use '''''-W''''' or '''''--rsrp''''' options.
 
To obtain the router's current LTE [[RSRP_and_RSRQ|RSRP]] level, use '''''-W''''' or '''''--rsrp''''' options.
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this value has been moved under <span style="color:blue;">-q</span> argument.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 399: Line 449:  
----
 
----
 
To obtain the router's current [[SINR]] level, use '''''-Z''''' or '''''--sinr''''' options.
 
To obtain the router's current [[SINR]] level, use '''''-Z''''' or '''''--sinr''''' options.
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this value has been moved under <span style="color:blue;">-q</span> argument.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 418: Line 470:  
----
 
----
 
To obtain the router's current [[RSRP and RSRQ|RSRQ]] level, use '''''-M''''' or '''''--rsrq''''' options.
 
To obtain the router's current [[RSRP and RSRQ|RSRQ]] level, use '''''-M''''' or '''''--rsrq''''' options.
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this value has been moved under <span style="color:blue;">-q</span> argument.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 533: Line 587:       −
===Get PIN/PUK count===
+
{{#ifeq:{{{series}}}|RUTOS
 +
|===Get PIN/PUK count===
 +
----
 +
To obtain the PIN/PUK count, use '''''-B''''' or '''''--pincount''''' options.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-B</span>, <span style="color:blue;">--pincount</span>
 +
 
 +
'''Example''': obtaining PIN/PUK count:
 +
 
 +
root@Teltonika:~# gsmctl <span style="color:blue;">-B</span>
 +
<span style="color:red;">S1_PIN: 3 {{!}} S1_PUK: 10
 +
S2_PIN: 3 {{!}} S2_PUK: 10</span>
 +
 
 +
'''Possible responses''':
 +
 
 +
*an integer number representing the amount of PIN/PUK attempts left
 +
|===Get PIN/PUK count===
 
----
 
----
 
To obtain the PIN/PUK count, use '''''-B''''' or '''''--pincount''''' options.
 
To obtain the PIN/PUK count, use '''''-B''''' or '''''--pincount''''' options.
Line 549: Line 621:     
*an integer number representing the amount of PIN/PUK attempts left
 
*an integer number representing the amount of PIN/PUK attempts left
*N/A - returned when the SIM card is not inserted
+
*N/A - returned when the SIM card is not inserted}}
      −
===Get network information===
+
{{#ifeq:{{{series}}}|RUTOS
 +
|===Get network information===
 
----
 
----
 
To obtain information related to the mobile network information, use '''''-F''''' or '''''--network''''' options.
 
To obtain information related to the mobile network information, use '''''-F''''' or '''''--network''''' options.
 +
 +
'''Usage syntax''':
 +
 +
gsmctl <span style="color:blue;">-F</span>, <span style="color:blue;">--network</span>
 +
 +
'''Example''': obtaining mobile network information:
 +
 +
root@Teltonika:~# gsmctl <span style="color:blue;">-F</span>
 +
<span style="color:red;">LTE {{!}} LTE_B3 {{!}} 24602</span>
 +
 +
'''Possible responses''':
 +
 +
*response syntax: ''<Act>,<oper>,<band>'' <br> Where:
 +
**'''''<Act>''''' - service mode
 +
**'''''<oper>''''' - operator number
 +
**'''''<band>''''' - frequency band used
 +
|===Get network information===
 +
----
 +
To obtain information related to the mobile network information, use '''''-F''''' or '''''--network''''' options.
 +
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 571: Line 664:  
**'''''<oper>''''' - operator number
 
**'''''<oper>''''' - operator number
 
**'''''<band>''''' - frequency band used
 
**'''''<band>''''' - frequency band used
**'''''<channel>''''' - channel ID
+
**'''''<channel>''''' - channel ID}}
       
===Get serving cell information===
 
===Get serving cell information===
 
----
 
----
To obtain the , use '''''-K''''' or '''''--serving''''' options.
+
To obtain the serving cell information, use '''''-K''''' or '''''--serving''''' options.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 589: Line 682:  
  <span style="color:red;">+SGCELLINFOEX:LTE,FDD LTE,246,02,1037079,109,4051,23,146,3,100,1850,19850,-63,-99,-13,199,19,4,255,-,-,4,-,0,-,0,0,0</span>
 
  <span style="color:red;">+SGCELLINFOEX:LTE,FDD LTE,246,02,1037079,109,4051,23,146,3,100,1850,19850,-63,-99,-13,199,19,4,255,-,-,4,-,0,-,0,0,0</span>
    +
<b>Note</b>: From FW version <i>R_00.07.03</i> the values are returned in a different format. Example:
 +
 +
root@Teltonika:~# gsmctl -K
 +
Access tech: LTE | TDD mode: FDD | MCC: 246 | MNC: 2 | UE state: 3
       
===Get neighbour cell information===
 
===Get neighbour cell information===
 
----
 
----
To obtain the , use '''''-I''''' or '''''--neighbour''''' options.
+
To obtain the neighbor cell information, use '''''-I''''' or '''''--neighbour''''' options.
    
'''Usage syntax''':
 
'''Usage syntax''':
Line 605: Line 702:        +
{{#ifeq:{{{series}}}|RUTOS
 +
|===Get VoLTE state status===
 +
----
 +
To obtain the VoLTE state, use '''''-v''''' or '''''--volte_state''''' options.
   −
===Shutdown the modem===
+
<b>Note</b>: This argument is supported from FW version <i>R_00.07.03</i>.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-v</span>, <span style="color:blue;">--volte_state</span>
 +
 
 +
'''Example''': obtaining the VoLTE state.
 +
 
 +
root@Teltonika:~# gsmctl -v
 +
Active
 +
 
 +
'''Possible responses''':
 +
 
 +
*Active
 +
*Inactive
 +
|===Print gsmctl version===
 +
----
 +
To find out the current ''gsmctl'' version, use '''''-v''''' or '''''--version''''' options.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-v</span>, <span style="color:blue;">--version</span>
 +
 
 +
'''Example''': obtaining the ''gsmctl'' version
 +
 
 +
root@Teltonika:~# gsmctl <span style="color:blue;">-v</span>
 +
<span style="color:red;">GSMCTL version: 0.2b</span>
 +
 
 +
'''Possible responses''':
 +
 
 +
*a string type output indicating the ''gsmctl'' version}}
 +
 
 +
 
 +
===Get operator station time===
 +
----
 +
To obtain the operator station, use '''''-H''''' or '''''--modemtime''''' options with time argument (1 - GMT, 2 - local).
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-H</span>, <span style="color:blue;">--modemtime</span> <span style="color:purple;"><1/2></span>
 +
 
 +
'''Example''': obtaining the operator time
 +
 
 +
root@Teltonika:~# gsmctl -H 1
 +
22/12/01,12:27:14
 +
 
 +
 
 +
===Get modem info in json format===
 +
----
 +
To obtain the full modem information in JSON format, use '''''-E''''' or '''''--info''''' options.
 +
 
 +
<b>Note</b>: This argument is supported from FW version <i>R_00.07.03</i>.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-E</span>, <span style="color:blue;">--info</span>
 +
 
 +
'''Example''': obtaining the modem information
 +
 
 +
root@Teltonika:~# gsmctl -E
 +
{
 +
"name": "Quectel EG06-E",
 +
"model": "EG06-E",
 +
"manuf": "Quectel",
 +
"driver": "Quectel EG06 AT",
 +
"usb_id": "3-1",
 +
...
 +
 
 +
 
 +
===Reboot the modem===
 +
----
 +
To reboot the modem, use '''''-Q''''' or '''''--reboot''''' options. After the command is executed, the modem will start rebooting.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-Q</span>, <span style="color:blue;">--reboot</span>
 +
 
 +
'''Example''': rebooting the modem
 +
 
 +
root@Teltonika:~# gsmctl <span style="color:blue;">-Q</span>
 +
<span style="color:red;">Modem was reset</span>
 +
 
 +
'''Possible responses''':
 +
 
 +
*Modem was reset
 +
 
 +
{{#ifeq:{{{series}}}|RUTOS
 +
|===Debug the modem===
 +
----
 +
To debug the modem, use '''''-D''''' or '''''--debug''''' options. After the command is executed, modem will enable debug information.
 +
 
 +
<b>Note</b>: This argument is supported from FW version <i>R_00.07.03</i>.
 +
 
 +
'''Usage syntax''':
 +
 
 +
gsmctl <span style="color:blue;">-D</span>, <span style="color:blue;">--debug</span>
 +
 
 +
'''Example''': Enable debug information
 +
 
 +
root@Teltonika:~# gsmctl <span style="color:blue;">-D</span>
 +
|===Shutdown the modem===
 
----
 
----
 
To shutdown the modem, use '''''-D''''' or '''''--shutdown''''' options. After the command is executed, the modem will stay shut off up to a '''maximum of 60 s.''' and will then start up again.
 
To shutdown the modem, use '''''-D''''' or '''''--shutdown''''' options. After the command is executed, the modem will stay shut off up to a '''maximum of 60 s.''' and will then start up again.
Line 621: Line 822:  
'''Possible responses''':
 
'''Possible responses''':
   −
*OK
+
*OK}}
 
      
===List available options===
 
===List available options===
Line 636: Line 836:  
  root@Teltonika:~# gsmctl <span style="color:blue;">-h</span>
 
  root@Teltonika:~# gsmctl <span style="color:blue;">-h</span>
 
  <span style="color:red;">usage: gsmctl OPTIONS
 
  <span style="color:red;">usage: gsmctl OPTIONS
   -p, --ip <INTERFACE>          Get IP of logical interface
+
   -F, --network                Get network information
 
   -e, --bsent <INTERFACE>      Get number of bytes sent
 
   -e, --bsent <INTERFACE>      Get number of bytes sent
 
   -r, --brecv <INTERFACE>      Get number of bytes recieved</span>
 
   -r, --brecv <INTERFACE>      Get number of bytes recieved</span>
Line 644: Line 844:  
*a list of options that can be used with ''gsmctl''
 
*a list of options that can be used with ''gsmctl''
   −
  −
===Print gsmctl version===
  −
----
  −
To find out the current ''gsmctl'' version, use '''''-v''''' or '''''--version''''' options.
  −
  −
'''Usage syntax''':
  −
  −
gsmctl <span style="color:blue;">-v</span>, <span style="color:blue;">--version</span>
  −
  −
'''Example''': obtaining the ''gsmctl'' version
  −
  −
root@Teltonika:~# gsmctl <span style="color:blue;">-v</span>
  −
<span style="color:red;">GSMCTL version: 0.2b</span>
  −
  −
'''Possible responses''':
  −
  −
*a string type output indicating the ''gsmctl'' version
      
==SMS management options==
 
==SMS management options==
Line 789: Line 972:     
First you need to create a /tmp/.smstext file and append some text you want to send
 
First you need to create a /tmp/.smstext file and append some text you want to send
 +
 +
<b>Note</b>: From FW version <i>R_00.07.03</i> this argument has been removed.
    
To send a base64 SMS message, use '''''-S -b''''' or '''''--sms --send-b64''''' options
 
To send a base64 SMS message, use '''''-S -b''''' or '''''--sms --send-b64''''' options
Line 794: Line 979:  
'''Usage syntax''':
 
'''Usage syntax''':
   −
  gsmctl <span style="color:blue;">-S -b, </span><span style="color:blue;">--send --send-b64</span> <span style="color:purple;"><NUMBER></span>
+
  gsmctl <span style="color:blue;">-S -b,</span><span style="color:blue;">--sms --send-b64</span> <span style="color:purple;"><NUMBER></span>
    
'''Example''':  
 
'''Example''':  
   −
  root@Teltonika:~# gsmctl <span style="color:blue;"> -S -b</span> <span style="color:purple;">+37061234567</span>
+
  root@Teltonika:~# gsmctl <span style="color:blue;">-S -b</span> <span style="color:purple;">+37061234567</span>
 
  <span style="color:red;"></span>
 
  <span style="color:red;"></span>
   Line 804: Line 989:     
*If response in terminal "OK", SMS was sent successfully.
 
*If response in terminal "OK", SMS was sent successfully.
 +
    
==Auxiliary options==
 
==Auxiliary options==

Navigation menu